Skip to content

Tauri Configuration

Configuration

The Tauri configuration object. It is read from a file where you can define your frontend assets, configure the bundler and define a tray icon.

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, tauri.macos.conf.json, tauri.android.conf.json and tauri.ios.conf.json (or Tauri.linux.toml, Tauri.windows.toml, Tauri.macos.toml, Tauri.android.toml and Tauri.ios.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:

Example tauri.config.json file
{
"build": {
"beforeBuildCommand": "",
"beforeDevCommand": "",
"devPath": "../dist",
"distDir": "../dist"
},
"package": {
"productName": "tauri-app",
"version": "0.1.0"
},
"tauri": {
"bundle": {},
"security": {
"csp": null
},
"windows": [
{
"fullscreen": false,
"height": 600,
"resizable": true,
"title": "Tauri App",
"width": 800
}
]
}
}

Type: object

NameTypeDefaultDescription
package
PackageConfigviewPackage settings.
tauri
TauriConfigviewThe Tauri configuration.
build
BuildConfigviewThe build configuration.
plugins
PluginConfigviewThe plugins config.

PackageConfig

The package configuration.

See more: https://tauri.app/v1/api/config#packageconfig

Type: object

NameTypeDefaultDescription
productName
string?nullApp name.
version
string?nullApp version. It is a semver version number or a path to a package.json file containing the version field. If removed the version number from Cargo.toml is used.

TauriConfig

The Tauri configuration object.

See more: https://tauri.app/v1/api/config#tauriconfig

Type: object

NameTypeDefaultDescription
pattern
PatternKindviewThe pattern to use.
windows
WindowConfig[]The windows configuration.
bundle
BundleConfigviewThe bundler configuration.
security
SecurityConfigviewSecurity configuration.
trayIcon
TrayIconConfig?viewConfiguration for app tray icon.
macOSPrivateApi
booleanfalseMacOS private API configuration. Enables the transparent background API and sets the fullScreenEnabled preference to true.

PatternKind

The application pattern.

Can be any ONE of the following types:

  • { "use": "brownfield" }: Brownfield pattern.

    NameTypeDefaultDescription
    use
    “brownfield” (required)undefined
  • { "use": "isolation", "options": { "dir": string } }: Isolation pattern. Recommended for security purposes.

    NameTypeDefaultDescription
    use
    “isolation” (required)undefined
    options
    { “dir”: string } (required)undefined

WindowConfig

The window configuration object.

See more: https://tauri.app/v1/api/config#windowconfig

Type: object

NameTypeDefaultDescription
label
stringnullThe window identifier. It must be alphanumeric.
url
WindowUrlviewThe window webview URL.
userAgent
string?nullThe user agent for the webview
fileDropEnabled
booleantrueWhether the file drop is enabled or not on the webview. By default it is enabled.

Disabling it is required to use drag and drop on the frontend on Windows.
center
booleanfalseWhether or not the window starts centered or not.
x
number? (format: double)nullThe horizontal position of the window’s top left corner
y
number? (format: double)nullThe vertical position of the window’s top left corner
width
number (format: double)800The window width.
height
number (format: double)600The window height.
minWidth
number? (format: double)nullThe min window width.
minHeight
number? (format: double)nullThe min window height.
maxWidth
number? (format: double)nullThe max window width.
maxHeight
number? (format: double)nullThe max window height.
resizable
booleantrueWhether the window is resizable or not. When resizable is set to false, native window’s maximize button is automatically disabled.
maximizable
booleantrueWhether the window’s native maximize button is enabled or not. If resizable is set to false, this setting is ignored.

## Platform-specific

- macOS: Disables the “zoom” button in the window titlebar, which is also used to enter fullscreen mode.
- Linux / iOS / Android: Unsupported.
minimizable
booleantrueWhether the window’s native minimize button is enabled or not.

## Platform-specific

- Linux / iOS / Android: Unsupported.
closable
booleantrueWhether the window’s native close button is enabled or not.

## Platform-specific

- Linux: “GTK+ will do its best to convince the window manager not to show a close button. Depending on the system, this function may not have any effect when called on a window that is already visible”
- iOS / Android: Unsupported.
title
stringnullThe window title.
fullscreen
booleanfalseWhether the window starts as fullscreen or not.
focus
booleantrueWhether the window will be initially focused or not.
transparent
booleanfalseWhether the window is transparent or not.

Note that on macOS this requires the macos-private-api feature flag, enabled under tauri > macOSPrivateApi. WARNING: Using private APIs on macOS prevents your application from being accepted to the App Store.
maximized
booleanfalseWhether the window is maximized or not.
visible
booleantrueWhether the window is visible or not.
decorations
booleantrueWhether the window should have borders and bars.
alwaysOnTop
booleanfalseWhether the window should always be on top of other windows.
visibleOnAllWorkspaces
booleanfalseWhether the window should be visible on all workspaces or virtual desktops.
contentProtected
booleanfalsePrevents the window contents from being captured by other apps.
skipTaskbar
booleanfalseIf true, hides the window icon from the taskbar on Windows and Linux.
theme
Theme?viewThe initial window theme. Defaults to the system theme. Only implemented on Windows and macOS 10.14+.
titleBarStyle
TitleBarStyleviewThe style of the macOS title bar.
hiddenTitle
booleanfalseIf true, sets the window title to be hidden on macOS.
acceptFirstMouse
booleanfalseWhether clicking an inactive window also clicks through to the webview on macOS.
tabbingIdentifier
string?nullDefines the window tabbing identifier for macOS.

Windows with matching tabbing identifiers will be grouped together. If the tabbing identifier is not set, automatic tabbing will be disabled.
additionalBrowserArgs
string?nullDefines additional browser arguments on Windows. By default wry passes --disable-features=msWebOOUI,msPdfOOUI,msSmartScreenProtection so if you use this method, you also need to disable these components by yourself if you want.
shadow
booleantrueWhether or not the window has shadow.

## Platform-specific

- Windows:
- false has no effect on decorated window, shadow are always ON.
- true will make ndecorated window have a 1px white border, and on Windows 11, it will have a rounded corners.
- Linux: Unsupported.
windowEffects
WindowEffectsConfig?viewWindow effects.

Requires the window to be transparent.

## Platform-specific:

- Windows: If using decorations or shadows, you may want to try this workaround https://github.com/tauri-apps/tao/issues/72#issuecomment-975607891
- Linux: Unsupported
incognito
booleanfalseWhether or not the webview should be launched in incognito mode.

## Platform-specific:

- Android: Unsupported.
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 load tauri://localhost/users/john, you can simply provide users/john in 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 window the controls and title not being where you don’t expect.

  • 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.

WindowEffectsConfig

The window effects configuration object

Type: object

NameTypeDefaultDescription
effects
WindowEffect (required)List of Window effects to apply to the Window. Conflicting effects will apply the first one and ignore the rest.
state
WindowEffectState?viewWindow effect state macOS Only
radius
number? (format: double)nullWindow effect corner radius macOS Only
color
Color?viewWindow effect color. Affects [WindowEffect::Blur] and [WindowEffect::Acrylic] only on Windows 10 v1903+. Doesn’t have any effect on Windows 7 or Windows 11.
WindowEffect

Platform-specific window effects

Can be any ONE of the following types:

  • “appearanceBased”: A default material appropriate for the view’s effectiveAppearance. macOS 10.14-

  • “light”: macOS 10.14-*

  • “dark”: macOS 10.14-*

  • “mediumLight”: macOS 10.14-*

  • “ultraDark”: macOS 10.14-*

  • “titlebar”: macOS 10.10+*

  • “selection”: macOS 10.10+*

  • “menu”: macOS 10.11+*

  • “popover”: macOS 10.11+*

  • “sidebar”: macOS 10.11+*

  • “headerView”: macOS 10.14+*

  • “sheet”: macOS 10.14+*

  • “windowBackground”: macOS 10.14+*

  • “hudWindow”: macOS 10.14+*

  • “fullScreenUI”: macOS 10.14+*

  • “tooltip”: macOS 10.14+*

  • “contentBackground”: macOS 10.14+*

  • “underWindowBackground”: macOS 10.14+*

  • “underPageBackground”: macOS 10.14+*

  • “mica”: Mica effect that matches the system dark perefence Windows 11 Only

  • “micaDark”: Mica effect with dark mode but only if dark mode is enabled on the system Windows 11 Only

  • “micaLight”: Mica effect with light mode Windows 11 Only

  • “blur”: Windows 7/10/11(22H1) Only

    Notes

This effect has bad performance when resizing/dragging the window on Windows 11 build 22621.

  • “acrylic”: Windows 10/11 Only

    Notes

This effect has bad performance when resizing/dragging the window on Windows 10 v1903+ and Windows 11 build 22000.

WindowEffectState

Window effect state macOS only

https://developer.apple.com/documentation/appkit/nsvisualeffectview/state

Can be any ONE of the following types:

  • “followsWindowActiveState”: Make window effect state follow the window’s active state
  • “active”: Make window effect state always active
  • “inactive”: Make window effect state always inactive
Color

a tuple struct of RGBA colors. Each value has minimum of 0 and maximum of 255.

Type: “integer_(format:uint8)_[]

BundleConfig

Configuration for tauri-bundler.

See more: https://tauri.app/v1/api/config#bundleconfig

Type: object

NameTypeDefaultDescription
active
booleanfalseWhether Tauri should bundle your application or just output the executable.
targets
BundleTargetviewThe bundle targets, currently supports [“deb”, “appimage”, “nsis”, “msi”, “app”, “dmg”, “updater”] or “all”.
identifier
string (required)The application identifier in reverse domain name notation (e.g. com.tauri.example). This string must be unique across applications since it is used in system configurations like the bundle ID and path to the webview data directory. This string must contain only alphanumeric characters (A–Z, a–z, and 0–9), hyphens (-), and periods (.).
publisher
string?nullThe application’s publisher. Defaults to the second element in the identifier string. Currently maps to the Manufacturer property of the Windows Installer.
icon
string[][]The app’s icons
resources
array?nullApp resources to bundle. Each resource is a path to a file or directory. Glob patterns are supported.
copyright
string?nullA copyright string associated with your application.
category
string?nullThe application kind.

Should be one of the following: Business, DeveloperTool, Education, Entertainment, Finance, Game, ActionGame, AdventureGame, ArcadeGame, BoardGame, CardGame, CasinoGame, DiceGame, EducationalGame, FamilyGame, KidsGame, MusicGame, PuzzleGame, RacingGame, RolePlayingGame, SimulationGame, SportsGame, StrategyGame, TriviaGame, WordGame, GraphicsAndDesign, HealthcareAndFitness, Lifestyle, Medical, Music, News, Photography, Productivity, Reference, SocialNetworking, Sports, Travel, Utility, Video, Weather.
fileAssociations
FileAssociation?nullFile associations to application.
shortDescription
string?nullA short description of your application.
longDescription
string?nullA longer, multi-line description of the application.
appimage
AppImageConfigviewConfiguration for the AppImage bundle.
deb
DebConfigviewConfiguration for the Debian bundle.
macOS
MacConfigviewConfiguration for the macOS bundles.
externalBin
array?nullA list of—either absolute or relative—paths to binaries to embed with your application.

Note that Tauri will look for system-specific binaries following the pattern “binary-name{-target-triple}{.system-extension}“.

E.g. for the external binary “my-binary”, Tauri looks for:

- “my-binary-x86_64-pc-windows-msvc.exe” for Windows
- “my-binary-x86_64-apple-darwin” for macOS
- “my-binary-x86_64-unknown-linux-gnu” for Linux

so don’t forget to provide binaries for all targeted platforms.
windows
WindowsConfigviewConfiguration for the Windows bundle.
iOS
IosConfigviewiOS configuration.
android
AndroidConfigviewAndroid configuration.
updater
UpdaterConfigviewThe updater configuration.
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).
  • “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.
