Understanding Tauri Configuration

Learn what Tauri configuration is, how the tauri.conf.json file works, and how to manage platform-specific settings and overrides.

Every Tauri project ships with a central configuration file that acts as the single source of truth for your application’s identity, behavior, and build settings. This file controls everything from the window title and app name to how the bundler packages your app for each operating system. Understanding it early prevents hours of debugging later.

This document explains what the Tauri configuration is, why it exists, and how the configuration files work — covering the default JSON format, alternative formats, platform-specific overrides, and the CLI’s extension mechanism. By the end, you’ll be able to navigate tauri.conf.json confidently and adjust it for development, production, and platform-specific needs.

What is Tauri Configuration?

The Tauri configuration is a structured set of options that define your app’s metadata, the location of your frontend assets, how the app should behave at runtime, and how it should be packaged for distribution. It is stored in a file named tauri.conf.json (or equivalent) inside the src-tauri directory and is read by both the Tauri CLI and the Tauri runtime.

Why this matters:

Without this file, Tauri has no idea where your frontend code lives, what to name your app, or how to launch it. The CLI uses the build section to start your dev server and locate the final HTML/CSS/JS; the runtime uses the app section to set up windows and security policies.

Think of it as the bridge between your Rust backend and your web frontend. The build configuration tells Tauri how to get your frontend ready (devUrl for development, frontendDist for production). The app configuration tells the native window system what title to display, what size the window should be, and what security rules to enforce. The bundle section controls platform-specific installers and icons.

In code terms, the configuration is deserialized into a Rust Config struct that you can access in your backend code. The tauri.conf.json file must live at src-tauri/tauri.conf.json and is generated for you when you create a new Tauri project with npm create tauri-app.

Why Configuration Exists

A Tauri app consists of two distinct parts that must be coordinated: a Rust process that manages the system window and native APIs, and a web frontend rendered in an OS webview. The Rust side needs to know which URL to load during development and where the static files are for production. It also needs to know the app’s bundle identifier (used by the operating system to isolate storage and permissions) and the version number.

Instead of scattering these values across multiple files and scripts, Tauri puts them in one declarative place. This makes it possible to:

  • Switch between development and production without changing Rust code.
  • Override settings per platform without duplicating the entire config.
  • Share the same app identity across bundling, code signing, and runtime.

A single mistake in this file can cause a blank window, a build failure, or an app that the OS refuses to install.

Configuration Files

The primary configuration file is tauri.conf.json. However, Tauri supports alternative formats and a flexible override system that lets you tailor settings for different operating systems or deployment flavors.

The tauri.conf.json File

When you run npm create tauri-app, the generator places a tauri.conf.json inside the src-tauri folder. The project structure chapter covers where this file sits among the rest of src-tauri. A minimal, working file for a React + Vite frontend looks like this:

src-tauri/tauri.conf.json
{
  "productName": "my-tauri-app",
  "version": "0.1.0",
  "identifier": "com.example.my-tauri-app",
  "build": {
    "devUrl": "http://localhost:5173",
    "frontendDist": "../dist"
  },
  "app": {
    "windows": [
      {
        "title": "My Tauri App",
        "width": 800,
        "height": 600
      }
    ]
  },
  "bundle": {},
  "plugins": {}
}

This file tells Tauri:

  • productName: the human-readable name used in installers and window titles (if not overridden).
  • version: the semantic version of your app. Tauri also looks at Cargo.toml if this is missing, but keeping it here centralises versioning.
  • identifier: a reverse-domain name that must be globally unique. The OS uses this to separate data directories and bundle IDs. Only alphanumeric characters, hyphens, and periods are allowed.
  • build.devUrl: the URL of your Vite dev server. During tauri dev, Tauri’s Rust process opens a window pointing here.
  • build.frontendDist: the path (relative to src-tauri) to your production frontend build output — typically ../dist for Vite.
  • app.windows: defines the default window’s title, size, and behavior. More windows and advanced settings are covered in the Window Configuration chapter.

Identifier must be unique:

Changing the identifier after publishing your app will cause the OS to treat it as a completely different application. Users will lose access to previously stored data, and auto-updates will break. Choose a stable identifier early.

The top-level object in the configuration always contains these keys: productName, version, identifier, build, app, bundle, and plugins. The bundle and plugins objects can be empty but must be present. The official reference documents each key exhaustively, but you’ll rarely need to touch everything at once.

Supported Formats

