Update an Electron application
This guide connects electron-updater in your Electron application to Seatify. At the end, your application finds a new release, downloads it and installs it. Seatify applies the licensing rules of the product to each check.
Before you start
- A product with a published release. See Publish a release.
- Your application uses electron-updater, and electron-builder builds it. See the electron-builder documentation.
- For a product with the
licenseddistribution setting, your application stores the license key. See Add your application. Anopenproduct does not need a license key.
Steps
Add the feed URL
Copy the Electron address from the Distribution tab of the product in the dashboard. Add it to the publish block of electron-builder.yml:
publish:
provider: generic
url: https://dist.seatify.dev/v1/products/<product id>/electron
useMultipleRangeRequest: falseelectron-builder writes this block into your application. electron-updater adds the name of a channel file to the address, such as latest.yml. The channel file lists the newest release that the license can install. electron-updater compares that release with the version of your application.
Send the license key
Skip this step for an open product.
Send the license key in the Seatify-License-Key header. electron-updater sends the same headers when it downloads the file, so the download needs no other code.
import { autoUpdater } from "electron-updater";
autoUpdater.requestHeaders = { "Seatify-License-Key": licenseKey };
autoUpdater.checkForUpdatesAndNotify();Upload the release files
Upload the files that electron-builder writes into its output folder:
- an
.exeinstaller for Windows, - a
.zipfile for macOS. electron-updater installs a macOS update only from a.zipfile. Upload a.dmgfile too if your download page offers one. - an AppImage,
.deb,.rpmor.pacmanfile for Linux, - the
.blockmapfile of each installer. See Differential downloads.
Do not upload the .yml files. Seatify writes the channel files itself, and the dashboard refuses a .yml file.
electron-updater checks each file against its SHA-512. The dashboard computes the SHA-512 when it uploads the file. A file needs no vendor signature.
Then publish the release.
Test the feed
curl "https://dist.seatify.dev/v1/products/$PRODUCT_ID/electron/latest.yml" \
-H "Seatify-License-Key: $LICENSE_KEY"The channel file lists the newest release and its Windows installer:
version: 1.3.0
files:
- url: https://dist.seatify.dev/v1/products/<product id>/releases/1.3.0/artifacts/CIRRUS-1.3.0-x64-setup.exe
sha512: EOGAnRhwj0R0HOulkqbQcahbFFDKAN8W1mXRT14Pig3YKGlqrHoqDsGjmtVC0uGCtfpbRsbOXi1UmnGM6n6Bng==
size: 64
releaseDate: "2026-09-18T23:00:00Z"
releaseNotes: Updates through electron-updater.url is a download address of the Distribution API. It needs the license key too. Request latest-mac.yml to test macOS, and latest-linux.yml to test Linux.
Handle the answer
electron-updater reads a channel file only from an answer with the status 200. For any other status, electron-updater stops the check and emits its error event. The error holds the message of the answer, except for a 404.
| Status | Cause | What to do |
|---|---|---|
| 200 | The channel file lists the newest release and its files. | No action is needed. electron-updater compares the version and offers a newer release. |
| 400 | The constraint in the feed URL is not valid. | Correct publish.url. |
| 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 to learn the reason and show it to the user. |
| 404 | No release is available for this platform and channel. Or the newest release has no file that electron-updater installs, or it has two such files for the same architecture. | Request the channel file with curl. The message of the answer names the release and the files. |
| 429 | Your application sent too many requests. | Try again later. |
electron-updater has no answer that means “no release”. So Seatify answers 404 when no release is available for the platform and the channel. electron-updater reports every 404 with the code ERR_UPDATER_CHANNEL_FILE_NOT_FOUND, and it does not read the message of the answer.
A license that has expired under the After expiry rule that keeps access to older releases is not refused. Its channel file lists the newest release that it covers.
Architectures
electron-updater chooses the file from the list by its name.
- On a Mac with Apple silicon, it takes a
.zipfile whose name containsarm64. On an Intel Mac, it takes a.zipfile whose name does not containarm64. - On Windows and Linux, it takes the file whose name contains the architecture of the device:
x64,arm64oria32. Without such a file, it takes the first file of the list.
The default file names of electron-builder follow these rules. If you build one Windows installer for each architecture, put the architecture in the name, such as artifactName: ${productName}-${version}-${arch}-setup.${ext}.
Set the architecture of each file in the dashboard. Seatify lists a universal file first, then amd64, then the other architectures. A file without an architecture counts as universal. Two installers of the same kind for the same architecture answer 404.
On Linux, the name of the channel file names the architecture, such as latest-linux-arm64.yml. The list then holds only the files for that architecture. A file for the exact architecture wins over a universal file.
Differential downloads
electron-updater can download only the parts of an installer that changed. It reads the .blockmap file of the new installer and of the installed one. Without them, it downloads the whole installer.
- Upload the
.blockmapfile of each installer to its release. The dashboard gives a.blockmapfile no platform and no architecture. - Keep the version in the name of each installer, as electron-builder does by default. electron-updater finds the old
.blockmapfile by replacing the new version with the installed version in the address. - Keep
useMultipleRangeRequest: falsein thepublishblock. Seatify answers one range for each request.
An AppImage is always downloaded in full. Each request of a .blockmap file counts as a download.
Beta and version lines
electron-updater reads the channel file of the channel of your version. A version such as 1.3.0-beta.1 reads beta.yml. A stable version reads latest.yml. The channel file lists the newest release of that channel. See Channels. A word that is not a channel, such as nightly, reads as dev.
To let the user join the beta, set the channel at run time:
autoUpdater.channel = "beta";Setting the channel also turns on allowDowngrade of electron-updater.
To keep your application on version 2, add ?constraint=2 to publish.url. electron-updater sends it with every request. See Newest release.