FileAssociation

File association

Type: object

NameTypeDefaultDescription
ext
AssociationExt (required)File extensions to associate with this app. e.g. ‘png’
name
string?nullThe name. Maps to CFBundleTypeName on macOS. Default to ext[0]
description
string?nullThe association description. Windows-only. It is displayed on the Type column on Windows Explorer.
role
BundleTypeRoleviewThe app’s role with respect to the type. Maps to CFBundleTypeRole on macOS.
mimeType
string?nullThe mime-type e.g. ‘image/png’ or ‘text/plain’. Linux-only.
AssociationExt

An extension for a [FileAssociation].

A leading . is automatically stripped.

Type: string

BundleTypeRole

macOS-only. Corresponds to CFBundleTypeRole

Can be any ONE of the following types:

  • “Editor”: CFBundleTypeRole.Editor. Files can be read and edited.
  • “Viewer”: CFBundleTypeRole.Viewer. Files can be read.
  • “Shell”: CFBundleTypeRole.Shell
  • “QLGenerator”: CFBundleTypeRole.QLGenerator
  • “None”: CFBundleTypeRole.None
AppImageConfig

Configuration for AppImage bundles.

See more: https://tauri.app/v1/api/config#appimageconfig

Type: object

NameTypeDefaultDescription
bundleMediaFramework
booleanfalseInclude additional gstreamer dependencies needed for audio and video playback. This increases the bundle size by ~15-35MB depending on your build system.
DebConfig