By default, Tauri expects JSON. However, you can enable JSON5 (which allows comments and trailing commas) or TOML by activating feature flags in your Cargo.toml. This is helpful if you prefer comments for documentation or find TOML’s kebab-case more natural.

src-tauri/tauri.conf.json
{
  "productName": "my-app",
  "build": {
    "devUrl": "http://localhost:5173",
    "frontendDist": "../dist"
  }
}

To use JSON5 or TOML, add the corresponding feature to the tauri and tauri-build dependencies in src-tauri/Cargo.toml:

src-tauri/Cargo.toml
[build-dependencies]
tauri-build = { version = "2", features = ["config-json5"] }

[dependencies]
tauri = { version = "2", features = ["config-json5"] }

For TOML, use the feature config-toml instead. The file must be named Tauri.toml and placed in src-tauri. JSON5 files can be named tauri.conf.json or tauri.conf.json5. All three formats represent the same data structure, just with different syntax.

Pick one format and stick with it:

Having both a tauri.conf.json and a Tauri.toml in the same project causes ambiguity. Tauri will use the first one it finds according to its resolution order, which can lead to confusion. Choose one format and remove the others.

Platform-Specific Configuration

Sometimes you need different settings on different operating systems. For example, you might want a different window title on Linux or extra resources bundled only on macOS. Tauri supports platform-specific configuration files that are merged on top of the base configuration at build time.

The platform-specific files are named:

  • tauri.linux.conf.json (or Tauri.linux.toml)
  • tauri.windows.conf.json (or Tauri.windows.toml)
  • tauri.macos.conf.json (or Tauri.macos.toml)
  • tauri.android.conf.json (or Tauri.android.toml)
  • tauri.ios.conf.json (or Tauri.ios.toml)

Tauri uses the JSON Merge Patch (RFC 7396) specification to combine these files with the main config. The platform file does not need to repeat everything — it only needs to specify the values that differ. For example, to change the product name on Linux and add a plugin permission:

src-tauri/tauri.linux.conf.json
{
  "productName": "my-app-linux",
  "plugins": {
    "deep-link": {}
  }
}

Given a base config like this:

src-tauri/tauri.conf.json
{
  "productName": "MyApp",
  "bundle": {
    "resources": ["./resources"]
  },
  "plugins": {}
}

The final resolved configuration for Linux becomes:

{
  "productName": "my-app-linux",
  "bundle": {
    "resources": ["./resources"]
  },
  "plugins": {
    "deep-link": {}
  }
}

Notice how the bundle.resources array from the base is preserved, while productName is overwritten and the deep-link plugin is added. This merging logic means you can keep the majority of your settings in one file and only override what truly differs per platform.

Build-targeted configurations work:

If you run tauri build on Linux, Tauri automatically picks up tauri.linux.conf.json if it exists. You can verify your resolved configuration by running cargo tauri build --debug and checking the log output.

Extending the Configuration at Build Time

In addition to platform-specific files, the Tauri CLI allows you to inject configuration overrides directly from the command line using the --config flag. This is invaluable for creating beta releases, staging builds, or any scenario where you need to change the app’s identity without touching the committed configuration files. The Building & Distribution chapter covers how these overrides feed into production builds.

The argument can be a raw JSON string or a path to a JSON file. It’s merged using the same RFC 7396 rules.

Imagine you want to build a beta version of your app with a different identifier and product name. Create a file src-tauri/tauri.beta.conf.json:

src-tauri/tauri.beta.conf.json
{
  "productName": "MyApp Beta",
  "identifier": "com.example.myappbeta"
}

Then build with:

npm run tauri build -- --config src-tauri/tauri.beta.conf.json

The resulting bundle will have the beta name and identifier, completely isolated from the stable version’s data and identity. This technique is safe to use in CI pipelines and lets you distribute parallel variants without maintaining multiple branches.

Override order matters:

Platform-specific files are applied first, then the --config override. If you provide both a platform file and a CLI override, the CLI override wins because it’s applied last. Keep this in mind when debugging unexpected values.

Understanding these configuration mechanisms early gives you full control over your app’s identity and behavior across development, testing, and release.

With the foundation from this page, you’re ready to configure every aspect of your Tauri application with confidence.

What is Tauri Configuration?

Learn how Tauri configuration files act as the central blueprint for your desktop app, coordinating the frontend, backend, build process, and runtime behavior.

Configuration Files

A detailed look at the core configuration files in a Tauri v2 project - tauri.conf.json, Cargo.toml, package.json, capability files, and environment variables - and how they work together.