Skip to main content
Automatic updates read a small file called latest.json and download the setup file it points to. There’s no update server to run: any place that serves files over https works. This page covers GitHub releases, your own hosting, and a few special setups.

GitHub releases

For a public repository:
bach.toml
Installed apps then read: So each release needs the tag v<version>, the setup file and latest.json. The release workflow or the Bach GitHub Action publishes exactly that. Two details:
  • GitHub renames uploaded files with spaces or unusual characters. With github set, Bach already names the file the way GitHub will serve it, so Hello Notes becomes Hello-Notes-Setup-1.1.0.exe.
  • A pre-release isn’t GitHub’s “latest”, so installed apps don’t update to it. The same is true for a release you publish with “latest” turned off.
A private repository can’t serve updates, because the installed app has no GitHub login. Use another host, or see Private updates.

Your own web host

Cloudflare R2, S3, Netlify, a plain web server: anything that serves two files at fixed addresses.
bach.toml
After bach build, upload the setup file and latest.json from dist/. {version} can also be used in download_url, for example to keep each version in its own folder.

Writing the feed yourself

bach build writes the feed when it knows the download address. To write it again, for example after signing:
The address comes from bach.toml, or pass --url. --notes-file reads release notes from a file. See bach feed.

Mirrors

A mirror is a second copy of the feed on another host, used when the first one can’t be reached:
bach.toml
Write the mirror’s feed with its own download address:
The first feed that answers decides which version is newest. A mirror can’t announce a newer version when the main feed answers; it only offers another place to download the same file. When the main feed is down, the app trusts the first mirror that answers, so only list hosts you control, and consider signing your feed.

Private updates

If only paying or approved users may download updates, use an access key. The installed app sends the key it was installed with as Authorization: Bearer <key>, and your server decides:
bach.toml
The key is only sent to the host of feed. Put your downloads on that same host. A redirect to another host, such as a storage bucket’s signed link, is followed without the key.

ARM64 and macOS in the same feed

If your bach.toml has [arch.arm64], bach build writes an x64 and an ARM64 setup file, and one feed listing both. Each computer takes the file for its processor. If the ARM64 entry is missing or invalid, ARM64 computers take the x64 file, which also runs there. With a [macos] section, the same feed also lists the Mac file. A Mac only takes the macOS entry, and Windows computers ignore it. Build both in one run so the feed has both, or add one later with bach feed ... --macos <file>. Upload every file the feed lists.

The online installer

An online installer downloads the newest version from the same feed when someone runs it, so new users get the latest release without you changing your download link. See Other builds.