Configuration for Debian (.deb) bundles.

See more: https://tauri.app/v1/api/config#debconfig

Type: object

NameTypeDefaultDescription
depends
array?nullThe list of deb dependencies your application relies on.
files
objectnullThe files to include on the package.
desktopTemplate
string?nullPath to a custom desktop file Handlebars template.

Available variables: categories, comment (optional), exec, icon and name.
MacConfig

Configuration for the macOS bundles.

See more: https://tauri.app/v1/api/config#macconfig

Type: object

NameTypeDefaultDescription
frameworks
array?nullA list of strings indicating any macOS X frameworks that need to be bundled with the application.

If a name is used, “.framework” must be omitted and it will look for standard install locations. You may also use a path to a specific framework.
minimumSystemVersion
string?nullA version string indicating the minimum macOS X version that the bundled application supports. Defaults to 10.13.

Setting it to null completely removes the LSMinimumSystemVersion field on the bundle’s Info.plist and the MACOSX_DEPLOYMENT_TARGET environment variable.

An empty string is considered an invalid value so the default value is used.
exceptionDomain
string?nullAllows your application to communicate with the outside world. It should be a lowercase, without port and protocol domain name.
license
string?nullThe path to the license file to add to the DMG bundle.
signingIdentity
string?nullIdentity to use for code signing.
providerShortName
string?nullProvider short name for notarization.
entitlements
string?nullPath to the entitlements file.
WindowsConfig

