Skip to content
Tutorials Center
My learning

Topics

Lesson 35 of 39 ยท Testing and Updates

The Tauri Updater and Release Workflow

Add in-app updates with the Tauri updater plugin: generate signing keys, configure endpoints, write latest.json, check and install updates from JavaScript, and release safely, with runnable stand-ins.

Shipping version 1.0 is the beginning. Bugs appear, features grow, and security fixes cannot wait for users to remember to visit your website. The Tauri updater plugin lets an installed app check a URL, download a newer version, verify that it really came from you, install it and restart. Updates are always signed: Tauri does not let you switch the signature check off.

This lesson walks through the whole path: the signing keys, the app configuration, the manifest the server returns, the JavaScript that drives the update, and a safe release routine. It builds on Bundling and Installers and the supply-chain thinking in The Tauri Security Model.

Real versus stand-in. The bash, json, rust and ts blocks are real Tauri 2 code. Tauri's updater uses minisign-style signatures; the runnable blocks use Node's built-in Ed25519 and a simple version comparison to model the same ideas.

How an update works

sequenceDiagram
  participant App as Installed app (v1.2.0)
  participant Srv as Update server
  App->>Srv: GET latest.json (platform, arch, current version)
  Srv-->>App: version 1.3.0, url, signature, notes
  App->>App: is 1.3.0 newer than 1.2.0?
  App->>Srv: download the update bundle
  App->>App: verify signature with the public key inside the app
  App->>App: install, then relaunch

The public key is baked into the app. Only someone with your private key can produce an update the app will accept.

Step 1: generate the signing key pair

Terminal
npm run tauri signer generate -- -w ~/.tauri/notes.key

This writes a private key (notes.key) and a public key (notes.key.pub). The private key signs every release; keep it secret and backed up, with a password. If you lose it you can never publish an update that existing installs accept, and if it leaks, anyone can send your users malware. Store it in your CI secret store, never in the repository.

Step 2: configure the app

Terminal
npm run tauri add updater
npm run tauri add process
JSON
{
  "bundle": {
    "createUpdaterArtifacts": true
  },
  "plugins": {
    "updater": {
      "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6...",
      "endpoints": [
        "https://releases.example.com/notes/{{target}}/{{arch}}/{{current_version}}"
      ],
      "windows": { "installMode": "passive" }
    }
  }
}
  • pubkey is the contents of the .pub file.
  • endpoints are URLs tried in order. The placeholders {{target}} (linux, windows, darwin), {{arch}} (x86_64, aarch64...) and {{current_version}} let a dynamic server answer per client. Production endpoints must use HTTPS.
  • createUpdaterArtifacts makes tauri build produce the signed update files (.sig next to each bundle).
  • installMode on Windows: passive shows a progress bar, basicUi asks the user, quiet is silent.

Register the plugins in Rust (desktop only) and grant permissions:

Rust
#[cfg(desktop)]
{
    builder = builder
        .plugin(tauri_plugin_updater::Builder::new().build())
        .plugin(tauri_plugin_process::init());
}
JSON
{ "permissions": ["updater:default", "process:allow-restart"] }

Step 3: build a signed release

Set the private key in the environment for the build, then build as usual:

Terminal
export TAURI_SIGNING_PRIVATE_KEY="$(cat ~/.tauri/notes.key)"
export TAURI_SIGNING_PRIVATE_KEY_PASSWORD="..."
npm run tauri build

You get installers plus update artifacts: for example Notes_1.3.0_x64-setup.exe and Notes_1.3.0_x64-setup.exe.sig on Windows, or Notes.app.tar.gz and .sig on macOS, and the .AppImage plus .sig on Linux.

Step 4: publish the manifest

A static host can serve one JSON file, usually named latest.json. With the simple static approach the endpoint is https://releases.example.com/notes/latest.json:

