# Update a Tauri application

This guide connects the updater of your Tauri application to Seatify. At the end, your application finds a new release, downloads it and installs it with `tauri-plugin-updater`. Seatify applies the licensing rules of the product to each check.

## Before you start

- A [product](../../../concepts/products/) with a published release. See [Publish a release](../../releases/publish-a-release/).
- Your application uses `tauri-plugin-updater`, and its build signs the update files. That needs `createUpdaterArtifacts`, your public key in `tauri.conf.json`, and your private key at build time. See the [Tauri updater documentation](https://v2.tauri.app/plugin/updater/).
- For a product with the `licensed` [distribution](../../../concepts/products/#distribution) setting, your application stores the license key. See [Add your application](../../licensing/add-your-application/). An `open` product does not need a license key.

## Steps

{{% steps %}}

### Add the endpoint

Copy the Tauri address from the Distribution tab of the product in the dashboard. Add it to `plugins.updater.endpoints` in `tauri.conf.json`:

```json
{
  "bundle": {
    "createUpdaterArtifacts": true
  },
  "plugins": {
    "updater": {
      "pubkey": "<your public key>",
      "endpoints": [
        "https://dist.seatify.dev/v1/products/<product id>/tauri?target={{target}}&arch={{arch}}&version={{current_version}}&bundle_type={{bundle_type}}"
      ]
    }
  }
}
```

Tauri fills in the values in double braces on each check. Keep them exactly as they are.

- `target` and `arch` choose the file for the platform and the architecture of the device.
- `version` is the version that your application runs. Seatify offers only a newer release in the same [channel](../../../concepts/releases-and-artifacts/#channels).
- `bundle_type` is the installer that your application was installed with. It chooses between an `.exe` and an `.msi` on Windows. See [Windows installers](#windows-installers).

### Send the license key

Skip this step for an `open` product.

Send the license key in the `Seatify-License-Key` header. Tauri sends the same headers when it downloads the file, so the download needs no other code.

{{< tabs >}}
{{< tab name="Rust" >}}
```rust
use tauri_plugin_updater::UpdaterExt;

let updater = app
    .updater_builder()
    .header("Seatify-License-Key", license_key)?
    .build()?;

if let Some(update) = updater.check().await? {
    update.download_and_install(|_, _| {}, || {}).await?;
    app.restart();
}
```
{{< /tab >}}
{{< tab name="JavaScript" >}}
```javascript
import { check } from "@tauri-apps/plugin-updater";
import { relaunch } from "@tauri-apps/plugin-process";

const update = await check({
  headers: { "Seatify-License-Key": licenseKey },
});

if (update) {
  await update.downloadAndInstall();
  await relaunch();
}
```
{{< /tab >}}
{{< /tabs >}}

### Upload the update files

Your build writes an update file and a `.sig` file for each platform. Upload each update file together with its `.sig` file to the release. The content of the `.sig` file becomes the [vendor signature](../../../concepts/releases-and-artifacts/#artifact-properties) of the file. The `.sig` file is not uploaded as a file of its own.

| Update file | Platform | Architecture |
| --- | --- | --- |
| `MyApp.app.tar.gz` | `darwin` | `arm64`, `amd64` or `universal` |
| `MyApp_1.2.0_amd64.AppImage` | `linux` | `amd64` |
| `MyApp_1.2.0_x64-setup.exe` | `windows` | `amd64` |
| `MyApp_1.2.0_x64_en-US.msi` | `windows` | `amd64` |

The dashboard does not recognize `MyApp.app.tar.gz` as a macOS file. Set its platform and its architecture before the upload. A name such as `MyApp-macos-aarch64.app.tar.gz` is recognized. See [Two macOS architectures](#two-macos-architectures).

A `.sig` file that you upload alone signs the file of the same name in the release. The file must not have a signature yet.

Tauri installs only a file that has a vendor signature. Seatify does not check the vendor signature. Your application checks it with the public key in `tauri.conf.json`.

Then publish the release.

### Test the endpoint

Call the endpoint with a lower version than the release. The architecture uses the names of Tauri: `x86_64`, `aarch64`, `i686` and `armv7`.

```bash
curl "https://dist.seatify.dev/v1/products/$PRODUCT_ID/tauri?target=darwin&arch=aarch64&version=1.1.0" \
  -H "Seatify-License-Key: $LICENSE_KEY"
```

The answer names the newer release and its file:

```json
{
  "version": "1.3.0",
  "notes": "Faster sync and a new dark theme.",
  "pub_date": "2026-09-26T17:34:48Z",
  "url": "https://dist.seatify.dev/v1/products/<product id>/releases/1.3.0/artifacts/MyApp-macos-aarch64.app.tar.gz",
  "signature": "<content of the .sig file>"
}
```

`url` is a download address of the Distribution API. It needs the license key too. `signature` is the vendor signature, unchanged.

When the version is current, the answer has the status 204 and no body. Tauri then reports no update.

{{% /steps %}}

## Handle the answer

Tauri reads only the status of an answer that is not 200 or 204. `check()` fails, and your application receives the error.

| Status | Cause | What to do |
| --- | --- | --- |
| 200 | A newer release has a file for the device. | Tauri downloads and installs the file. |
| 204 | Your application runs the newest version that it can install. | No action is needed. |
| 400 | The query is not valid, such as an architecture that Tauri does not use. | Correct the endpoint in `tauri.conf.json`. |
| 401 | The license key is missing on a `licensed` product, or the key is not valid. | Ask the user for a valid key. |
| 403 | Seatify refused the license, for example because it has expired or is suspended. | Call [Validate](../../../license-api/licenses/validate/) to learn the reason and show it to the user. |
| 404 | Several files of the release match, or the matching file has no vendor signature. | Correct the release. The message of the answer names the problem. |
| 429 | Your application sent too many requests. | Try again later. |

A license that has expired under the [After expiry](../../../concepts/policies/#after-expiry) rule that keeps access to older releases is not refused. It is offered the newest release that it covers, or no update.

## Windows installers

Tauri installs an update on Windows from either the NSIS `.exe` or the `.msi`. Version 2.10 of `tauri-plugin-updater` and later versions report the installer in `bundle_type`. The endpoint then chooses the matching file. A release can ship both installers.

An older plugin does not report the installer. A release that ships both installers then answers 404. Choose one of these:

- Ship one Windows installer in each release.
- Add `&filetype=exe` or `&filetype=msi` to the endpoint in `tauri.windows.conf.json`. Tauri uses that file only for Windows builds. Do not add the filetype to `tauri.conf.json`, because it applies to every platform. A macOS check would then find no file and report no update.

## Two macOS architectures

Tauri names the macOS update file `MyApp.app.tar.gz` for every architecture. Two files in one release cannot have the same name.

- Build a universal application. One file with the architecture `universal` serves both `aarch64` and `x86_64`.
- Or rename both files before the upload, such as `MyApp-macos-aarch64.app.tar.gz` and `MyApp-macos-x86_64.app.tar.gz`. Rename each `.sig` file in the same way, such as `MyApp-macos-aarch64.app.tar.gz.sig`. The signature stays valid after a rename.

## Beta and version lines

The endpoint stays in the channel of the version that your application runs. A beta build is offered beta, release candidate and stable releases. A stable build is offered only stable releases. See [Channels](../../../concepts/releases-and-artifacts/#channels).

- Add `&channel=beta` to the endpoint to offer beta releases to a stable build.
- Add `&constraint=2` to keep your application on version 2. See [Newest release](../../../concepts/releases-and-artifacts/#newest-release).

The endpoint in `tauri.conf.json` is fixed at build time. To let the user choose the channel, set the endpoint at run time with `endpoints` on the updater builder in Rust.

## Next steps

- [Publish a release](../../releases/publish-a-release/)
- [Updates and download links](../../releases/updates-and-download-links/)
- [Releases and artifacts](../../../concepts/releases-and-artifacts/)
- [Validate a license](../../../license-api/licenses/validate/)

