On this page
Configuration
The Tauri configuration object. It is read from a file where you can define your frontend assets, configure the bundler, enable the app updater, define a system tray, enable APIs via the allowlist and more.
The configuration file is generated by the
tauri init command that lives in
your Tauri application source directory (src-tauri).
Once generated, you may modify it at will to customize your Tauri application.
File Formats
By default, the configuration is defined as a JSON file named
tauri.conf.json.
Tauri also supports JSON5 and TOML files via the config-json5 and
config-toml Cargo features, respectively. The JSON5 file name must be
either tauri.conf.json or tauri.conf.json5. The TOML file name is
Tauri.toml.
Platform-Specific Configuration
In addition to the default configuration file, Tauri can read a
platform-specific configuration from tauri.linux.conf.json,
tauri.windows.conf.json, and tauri.macos.conf.json (or
Tauri.linux.toml, Tauri.windows.toml and Tauri.macos.toml if the
Tauri.toml format is used), which gets merged with the main
configuration object.
Configuration Structure
The configuration is composed of the following objects:
package: Package settingstauri: The Tauri configbuild: The build configurationplugins: The plugins config
Example tauri.config.json file:
{
"build": {
"beforeBuildCommand": "",
"beforeDevCommand": "",
"devPath": "../dist",
"distDir": "../dist"
},
"package": {
"productName": "tauri-app",
"version": "0.1.0"
},
"tauri": {
"allowlist": {
"all": true
},
"bundle": {},
"security": {
"csp": null
},
"updater": {
"active": false
},
"windows": [
{
"fullscreen": false,
"height": 600,
"resizable": true,
"title": "Tauri App",
"width": 800
}
]
}
}
Type: object
[TABLE]
PackageConfig
The package configuration.
Type: object
[TABLE]
TauriConfig
The Tauri configuration object.
Type: object
[TABLE]
PatternKind
The application pattern.
Can be any ONE of the following types:
-
{ "use": "brownfield" }: Brownfield pattern.[TABLE]
-
{ "use": "isolation", "options": { "dir": string } }: Isolation pattern. Recommended for security purposes.[TABLE]
WindowConfig
The window configuration object.
Type: object
[TABLE]
WindowUrl
An URL to open on a Tauri webview window.
Can be any of the following types:
string(format:uri): An external URL.string: The path portion of an app URL. For instance, to loadtauri://localhost/users/john, you can simply provideusers/johnin this configuration.
Theme
System theme.
Can be any ONE of the following types:
- “Light”: Light theme.
- “Dark”: Dark theme.
TitleBarStyle
How the window title bar should be displayed on macOS.
Can be any ONE of the following types:
-
“Visible”: A normal title bar.
-
“Transparent”: Makes the title bar transparent, so the window background color is shown instead.
Useful if you don’t need to have actual HTML under the title bar. This lets you avoid the caveats of using
TitleBarStyle::Overlay. Will be more useful when Tauri lets you set a custom window background color. -
“Overlay”: Shows the title bar as a transparent overlay over the window’s content.
Keep in mind:
-
The height of the title bar is different on different OS versions, which can lead to the window controls and title not being where you expect them to be.
-
You need to define a custom drag region to make your window draggable, however due to a limitation you can’t drag the window when it’s not in focus https://github.com/tauri-apps/tauri/issues/4316.
-
The color of the window title depends on the system theme.
CliConfig
describes a CLI configuration
Type: object
[TABLE]
CliArg
A CLI argument definition.
Type: object
[TABLE]
BundleConfig
Configuration for tauri-bundler.
Type: object
[TABLE]
BundleTarget
Targets to bundle. Each value is case insensitive.
Can be any of the following types:
"all": Bundle all targets.BundleType: A list of bundle targets.BundleType: A single bundle target.
BundleType
A bundle referenced by tauri-bundler.
Can be any ONE of the following types:
- “deb”: The debian bundle (.deb).
- “rpm”: The RPM bundle (.rpm).
- “appimage”: The AppImage bundle (.appimage).
- “msi”: The Microsoft Installer bundle (.msi).
- “nsis”: The NSIS bundle (.exe).
- “app”: The macOS application bundle (.app).
- “dmg”: The Apple Disk Image bundle (.dmg).
- “updater”: The Tauri updater bundle.
BundleResources
Definition for bundle resources. Can be either a list of paths to include or a map of source to target paths.
Can be any of the following types:
string[]: A list of paths to include.object: A map of source to target paths.
AppImageConfig
Configuration for AppImage bundles.
Type: object
[TABLE]
DebConfig
Configuration for Debian (.deb) bundles.
Type: object
[TABLE]
RpmConfig
Configuration for RPM bundles.
Type: object
[TABLE]
DmgConfig
Configuration for Apple Disk Image (.dmg) bundles.
Type: object
[TABLE]
Position
Position coordinates struct.
Type: object
[TABLE]
Size
Size of the window.
Type: object
[TABLE]
MacConfig
Configuration for the macOS bundles.
Type: object
[TABLE]
WindowsConfig
Windows bundler configuration.
Type: object
[TABLE]
WebviewInstallMode
Install modes for the Webview2 runtime. Note that for the updater bundle
DownloadBootstrapper is used.
For more information see https://tauri.app/v1/guides/building/windows.
Can be any ONE of the following types:
-
{ "type": "skip" }: Do not install the Webview2 as part of the Windows Installer.[TABLE]
-
{ "type": "downloadBootstrapper", "silent": boolean }: Download the bootstrapper and run it. Requires an internet connection. Results in a smaller installer size, but is not recommended on Windows 7.[TABLE]
-
{ "type": "embedBootstrapper", "silent": boolean }: Embed the bootstrapper and run it. Requires an internet connection. Increases the installer size by around 1.8MB, but offers better support on Windows 7.[TABLE]
-
{ "type": "offlineInstaller", "silent": boolean }: Embed the offline installer and run it. Does not require an internet connection. Increases the installer size by around 127MB.[TABLE]
-
{ "type": "fixedRuntime", "path": string }: Embed a fixed webview2 version and use it at runtime. Increases the installer size by around 180MB.[TABLE]
WixConfig
Configuration for the MSI bundle using WiX.
Type: object
[TABLE]
WixLanguage
The languages to build using WiX.
Can be any of the following types:
string: A single language to build, without configuration.string[]: A list of languages to build, without configuration.WixLanguageConfig: A map of languages and its configuration.
WixLanguageConfig
Configuration for a target language for the WiX build.
Type: object
[TABLE]
NsisConfig
Configuration for the Installer bundle using NSIS.
Type: object
[TABLE]
NSISInstallerMode
Install Modes for the NSIS installer.
Can be any ONE of the following types:
-
“currentUser”: Default mode for the installer.
Install the app by default in a directory that doesn’t require Administrator access.
Installer metadata will be saved under the HKCU registry path.
-
“perMachine”: Install the app by default in the
Program Filesfolder directory requires Administrator access for the installation.Installer metadata will be saved under the
HKLMregistry path. -
“both”: Combines both modes and allows the user to choose at install time whether to install for the current user or per machine. Note that this mode will require Administrator access even if the user wants to install it for the current user only.
Installer metadata will be saved under the
HKLMorHKCUregistry path based on the user’s choice.
NsisCompression
Compression algorithms used in the NSIS installer.
See https://nsis.sourceforge.io/Reference/SetCompressor
Can be any ONE of the following types:
- “zlib”: ZLIB uses the deflate algorithm, it is a quick and simple method. With the default compression level it uses about 300 KB of memory.
- “bzip2”: BZIP2 usually gives better compression ratios than ZLIB, but it is a bit slower and uses more memory. With the default compression level it uses about 4 MB of memory.
- “lzma”: LZMA (default) is a new compression method that gives very good compression ratios. The decompression speed is high (10-20 MB/s on a 2 GHz CPU), the compression speed is lower. The memory size that will be used for decompression is the dictionary size plus a few KBs, the default is 8 MB.
AllowlistConfig
Allowlist configuration. The allowlist is a translation of the Cargo allowlist features.
Notes
- Endpoints that don’t have their own allowlist option are enabled by default.
- There is only “opt-in”, no “opt-out”. Setting an option to
falsehas no effect.
Examples
-
"app-all": truewill make the hide endpoint be available regardless of whetherhideis set tofalseortruein the allowlist.
Type: object
[TABLE]
FsAllowlistConfig
Allowlist for the file system APIs.
Type: object
[TABLE]
FsAllowlistScope
Filesystem scope definition. It is a list of glob patterns that restrict the API access from the webview.
Each pattern can start with a variable that resolves to a system base
directory. The variables are: $AUDIO, $CACHE, $CONFIG, $DATA,
$LOCALDATA, $DESKTOP, $DOCUMENT, $DOWNLOAD, $EXE, $FONT,
$HOME, $PICTURE, $PUBLIC, $RUNTIME, $TEMPLATE, $VIDEO,
$RESOURCE, $APP, $LOG, $TEMP, $APPCONFIG, $APPDATA,
$APPLOCALDATA, $APPCACHE, $APPLOG.
Can be any of the following types:
-
string[]: A list of paths that are allowed by this scope. -
{ "allow": string[], "deny": string[], "requireLiteralLeadingDot": boolean? }: A complete scope configuration.[TABLE]
WindowAllowlistConfig
Allowlist for the window APIs.
Type: object
[TABLE]
ShellAllowlistConfig
Allowlist for the shell APIs.
Type: object
[TABLE]
ShellAllowlistScope
Shell scope definition. It is a list of command names and associated CLI arguments that restrict the API access from the webview.
Type: ShellAllowedCommand
ShellAllowedCommand
A command allowed to be executed by the webview API.
Type: object
[TABLE]
ShellAllowedArgs
A set of command arguments allowed to be executed by the webview API.
A value of true will allow any arguments to be passed to the command.
false will disable all arguments. A list of [ShellAllowedArg] will
set those arguments as the only valid arguments to be passed to the
attached command configuration.
Can be any of the following types:
boolean: Use a simple boolean to allow all or disable all arguments to this command configuration.ShellAllowedArg: A specific set of [ShellAllowedArg] that are valid to call for the command configuration.
ShellAllowedArg
A command argument allowed to be executed by the webview API.
Can be any of the following types:
-
string: A non-configurable argument that is passed to the command in the order it was specified. -
{ "validator": string }: A variable that is set while calling the command from the webview API.[TABLE]
ShellAllowlistOpen
Defines the shell > open api scope.
Can be any of the following types:
-
boolean: If the shell open API should be enabled.If enabled, the default validation regex (
^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+) is used. -
string: Enable the shell open API, with a custom regex that the opened path must match against.If using a custom regex to support a non-http(s) schema, care should be used to prevent values that allow flag-like strings to pass validation. e.g.
--enable-debugging,-i,/R.
DialogAllowlistConfig
Allowlist for the dialog APIs.
Type: object
[TABLE]
HttpAllowlistConfig
Allowlist for the HTTP APIs.
Type: object
[TABLE]
HttpAllowlistScope
HTTP API scope definition. It is a list of URLs that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.
Examples:
- “https://*”: allows all HTTPS urls
- “https://*.github.com/tauri-apps/tauri”: allows any subdomain of “github.com” with the “tauri-apps/api” path
- “https://myapi.service.com/users/*“: allows access to any URLs that begins with “https://myapi.service.com/users/“
Type: string _(format: uri)_[]
NotificationAllowlistConfig
Allowlist for the notification APIs.
Type: object
[TABLE]
GlobalShortcutAllowlistConfig
Allowlist for the global shortcut APIs.
Type: object
[TABLE]
OsAllowlistConfig
Allowlist for the OS APIs.
Type: object
[TABLE]
PathAllowlistConfig
Allowlist for the path APIs.
Type: object
[TABLE]
ProtocolAllowlistConfig
Allowlist for the custom protocols.
Type: object
[TABLE]
ProcessAllowlistConfig
Allowlist for the process APIs.
Type: object
[TABLE]
ClipboardAllowlistConfig
Allowlist for the clipboard APIs.
Type: object
[TABLE]
AppAllowlistConfig
Allowlist for the app APIs.
Type: object
[TABLE]
SecurityConfig
Security configuration.
Type: object
[TABLE]
Csp
A Content-Security-Policy definition. See https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP.
Can be any of the following types:
string: The entire CSP policy in a single text string.CspDirectiveSources: An object mapping a directive with its sources values as a list of strings.
CspDirectiveSources
A Content-Security-Policy directive source list. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/Sources#sources.
Can be any of the following types:
string: An inline list of CSP sources. Same asList, but concatenated with a space separator.string[]: A list of CSP sources. The collection will be concatenated with a space separator for the CSP string.
DisabledCspModificationKind
The possible values for the dangerous_disable_asset_csp_modification
config option.
Can be any of the following types:
boolean: Iftrue, disables all CSP modification.falseis the default value and it configures Tauri to control the CSP.string[]: Disables the given list of CSP directives modifications.
RemoteDomainAccessScope
External command access definition.
Type: object
[TABLE]
UpdaterConfig
The Updater configuration object.
Type: object
[TABLE]
UpdaterEndpoint
A URL to an updater server.
The URL must use the https scheme on production.
Type: string (format: uri)
UpdaterWindowsConfig
The updater configuration for Windows.
Type: object
[TABLE]
WindowsUpdateInstallMode
Install modes for the Windows update.
Can be any ONE of the following types:
- “basicUi”: Specifies there’s a basic UI during the installation process, including a final dialog box at the end.
- “quiet”: The quiet mode means there’s no user interaction required. Requires admin privileges if the installer does.
- “passive”: Specifies unattended mode, which means the installation only shows a progress bar.
SystemTrayConfig
Configuration for application system tray icon.
Type: object
[TABLE]
BuildConfig
The Build configuration object.
Type: object
[TABLE]
AppUrl
Defines the URL or assets to embed in the application.
Can be any of the following types:
WindowUrl: The app’s external URL, or the path to the directory containing the app assets.string[]: An array of files to embed on the app.
BeforeDevCommand
Describes the shell command to run before tauri dev.
Can be any of the following types:
-
string: Run the given script with the default options. -
{ "script": string, "cwd": string?, "wait": boolean }: Run the given script with custom options.[TABLE]
HookCommand
Describes a shell command to be executed when a CLI hook is triggered.
Can be any of the following types:
-
string: Run the given script with the default options. -
{ "script": string, "cwd": string? }: Run the given script with custom options.[TABLE]
PluginConfig
The plugin configs holds a HashMap mapping a plugin name to its configuration object.
Type: object
Last updated Oct 08, 2026