JSON
{
  "version": "1.3.0",
  "notes": "Faster search and a new dark theme.",
  "pub_date": "2026-11-12T09:00:00Z",
  "platforms": {
    "windows-x86_64": {
      "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXk...",
      "url": "https://releases.example.com/notes/1.3.0/Notes_1.3.0_x64-setup.exe"
    },
    "darwin-aarch64": {
      "signature": "...",
      "url": "https://releases.example.com/notes/1.3.0/Notes.app.tar.gz"
    },
    "linux-x86_64": {
      "signature": "...",
      "url": "https://releases.example.com/notes/1.3.0/notes_1.3.0_amd64.AppImage"
    }
  }
}

signature is the content of the .sig file, not a URL. If you build with tauri-action on GitHub, it uploads the artifacts to a GitHub release and generates latest.json for you; then point endpoints at https://github.com/<you>/<repo>/releases/latest/download/latest.json.

A dynamic server may instead answer 204 No Content when there is no update, or return the JSON for just that client.

Node.js Stand-in: decide whether an update is available

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

Step 5: check and install from the app

TypeScript
import { check } from '@tauri-apps/plugin-updater';
import { relaunch } from '@tauri-apps/plugin-process';

export async function updateApp(onProgress: (percent: number) => void) {
  const update = await check();
  if (!update) return false; // already up to date

  console.log(`found ${update.version} (current ${update.currentVersion})`, update.body);

  let total = 0;
  let received = 0;
  await update.downloadAndInstall((event) => {
    if (event.event === 'Started') total = event.data.contentLength ?? 0;
    if (event.event === 'Progress') {
      received += event.data.chunkLength;
      if (total) onProgress(Math.round((received / total) * 100));
    }
    if (event.event === 'Finished') onProgress(100);
  });

  await relaunch();
  return true;
}

Good update manners: check on startup in the background (not blocking the UI), tell the user what is new, let them choose when to restart if they have unsaved work, and handle errors (offline, server down) silently or with a gentle message. check() throws on network or signature problems, so wrap it in try/catch.

Why signatures protect users

The updater verifies the downloaded file against the signature using the public key built into the installed app. A man-in-the-middle, a compromised server or a hijacked download link cannot create a valid signature without your private key. The stand-in below uses Ed25519 from Node's crypto module to show the same principle: tampering with even one byte makes verification fail.

Node.js Stand-in: sign and verify an update file

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

A release routine

  1. Update the version in tauri.conf.json (and Cargo.toml/package.json if you keep them in sync), and write the changelog.
  2. Merge to main, then tag: git tag v1.3.0 && git push --tags.
  3. CI builds all platforms with the signing key from secrets and uploads a draft release with latest.json (CI matrix).
  4. Install the draft's build on a clean machine and test the update path from the previous version: the updater itself is something you must test.
  5. Publish the release. Roll out gradually if your server supports it, and keep the previous version's manifest handy to roll back by re-pointing latest.json.
  6. Never change the pubkey casually: apps already installed trust only the old key. Plan a key rotation as a dedicated release signed with the old key that ships the new one.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does the public key in the app configuration do?

    The app uses the embedded public key to verify that an update was signed with your private key.
  2. 2. What happens if you lose the private signing key?

    Installed apps only trust the public key they ship with, so losing the private key strands them.
  3. 3. What goes into the signature field of latest.json?

    The manifest contains the signature text itself, generated at build time next to each bundle.
  4. 4. Which config key makes tauri build produce signed update artifacts?

    With createUpdaterArtifacts enabled and the private key in the environment, the bundler creates the update files and signatures.

Summary

  • The updater plugin checks an endpoint, downloads, verifies a signature with the embedded public key, installs and relaunches.
  • Generate a key pair with tauri signer generate; protect the private key and give the build TAURI_SIGNING_PRIVATE_KEY.
  • Configure pubkey, HTTPS endpoints and createUpdaterArtifacts; publish latest.json or let tauri-action do it.
  • Use check(), downloadAndInstall() and relaunch() with good UX, and test the update path before publishing.

Next: Project: A Markdown Notes App