Skip to content

Latest commit

Β 

History

History
100 lines (66 loc) Β· 8.04 KB

TAURI-UPDATER.md

File metadata and controls

100 lines (66 loc) Β· 8.04 KB

Tauri auto-update & signing (v1.2.1+)

The desktop app ships with tauri-plugin-updater registered in src-tauri/src/lib.rs. Configuration lives in src-tauri/tauri.conf.json under plugins.updater.

v1.9 frontend: Settings β†’ About shows TauriUpdaterBanner when running inside Tauri (hooks/useTauriUpdater.ts). Users can check for updates and install without leaving the app (calls @tauri-apps/plugin-updater + @tauri-apps/plugin-process for relaunch).

Documentation: Full .md index β†’ README.md Β§ Documentation Hub.

Enable updates for end users

  1. Generate a minisign key pair (once per product line β€” store the private key as a GitHub secret; never commit it):

    pnpm exec tauri signer generate -- -w ~/.worldscript-tauri.key

    Paste the public key string into tauri.conf.json β†’ plugins.updater.pubkey (replace the placeholder).

  2. Set plugins.updater.active to true after you publish signed update metadata (latest.json) with each release.

  3. CI signing β€” the Tauri workflow passes optional secrets (see .github/workflows/tauri-build.yml):

    • TAURI_SIGNING_PRIVATE_KEY β€” private key material for signing bundles / updater artifacts.
    • TAURI_SIGNING_PRIVATE_KEY_PASSWORD β€” password for the key file, if used.
  4. Endpoints β€” the only endpoint is the GitHub Releases URL releases/latest/download/latest.json. The release job generates that file with scripts/release-assets-guard.mjs and uploads it as a release asset. The former GitHub Pages mirror was never produced and answered 404, so it was removed (#1214). A second endpoint may be added only together with a release step that publishes a guard-validated manifest there. tests/unit/tooling/updaterEndpoints.test.ts and src-tauri/tests/updater_config.rs pin the list. Endpoints must use HTTPS.

GitHub Secrets checklist

Set these in Settings β†’ Secrets and variables β†’ Actions before the first signed release:

Required for all platforms

Secret Value
TAURI_SIGNING_PRIVATE_KEY Output of pnpm exec tauri signer generate β€” the private key string (starts with untrusted comment:)
TAURI_SIGNING_PRIVATE_KEY_PASSWORD Password used when generating the key, or empty string if none

macOS code signing & notarization

Secret Value
APPLE_CERTIFICATE Base64-encoded .p12 Developer ID Application certificate
APPLE_CERTIFICATE_PASSWORD Password for the .p12 file
APPLE_SIGNING_IDENTITY Certificate Common Name, e.g. Developer ID Application: Acme Corp (TEAMID)
APPLE_ID Apple ID email used for notarization
APPLE_PASSWORD App-specific password generated at appleid.apple.com
APPLE_TEAM_ID 10-character Apple team ID shown in the Developer portal

macOS signing is skipped automatically if APPLE_CERTIFICATE is not set (the workflow uses if: env.APPLE_CERTIFICATE != ''). Add the conditional to the workflow step when ready.

Windows Authenticode signing (optional)

Windows signing requires an Authenticode certificate from a CA (e.g. DigiCert, Sectigo). The exact secret names depend on the signing tool configured in the workflow. Common pattern with signtool:

Secret Value
WINDOWS_CERTIFICATE Base64-encoded .pfx certificate file
WINDOWS_CERTIFICATE_PASSWORD Password for the .pfx file

Add the signing step to the Windows matrix leg in .github/workflows/tauri-build.yml when you have a certificate.

Code signing (Windows / macOS)

Status: not available, deferred (#574, maintainer decision 2026-11-11). No Apple Developer ID, notarization or Authenticode credentials exist, and their absence does not block a release. Updater signatures, signed tags, asset digests, notices and the SBOM stay required. Re-enable this section when the credentials verifiably exist or the policy changes.

  • Windows: Authenticode signing in CI (certificate in secrets) β€” configure via environment variables expected by your signing tool / Tauri bundler; document the exact variable names your certificate provider uses.
  • macOS: Apple Developer ID + codesign + notarization β€” typically requires APPLE_* secrets and is configured outside this repo's defaults.

Version binding and rollback trust (#1215)

What the client trusts:

  • The signature, not the manifest. latest.json is not signed. The client trusts a payload only if its minisign signature verifies against plugins.updater.pubkey.
  • The signed version. The Tauri signer writes the app version into the signature's trusted comment (timestamp:…<TAB>file:…<TAB>version:1.29.5). The global signature covers that comment.
  • requireSignedVersion: true. The client rejects a payload whose signature binds no version, or a version other than the one the manifest announces. Without the flag, an unbound signature would still pass. Every release up to v1.29.2 is signed without a version, so a manipulated manifest could otherwise announce a new version number and serve one of those older, validly signed packages.
  • allowDowngrades stays off. The client installs only a version newer than the running one.

What the release enforces:

  • scripts/release-assets-guard.mjs reads every updater signature the way the client does: the third line of the decoded signature, then its first tab-separated version: field.
  • The release fails before publishing unless each signature binds exactly the release version.
  • src-tauri/tests/updater_config.rs deserializes plugins.updater with the plugin's own Config, so a misspelt flag cannot ship silently.

Installer-specific entries (#1248):

  • The client looks up {os}-{arch}-{installer} before {os}-{arch}, using the bundle type compiled into the installed binary.
  • latest.json therefore carries linux-x86_64-deb, linux-x86_64-rpm and windows-x86_64-msi, each pointing at that release's signed .deb, .rpm or .msi.
  • The generic linux-x86_64 (AppImage), windows-x86_64 (NSIS), darwin-aarch64 and darwin-x86_64 entries serve every other install.
  • Before v1.29.6 the per-installer entries were missing. .deb and .rpm installs were offered the AppImage, which their installer rejects, and MSI installs were offered the NSIS installer.

Rollback:

  • Fix forward. Clients never step back to an older version. To withdraw a bad release, publish a new, higher version with the fix.
  • No re-signing. Old releases are not re-signed with a version. Clients that enforce the binding simply never accept them.
  • Older clients do not set the flag, so they accept an unbound signature until they update. Beyond that, it depends on the updater plugin they ship:
    • v1.29.2 to v1.29.5 (tauri-plugin-updater 2.12.0 and 2.14.1) still reject a signed version that differs from the announced one;
    • v1.29.1 and earlier (2.11.0 and older) do not compare the signed version at all.
  • OS-level code signing and notarization are a separate trust layer, tracked in #574.

See also docs/TAURI-CI.md for the release artifact pipeline and first-release checklist.