Self-hosted auto-update server for Electron apps
Serve Squirrel-compatible updates from your own infrastructure.
Modular adapters for any framework. Pluggable providers for any release source.
Electron Releases is a toolkit for building auto-update servers for Electron applications. Instead of relying on third-party services, you can self-host your update infrastructure on your existing stack.
Key features:
- π Pluggable architecture β Mix and match adapters and providers
- π Framework-native β First-class adapters for Next.js, with more coming
- π Private repo support β Serve updates from private GitHub repositories
- π¦ Multi-channel releases β Support alpha, beta, and stable channels
- π₯οΈ Cross-platform β macOS, Windows, and Linux support
- β‘ Squirrel-compatible β Works with Electron's built-in
autoUpdater
Get up and running in under 5 minutes.
npm install @electron-releases/adapter-nextjs @electron-releases/provider-github// app/api/releases/[[...path]]/route.ts
import { configureNextjsAdapter } from "@electron-releases/adapter-nextjs";
import { configureGithubProvider } from "@electron-releases/provider-github";
const githubProvider = configureGithubProvider({
token: process.env.GITHUB_TOKEN!,
owner: "your-org",
repo: "your-app",
});
export const GET = configureNextjsAdapter({
releases: githubProvider.releases,
assets: githubProvider.assets,
});import { autoUpdater } from "electron";
autoUpdater.setFeedURL({
url: `https://your-domain.com/api/releases/update/darwin/${app.getVersion()}`,
});
autoUpdater.checkForUpdates();That's it! Your Electron app now has self-hosted auto-updates.
The system is built on two concepts: Adapters and Providers.
βββββββββββββββββββ βββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ
β Electron App ββββββΆβ Adapter ββββββΆβ Provider β
β (Squirrel) β β Next.js, Remix, Hono... β β GitHub, GitLab, S3, R2 β
βββββββββββββββββββ βββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββ
β Core β
β Routing & Utilities β
βββββββββββββββββββββββββββββ
Adapters integrate with your web framework to handle incoming requests. They translate framework-specific request/response patterns into the standard format used by the core router.
| Package | Description | Version |
|---|---|---|
@electron-releases/adapter-nextjs |
Next.js App Router adapter |
Want an adapter for your framework? Open an issue or see Contributing.
Providers fetch release metadata and assets from your release source. They handle authentication, asset discovery, and URL signing for private releases.
| Package | Description | Version |
|---|---|---|
@electron-releases/provider-github |
GitHub Releases provider |
Need a different provider? Open an issue to request support for GitLab, S3, or other sources.
Core provides the routing logic, type definitions, and utilities shared by all adapters and providers.
| Package | Description | Version |
|---|---|---|
@electron-releases/core |
Core types, routing, and utilities |
All adapters expose the same set of endpoints:
| Endpoint | Description |
|---|---|
GET / |
List releases. Use ?channel=beta to filter, ?all=true for all channels. |
GET /download |
Auto-detect platform from User-Agent and redirect. |
GET /download/:platform |
Download for a specific platform. |
GET /update/:platform/:version |
Check for updates (Squirrel format). |
GET /update/win32/:version/RELEASES |
Squirrel.Windows RELEASES file. |
| Platform | Identifiers |
|---|---|
| macOS (Intel) | darwin, mac, macos, osx |
| macOS (Apple Silicon) | darwin_arm64, mac_arm64 |
| Windows | exe, win32, windows, win |
| Windows ARM | exe_arm64, win32_arm64 |
| Linux DEB | deb, debian |
| Linux RPM | rpm, fedora |
| Linux AppImage | AppImage, appimage |
Support multiple release channels for staged rollouts:
configureNextjsAdapter({
channels: ["alpha", "beta", "stable"], // Last = default
releases: githubProvider.releases,
assets: githubProvider.assets,
});Channel detection from versions:
1.0.0β stable1.0.0-beta.1β beta1.0.0-alpha.3β alpha
| Framework | Description | Link |
|---|---|---|
| Next.js | Full Next.js App Router example | examples/nextjs |
| Package | Description | README |
|---|---|---|
@electron-releases/core |
Core interfaces, types, and routing | README |
@electron-releases/adapter-nextjs |
Next.js App Router adapter | README |
@electron-releases/provider-github |
GitHub Releases provider | README |
We welcome contributions! Here's how you can help:
Found a bug or have a feature request? Open an issue.
Need support for a different framework or release source? Open an issue describing your use case:
- Adapters: Express, Hono, Fastify, Cloudflare Workers, etc.
- Providers: GitLab, S3, Azure Blob Storage, self-hosted, etc.
The core package provides everything you need to build custom adapters and providers:
- Building an Adapter β Create adapters for new frameworks
- Building a Provider β Create providers for new release sources
# Clone the repository
git clone https://github.com/lott-ai/electron-releases.git
cd electron-releases-adapter
# Install dependencies
bun install
# Build all packages
bun run build
# Run type checking
bun run typecheck
# Lint
bun run lintβββ packages/
β βββ core/ # Core types, routing, utilities
β βββ adapter-nextjs/ # Next.js adapter
β βββ provider-github/ # GitHub provider
βββ examples/
β βββ nextjs/ # Example Next.js app
βββ apps/
βββ docs/ # Documentation site
βββ web/ # Marketing site
- Node.js 18+
- For GitHub provider: GitHub Personal Access Token
MIT
Built with β€οΈ for the Electron community