Where to Host electron-builder Updates: GitHub Releases, S3, R2, Keygen or a Generic Server in Front of Private Releases
The first entry in electron-builder's publish list becomes the update server baked into every install. Picking it is a hosting decision you live with for years. Here is what each provider means for tokens, private releases, channels and leaving later.
electron-builder's publish option accepts Keygen, a generic server, GitHub, S3, DigitalOcean Spaces, Cloudflare R2 and the Snap Store. Order matters: the first provider is written into app-update.yml inside the packaged app and becomes the server every installed copy polls. Since v27, publishing never happens implicitly; you request it with --publish or the publish option. Code signing is required for auto-updates on macOS, and the zip target must be built so latest-mac.yml exists.
1. The providers side by side
| Provider | Where files live | Private builds | What you run |
|---|---|---|---|
| GitHub | GitHub releases in your repository | private: true with a GH_TOKEN at runtime, which each install then carries | Nothing; subject to GitHub API limits |
| S3 / Spaces / R2 | A bucket you own | Bucket policy or signed URLs that you build | Bucket, CDN and upload credentials in CI |
| Keygen | Keygen's distribution API | Update requests authenticated with the licensee's key or token (unless the product is OPEN) | A Keygen account |
| Generic | Any HTTPS URL | Whatever the server enforces | electron-builder does not upload; you place the files |
| Generic → ReleaseFlow | Your GitHub releases, public or private | ReleaseFlow fetches private assets server-side; no token in the app | Nothing; publish to GitHub as usual |
2. Tokens in app-update.yml are readable by anyone
electron-builder writes every option of the first provider except awsCredentials into app-update.yml in plain text, and its documentation warns never to put a token in the publish configuration. For private GitHub repositories that leaves a runtime GH_TOKEN, which still ends up on every customer's machine. A generic provider that points at a server you control avoids this: the app knows only a URL, and the server holds the credentials.
3. A generic feed in front of GitHub releases
ReleaseFlow is one such server. You keep publishing to GitHub with provider: github in CI, and the packaged app uses the generic provider pointed at the ReleaseFlow update route. electron-updater requests latest.yml, latest-mac.yml or latest-linux.yml and the installer relative to that URL; ReleaseFlow resolves them against the latest enabled release and serves the yml files unchanged, so sha512 verification still applies. Add ?channel=beta for beta builds and ?arch=arm64 or ?arch=x64 when you ship per-architecture builds.
# electron-builder.yml (CI uploads to GitHub releases)
publish:
provider: github
mac:
target: [dmg, zip]
# main process (installed app polls a generic URL)
# autoUpdater.setFeedURL({
# provider: "generic",
# url: "https://releaseflow.net/{username}/{slug}/update/darwin/1.4.0?channel=beta",
# });This is not free of trade-offs. electron-updater's staged rollouts are set by a stagingPercentage field you add to latest.yml (and re-sign if you sign manifests); ReleaseFlow passes the file through as published, but has no rollout controls of its own. If you need regional CDN behaviour you configure yourself, a bucket on S3 or R2 gives more control. And if every customer must hold a license before an update can even be downloaded, Keygen authenticates update requests with the licensee's key or token; ReleaseFlow gates the app at runtime with license checks instead.
- Open-source app with public releases: GitHub directly is enough.
- You already run infrastructure and want full CDN control: S3, Spaces or R2.
- Update downloads must require a license key or token: Keygen.
- Private repository, no token in the app, no server to run: generic provider pointed at ReleaseFlow.
- Whatever you choose, keep the first provider stable; changing it later needs one release that ships the new URL.
Ship your Mac or Electron app with a single git tag.
Permanent OS-aware download links, cached Sparkle & Electron auto-update feeds, Polar/Stripe PPP checkout, and license keys — with 0% cut on your sales.