Windows bundler configuration.

See more: https://tauri.app/v1/api/config#windowsconfig

Type: object

NameTypeDefaultDescription
digestAlgorithm
string?nullSpecifies the file digest algorithm to use for creating file signatures. Required for code signing. SHA-256 is recommended.
certificateThumbprint
string?nullSpecifies the SHA1 hash of the signing certificate.
timestampUrl
string?nullServer to use during timestamping.
tsp
booleanfalseWhether to use Time-Stamp Protocol (TSP, a.k.a. RFC 3161) for the timestamp server. Your code signing provider may use a TSP timestamp server, like e.g. SSL.com does. If so, enable TSP by setting to true.
webviewInstallMode
WebviewInstallModeviewThe installation mode for the Webview2 runtime.
webviewFixedRuntimePath
string?nullPath to the webview fixed runtime to use. Overwrites webview_install_mode if set.

Will be removed in v2, prefer the webview_install_mode option.

The fixed version can be downloaded on the official website. The .cab file must be extracted to a folder and this folder path must be defined on this field.
allowDowngrades
booleantrueValidates a second app installation, blocking the user from installing an older version if set to false.

For instance, if 1.2.1 is installed, the user won’t be able to install app version 1.2.0 or 1.1.5.

The default value of this flag is true.
wix
WixConfig?viewConfiguration for the MSI generated with WiX.
nsis
NsisConfig?viewConfiguration for the installer generated with NSIS.
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.

    NameTypeDefaultDescription
    type
    “skip” (required)undefined
  • { "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.

    NameTypeDefaultDescription
    type
    “downloadBootstrapper” (required)undefined
    silent
    booleantrueInstructs the installer to run the bootstrapper in silent mode. Defaults to true.
  • { "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.

    NameTypeDefaultDescription
    type
    “embedBootstrapper” (required)undefined
    silent
    booleantrueInstructs the installer to run the bootstrapper in silent mode. Defaults to true.
  • { "type": "offlineInstaller", "silent": boolean }: Embed the offline installer and run it. Does not require an internet connection. Increases the installer size by around 127MB.

    NameTypeDefaultDescription
    type
    “offlineInstaller” (required)undefined
    silent
    booleantrueInstructs the installer to run the installer in silent mode. Defaults to true.
  • { "type": "fixedRuntime", "path": string }: Embed a fixed webview2 version and use it at runtime. Increases the installer size by around 180MB.

    NameTypeDefaultDescription
    type
    “fixedRuntime” (required)undefined
    path
    string (required)The path to the fixed runtime to use.

    The fixed version can be downloaded on the official website. The .cab file must be extracted to a folder and this folder path must be defined on this field.
WixConfig

Configuration for the MSI bundle using WiX.

See more: https://tauri.app/v1/api/config#wixconfig

Type: object

NameTypeDefaultDescription
language
WixLanguageviewThe installer languages to build. See https://docs.microsoft.com/en-us/windows/win32/msi/localizing-the-error-and-actiontext-tables.
template
string?nullA custom .wxs template to use.
fragmentPaths
string[][]A list of paths to .wxs files with WiX fragments to use.
componentGroupRefs
string[][]The ComponentGroup element ids you want to reference from the fragments.
componentRefs
string[][]The Component element ids you want to reference from the fragments.
featureGroupRefs
string[][]The FeatureGroup element ids you want to reference from the fragments.
featureRefs
string[][]The Feature element ids you want to reference from the fragments.
mergeRefs
string[][]The Merge element ids you want to reference from the fragments.
skipWebviewInstall
booleanfalseDisables the Webview2 runtime installation after app install.

Will be removed in v2, prefer the [WindowsConfig::webview_install_mode] option.
license
string?nullThe path to the license file to render on the installer.

Must be an RTF file, so if a different extension is provided, we convert it to the RTF format.
enableElevatedUpdateTask
booleanfalseCreate an elevated update task within Windows Task Scheduler.
bannerPath
string?nullPath to a bitmap file to use as the installation user interface banner. This bitmap will appear at the top of all but the first page of the installer.

The required dimensions are 493px × 58px.
dialogImagePath
string?nullPath to a bitmap file to use on the installation user interface dialogs. It is used on the welcome and completion dialogs. The required dimensions are 493px × 312px.
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.

See more: https://tauri.app/v1/api/config#wixlanguageconfig

Type: object

NameTypeDefaultDescription
localePath
string?nullThe path to a locale (.wxl) file. See https://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/build_a_localized_version.html.
NsisConfig

Configuration for the Installer bundle using NSIS.

Type: object

NameTypeDefaultDescription
template
string?nullA custom .nsi template to use.
license
string?nullThe path to the license file to render on the installer.
headerImage
string?nullThe path to a bitmap file to display on the header of installers pages.

The recommended dimensions are 150px x 57px.
sidebarImage
string?nullThe path to a bitmap file for the Welcome page and the Finish page.

The recommended dimensions are 164px x 314px.
installerIcon
string?nullThe path to an icon file used as the installer icon.
installMode
NSISInstallerModeviewWhether the installation will be for all users or just the current user.
languages
array?nullA list of installer languages. By default the OS language is used. If the OS language is not in the list of languages, the first language will be used. To allow the user to select the language, set display_language_selector to true.

See https://github.com/kichik/nsis/tree/9465c08046f00ccb6eda985abbdbf52c275c6c4d/Contrib/Language%20files for the complete list of languages.
customLanguageFiles
object?nullA key-value pair where the key is the language and the value is the path to a custom .nsh file that holds the translated text for tauri’s custom messages.

See https://github.com/tauri-apps/tauri/blob/dev/tooling/bundler/src/bundle/windows/templates/nsis-languages/English.nsh for an example .nsh file.

Note: the key must be a valid NSIS language and it must be added to [NsisConfig] languages array,
displayLanguageSelector
booleanfalseWhether to display a language selector dialog before the installer and uninstaller windows are rendered or not. By default the OS language is selected, with a fallback to the first language in the languages array.
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 Files folder directory requires Administrator access for the installation.

    Installer metadata will be saved under the HKLM registry 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 HKLM or HKCU registry path based on the user’s choice.

IosConfig

General configuration for the iOS target.

Type: object

NameTypeDefaultDescription
developmentTeam
string?nullThe development team. This value is required for iOS development because code signing is enforced. The TAURI_APPLE_DEVELOPMENT_TEAM environment variable can be set to overwrite it.
AndroidConfig

General configuration for the iOS target.

Type: object

NameTypeDefaultDescription
minSdkVersion
integer (format: uint32)24The minimum API level required for the application to run. The Android system will prevent the user from installing the application if the system’s API level is lower than the value specified.
UpdaterConfig

The Updater configuration object.

See more: https://tauri.app/v1/api/config#updaterconfig

Type: object

NameTypeDefaultDescription
active
booleanfalseWhether the updater is active or not.
pubkey
stringnullSignature public key.
windows
UpdaterWindowsConfigviewThe Windows configuration for the updater.
UpdaterWindowsConfig

The updater configuration for Windows.

See more: https://tauri.app/v1/api/config#updaterwindowsconfig

Type: object

NameTypeDefaultDescription
installMode
WindowsUpdateInstallModeviewThe installation mode for the update on Windows. Defaults to passive.
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.

SecurityConfig

Security configuration.

See more: https://tauri.app/v1/api/config#securityconfig

Type: object

NameTypeDefaultDescription
csp
Csp?viewThe Content Security Policy that will be injected on all HTML files on the built application. If dev_csp is not specified, this value is also injected on dev.

This is a really important part of the configuration since it helps you ensure your WebView is secured. See https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP.
devCsp
Csp?viewThe Content Security Policy that will be injected on all HTML files on development.

This is a really important part of the configuration since it helps you ensure your WebView is secured. See https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP.
freezePrototype
booleanfalseFreeze the Object.prototype when using the custom protocol.
dangerousDisableAssetCspModification
DisabledCspModificationKindfalseDisables the Tauri-injected CSP sources.

At compile time, Tauri parses all the frontend assets and changes the Content-Security-Policy to only allow loading of your own scripts and styles by injecting nonce and hash sources. This stricts your CSP, which may introduce issues when using along with other flexing sources.

This configuration option allows both a boolean and a list of strings as value. A boolean instructs Tauri to disable the injection for all CSP injections, and a list of strings indicates the CSP directives that Tauri cannot inject.

WARNING: Only disable this if you know what you are doing and have properly configured the CSP. Your application might be vulnerable to XSS attacks without this Tauri protection.
dangerousRemoteDomainIpcAccess
RemoteDomainAccessScope[]Allow external domains to send command to Tauri.

By default, external domains do not have access to window.__TAURI__, which means they cannot communicate with the commands defined in Rust. This prevents attacks where an externally loaded malicious or compromised sites could start executing commands on the user’s device.

This configuration allows a set of external domains to have access to the Tauri commands. When you configure a domain to be allowed to access the IPC, all subpaths are allowed. Subdomains are not allowed.

WARNING: Only use this option if you either have internal checks against malicious external sites or you can trust the allowed external sites. You application might be vulnerable to dangerous Tauri command related attacks otherwise.
assetProtocol
AssetProtocolConfigviewCustom protocol config.
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 as List, 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: If true, disables all CSP modification. false is 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

NameTypeDefaultDescription
scheme
string?nullThe URL scheme to allow. By default, all schemas are allowed.
domain
string (required)The domain to allow.
windows
string[] (required)The list of window labels this scope applies to.
plugins
string[][]The list of plugins that are allowed in this scope.
AssetProtocolConfig

Config for the asset custom protocol.

See more: https://tauri.app/v1/api/config#assetprotocolconfig

Type: object

NameTypeDefaultDescription
scope
FsScope[]The access scope for the asset protocol.
enable
booleanfalseEnables the asset protocol.
FsScope

Protocol 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.

    NameTypeDefaultDescription
    allow
    string[][]A list of paths that are allowed by this scope.
    deny
    string[][]A list of paths that are not allowed by this scope. This gets precedence over the Scope::allow list.
    requireLiteralLeadingDot
    boolean?nullWhether or not paths that contain components that start with a . will require that . appears literally in the pattern; *, ?, **, or [...] will not match. This is useful because such files are conventionally considered hidden on Unix systems and it might be desirable to skip them when listing files.

    Defaults to true on Unix systems and false on Windows

TrayIconConfig

Configuration for application tray icon.

See more: https://tauri.app/v1/api/config#trayiconconfig

Type: object

NameTypeDefaultDescription
id
string?nullSet an id for this tray icon so you can reference it later, defaults to main.
iconPath
string (required)Path to the default icon to use for the tray icon.
iconAsTemplate
booleanfalseA Boolean value that determines whether the image represents a template image on macOS.
menuOnLeftClick
booleantrueA Boolean value that determines whether the menu should appear when the tray icon receives a left click on macOS.
title
string?nullTitle for MacOS tray
tooltip
string?nullTray icon tooltip on Windows and macOS

BuildConfig

The Build configuration object.

See more: https://tauri.app/v1/api/config#buildconfig

Type: object

NameTypeDefaultDescription
runner
string?nullThe binary used to build and run the application.
devPath
AppUrlviewThe path to the application assets or URL to load in development.

This is usually an URL to a dev server, which serves your application assets with live reloading. Most modern JavaScript bundlers provides a way to start a dev server by default.

See vite, Webpack DevServer and sirv for examples on how to set up a dev server.
distDir
AppUrlviewThe path to the application assets or URL to load in production.

When a path relative to the configuration file is provided, it is read recursively and all files are embedded in the application binary. Tauri then looks for an index.html file unless you provide a custom window URL.

You can also provide a list of paths to be embedded, which allows granular control over what files are added to the binary. In this case, all files are added to the root and you must reference it that way in your HTML files.

When an URL is provided, the application won’t have bundled assets and the application will load that URL by default.
beforeDevCommand
BeforeDevCommand?viewA shell command to run before tauri dev kicks in.

The TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.
beforeBuildCommand
HookCommand?viewA shell command to run before tauri build kicks in.

The TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.
beforeBundleCommand
HookCommand?viewA shell command to run before the bundling phase in tauri build kicks in.

The TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.
features
array?nullFeatures passed to cargo commands.
withGlobalTauri
booleanfalseWhether we should inject the Tauri API on window.__TAURI__ or not.

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.

    NameTypeDefaultDescription
    script
    string (required)The script to execute.
    cwd
    string?nullThe current working directory.
    wait
    booleanfalseWhether tauri dev should wait for the command to finish or not. Defaults to false.

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.

    NameTypeDefaultDescription
    script
    string (required)The script to execute.
    cwd
    string?nullThe current working directory.

PluginConfig

The plugin configs holds a HashMap mapping a plugin name to its configuration object.

See more: https://tauri.app/v1/api/config#pluginconfig

Type: object


© 2023 Tauri Contributors. CC-BY / MIT