---
title: "Auto-updates for Sparkle, electron-updater and Tauri, for paying customers only · Clavem"
description: "Point Sparkle, electron-updater or the Tauri updater at a Clavem feed. Your app updates itself, and only buyers with a valid license get the update."
url: "https://clavem.io/docs/updates"
---

Documentation

# Auto-updates

Point your app's updater at Clavem. It updates itself, and only for buyers whose license is valid.

## How it works

1. **You publish a release with its files.** As in [releases and downloads](https://clavem.io/docs/files). Each file has a platform, so the feed knows which one to offer.
2. **You copy the hash or signature from your build tools.** electron-updater checks a SHA-512, Sparkle and Tauri check a signature. Clavem stores them and never holds your signing key.
3. **Your app's updater reads a Clavem feed.** It sends the buyer's license key in the `X-License-Key` header.
4. **A valid key gets the newest release.** The feed links to the file with a signed link that lasts one hour. Without a valid key, the updater sees no update.

Every feed serves the newest published release, the same one [`GET /v1/releases/:productId/latest`](https://clavem.io/docs/files#updates) returns. With an [update period](https://clavem.io/docs/update-period), a license whose updates ended gets the newest release published before that day, so its updater sees no newer update. A key is valid when it belongs to a license of this product that is neither disabled nor expired, trial licenses included. `75` in the examples is the product id: copy the real addresses from the product's **Releases** tab.

| Updater | Feed |
| --- | --- |
| Sparkle (macOS) | `https://clavem.io/v1/updates/75/appcast.xml` |
| electron-updater, generic provider | `https://clavem.io/v1/updates/75`. It reads `latest-mac.yml`, `latest.yml` (Windows) or `latest-linux.yml` under it. |
| Tauri v2 | `https://clavem.io/v1/updates/75/tauri/{{target}}/{{arch}}/{{current_version}}` |

Send the key in the header. If your setup cannot set headers, add `?license_key=…` to the feed address instead. A key in a URL can end up in logs, so use it only as a fallback.

## Set up a release

1. Create a release and upload its files in the product's **Releases** tab, with the Admin API or with MCP.
2. Give each file a platform. Sparkle and electron-updater use `macos`, `windows` and `linux`. Tauri asks for target and architecture, such as `darwin-aarch64`; see [Tauri](https://clavem.io/docs/updates#tauri). A file with no platform is offered to every platform.
3. Open **Update info** next to the file and paste its SHA-512 or signature. The sections below say where each one comes from.
4. Publish the release. The feeds serve it from then on.

A feed leaves out a value you have not set. The electron-updater feeds list only files with a SHA-512, because electron-updater refuses a feed in which any file has none, and the Tauri feed skips a file without a signature. Sparkle and Tauri refuse an update without a signature, and electron-updater needs the SHA-512 to check the download, so set them before you publish.

## Sparkle

Set the appcast as `SUFeedURL` in your `Info.plist`, then send the license key as a header on every check. Sparkle 2 has `httpHeaders` on its updater for this.

Info.plist

```
<key>SUFeedURL</key>
<string>https://clavem.io/v1/updates/75/appcast.xml</string>
<key>SUPublicEDKey</key>
<string>YOUR-PUBLIC-ED-KEY</string>
```

Updater.swift

```
import Sparkle

let updaterController = SPUStandardUpdaterController(startingUpdater: true, updaterDelegate: nil, userDriverDelegate: nil)

// Call this at launch and again whenever the buyer enters a new key.
func sendLicenseKey(_ licenseKey: String) {
    updaterController.updater.httpHeaders = ["X-License-Key": licenseKey]
}
```

Upload the `.zip` or `.dmg` with platform `macos`. Sign it with Sparkle's `sign_update` tool and paste the `sparkle:edSignature` value as the file's signature. The private key stays in your keychain. Set **Minimum macOS** if the build needs a newer system than your last one; Sparkle then skips the update on older Macs.

Terminal

```
$ ./bin/sign_update Inkwell-1.4.0.zip
sparkle:edSignature="pVYfU2fzjvE4i2Sc5Nqlv2ztuDsDXnE9pQwX5lF6KZlx0Sn3QvXk2bSxIjk3sWm3n2FzhP2h0mUAc1J6x0OdCw==" length="48213004"
```

With a valid key, the appcast has one item: the newest release.

appcast.xml 200 OK

```
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Inkwell</title>
    <item>
      <title>Version 1.4.0</title>
      <pubDate>Thu, 26 Nov 2026 15:48:30 GMT</pubDate>
      <sparkle:version>1.4.0</sparkle:version>
      <sparkle:shortVersionString>1.4.0</sparkle:shortVersionString>
      <sparkle:minimumSystemVersion>13.0</sparkle:minimumSystemVersion>
      <description><![CDATA[Fixes a crash when importing large files.]]></description>
      <enclosure url="https://clavem.io/d/88?exp=1795800000&amp;sig=…" length="48213004" type="application/octet-stream" sparkle:edSignature="pVYfU2fz…"/>
    </item>
  </channel>
</rss>
```

When a release has several macOS files, the feed takes a signed `.zip`, `.dmg`, `.tar.xz` or `.pkg` first. The release notes appear as the item's description, as plain text with its line breaks.

## electron-updater

Use the generic provider with the product's feed address, and send the key with `requestHeaders`. electron-updater appends `latest-mac.yml`, `latest.yml` or `latest-linux.yml` to the address by itself.

main.js

```
// Main process. npm install electron-updater
const { autoUpdater } = require('electron-updater');

autoUpdater.setFeedURL({ provider: 'generic', url: 'https://clavem.io/v1/updates/75' });
autoUpdater.requestHeaders = { 'X-License-Key': licenseKey };

// Without a valid key the feed answers 404: electron-updater reports it here and does not crash.
autoUpdater.on('error', (err) => console.warn('Update check failed:', err.message));
autoUpdater.checkForUpdatesAndNotify();
```

Build as usual. If you set the generic provider in `electron-builder.yml`, the address is also baked into the app as its default. On macOS, build a `zip` as well as the `dmg`: electron-updater installs from the zip.

electron-builder.yml

```
# electron-builder.yml
mac:
  target: [dmg, zip]   # electron-updater installs from the zip
publish:
  provider: generic
  url: https://clavem.io/v1/updates/75
```

Upload the files from `dist/` with their platform, then copy each file's `sha512` from the `latest-mac.yml`, `latest.yml` or `latest-linux.yml` that electron-builder wrote next to them. You do not upload those yml files: Clavem writes its own, with signed links.

latest-mac.yml 200 OK

```
version: "1.4.0"
files:
  - url: "https://clavem.io/d/89?exp=1795800000&sig=…"
    sha512: "lN19lTOC5I37/EkvLSRpArNFlVx29MH7A3b8iiHURymKbbY/4h3Jsy2kEFl8Zqnfimz0co8WQ9VmctfriGFSQA=="
    size: 48213004
  - url: "https://clavem.io/d/88?exp=1795800000&sig=…"
    sha512: "rD1PIJKm6TFwJgToK618gCQ6Nz2w2aRgRyqirOT2mi/NeCCfzmour/YKQopXxYg5T4SlBjy2/LKWR3SXWN5L4A=="
    size: 52428800
path: "https://clavem.io/d/89?exp=1795800000&sig=…"
sha512: "lN19lTOC5I37/EkvLSRpArNFlVx29MH7A3b8iiHURymKbbY/4h3Jsy2kEFl8Zqnfimz0co8WQ9VmctfriGFSQA=="
releaseDate: "2026-11-26T15:48:30.220Z"
releaseNotes: "Fixes a crash when importing large files."
```

On macOS the `.zip` comes first and is the `path`. On Windows the `.exe` comes first, and on Linux the `.AppImage`. Files with no platform are listed after them.

## Tauri

Add the feed as the updater endpoint. Tauri fills in `{{target}}`, `{{arch}}` and `{{current_version}}` itself. Pass the license key as a header to `check()`.

tauri.conf.json

```
// src-tauri/tauri.conf.json
{
  "bundle": { "createUpdaterArtifacts": true },
  "plugins": {
    "updater": {
      "pubkey": "YOUR-TAURI-PUBLIC-KEY",
      "endpoints": ["https://clavem.io/v1/updates/75/tauri/{{target}}/{{arch}}/{{current_version}}"]
    }
  }
}
```

update.ts

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

const update = await check({ headers: { 'X-License-Key': licenseKey } });
if (update) {
  await update.downloadAndInstall();
  await relaunch();
}
```

With `createUpdaterArtifacts` on, the Tauri bundler writes an update bundle and a `.sig` file next to it. Upload the bundle with the platform Tauri asks for, and paste the contents of the `.sig` file as its signature.

| Platform | Bundle |
| --- | --- |
| `darwin-aarch64` `darwin-x86_64` | `.app.tar.gz` |
| `windows-x86_64` | the NSIS `-setup.exe` or the `.msi` |
| `linux-x86_64` | `.AppImage` |

The feed serves only a file with exactly that platform and a signature. A file for the whole system (`macos`) or with no platform is never sent to Tauri, because it would not be Tauri's own signed bundle and the update would fail on the customer's computer. Without a match the answer is "no update". A universal macOS bundle is uploaded once for each label, `darwin-aarch64` and `darwin-x86_64`.

When the release is newer than the app's version, the answer is `200` with the update. Versions are compared as semantic versions, and a leading `v` is ignored. If either is not a semantic version, any difference counts as newer. The same or an older version gets `204`, which Tauri reads as "no update".

Response 200 OK

```
{
  "version": "1.4.0",
  "notes": "Fixes a crash when importing large files.",
  "pub_date": "2026-11-26T15:48:30.220Z",
  "url": "https://clavem.io/d/90?exp=1795800000&sig=…",
  "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkK…"
}
```

## Without a valid key

No key, a wrong key, a key of another product and a disabled or expired license are all treated the same. For Sparkle and Tauri the answer is exactly what "no update" looks like, so nobody can test keys against a feed.

- **Sparkle** gets an appcast with no item, and tells the user they are up to date.
- **Tauri** gets `204`, and `check()` returns `null`.
- **electron-updater** gets `404` with a short JSON error. It reports an `error` event and does not crash. Listen for it, as in the example above, and show your renew screen if you like.

appcast.xml without a valid key 200 OK

```
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Updates</title>
  </channel>
</rss>
```

latest-mac.yml without a valid key 404 Not Found

```
{
  "error": {
    "code": "no_update",
    "message": "No update for this license key. Send a valid license key of this product in the X-License-Key header."
  }
}
```

Try a feed from a terminal with a key of your own:

Terminal

```
curl -i "https://clavem.io/v1/updates/75/latest-mac.yml" -H "X-License-Key: YOUR-LICENSE-KEY"
```

## Email buyers about an update

Apps with an updater find a new version by themselves. For everyone else, Clavem can email your buyers when you publish one. You choose it for each release, when you publish it: tick **Email buyers about this update** in the publish dialog, or send `notify_buyers: true` together with `published: true` through the Admin API or MCP. Publishing without it emails nobody.

- **Who gets it:** every customer with at least one license of the product that is not disabled, not expired, not test mode and not a trial. One email per customer, however many licenses they hold. The dialog, and `notify_recipients` in the API, say how many that is before you publish.
- **What it says:** "Focus Timer 2.0.0 is available", the release notes (very long notes are cut, with a link to read the rest), and a **Download the update** button to the buyer's own order page. A license without an order, such as an imported one, links to the product's license page instead. It comes from your store name, and replies go to your support email.
- **Once only.** A release is announced at most once. Publishing again, or unpublishing and publishing, never sends it a second time. The release then shows when buyers were emailed and how many emails went out.
- **Sending:** the first emails go out right away and the rest in batches every hour, at most 5,000 update emails per account a day. Unpublishing the release stops the emails that were not sent yet, and they do not resume. It needs your own email address to be confirmed.
- **Opting out:** every email has a link that stops update emails from your store for that buyer, with no sign-in, and the standard one-click unsubscribe header for mail apps. Emails about their purchases, such as their license key, are not affected.

Publish and email buyers

```
curl -X PATCH https://clavem.io/v1/admin/releases/42 \
  -H "Authorization: Bearer sk_clavem_…" \
  -H "Content-Type: application/json" \
  -d '{ "published": true, "notify_buyers": true }'
```

## Dashboard, API and MCP

The dashboard, the Admin API and MCP do the same things, with the same rules.

| What | Dashboard | Admin API | MCP tool |
| --- | --- | --- | --- |
| Feed addresses | Product, **Releases**, **Update feeds** | [`GET /v1/admin/products/:id/update-feeds`](https://clavem.io/docs/api#management-update-feeds) | `get_update_feeds` |
| SHA-512, signature and minimum macOS of a file | **Update info** next to the file | [`PATCH /v1/admin/files/:id`](https://clavem.io/docs/api#management-files-update) | `set_file_update_info` |
| Upload and publish | The **Releases** tab | [Releases and files](https://clavem.io/docs/api#management-releases) | `create_release`, `get_upload_instructions`, `update_release` |
| Email buyers about a release | **Publish**, then **Email buyers about this update** | [`PATCH /v1/admin/releases/:id`](https://clavem.io/docs/api#management-releases) with `notify_buyers` | `update_release` with `notify_buyers` |

Set a file's SHA-512

```
curl -X PATCH https://clavem.io/v1/admin/files/89 \
  -H "Authorization: Bearer sk_clavem_…" \
  -H "Content-Type: application/json" \
  -d '{ "sha512": "lN19lTOC5I37/EkvLSRpArNFlVx29MH7A3b8iiHURymKbbY/4h3Jsy2kEFl8Zqnfimz0co8WQ9VmctfriGFSQA==" }'
```

Send `null` or an empty string to clear a value. A change is recorded in the activity feed.

## Limits

- **One release per feed:** the newest published one. There are no beta channels or staged rollouts yet.
- **Full updates only.** No delta updates, no Squirrel.Windows `RELEASES` file and no MSIX.
- **Download links last one hour.** Every updater reads its feed right before it downloads, so that is enough.
- **No caching.** Every answer has `Cache-Control: no-store`, so a withdrawn release disappears from the feeds at once.
- **Rate limit:** 120 requests a minute per IP address, shared with the releases endpoint and counted separately from license validation.
- **Downloads are never metered**, on every plan.

[Releases and downloads](https://clavem.io/docs/files) · [API reference](https://clavem.io/docs/api#update-feeds) · [MCP server](https://clavem.io/docs/mcp)
