Electron electron-updater on Private GitHub Releases Without Rate Limits
Shipping commercial Electron apps from a private GitHub repository breaks the default GitHub updater provider. Here is the clean architecture using generic provider feeds, SHA-512 base64 checks, and cached update proxies.
Every paid Electron app hits the same wall right before launch: your source code lives in a private GitHub repository, you run electron-builder, and electron-updater immediately throws HTTP 404 when checking for updates.
1. Why you must NEVER embed GH_TOKEN inside your Electron app
Stack Overflow answers routinely suggest bundling a read-only GitHub Personal Access Token inside the app's asar archive. That is a catastrophic security leak: anyone can extract app.asar in ten seconds, read your token, and clone your entire private source repository — plus GitHub's secret scanner will revoke fine-grained or classic tokens the moment someone pastes them online.
Even on public repos, unauthenticated GitHub API requests are capped at 60 requests per hour per IP (think corporate offices, universities, or shared VPN exits). Your update check fails silently for entire teams.
2. The clean solution: generic provider + authenticated update proxy
Keep your build pipeline publishing artifacts and latest*.yml manifests directly to your private GitHub release, then point electron-updater at a lightweight proxy that holds the GitHub token server-side.
import { app } from "electron";
import { autoUpdater } from "electron-updater";
const platformMap = {
darwin: "darwin",
win32: "windows",
linux: "linux",
} as const;
const platform = platformMap[process.platform as keyof typeof platformMap];
if (platform) {
autoUpdater.setFeedURL({
provider: "generic",
url: `https://releaseflow.net/kitze/sizzy/update/${platform}/${app.getVersion()}`,
});
autoUpdater.checkForUpdatesAndNotify();
}3. Two subtle things proxies get wrong: SHA-512 base64 and Range framing
- SHA-512 must be 88-character base64 (not 128-character hex from shasum -a 512). If your latest-mac.yml carries a mismatched or hex digest, electron-updater downloads 120 MB and discards it with ERR_UPDATER_ZIP_FILE_NOT_FOUND or checksum verification failure.
- Binary download endpoints MUST preserve exact Content-Length, Accept-Ranges: bytes, and 206 Partial Content without gzip/brotli re-compression — otherwise Electron's differential blockmap updater corrupts downloads mid-stream.
- Small manifests (latest-mac.yml, latest.yml, RELEASES) should be cached in memory with singleflight deduplication so 10,000 desktop clients waking up at 9:00 AM trigger exactly 1 GitHub API call instead of exhausting your rate limit.
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.