Serve updates for desktop & mobile.
An extensible, self-hostable update server for Tauri, Electron, Android and custom applications.
import { serve } from '@hono/node-server'
import { createUpserve } from '@neplex/upserve'
import { github } from '@neplex/upserve-github'
import { tauri } from '@neplex/upserve-tauri'
const updates = createUpserve({
apps: {
desktop: {
provider: github({ repository: process.env.UPDATE_REPOSITORY! }),
adapters: [tauri()],
},
},
})
serve({ fetch: updates.fetch, port: 3000 })pnpm add @neplex/upserve @neplex/upserve-github @neplex/upserve-tauri @hono/node-serverUPDATE_REPOSITORY=owner/repository npx tsx server.tsimport { serve } from '@hono/node-server'
import { createUpserve } from '@neplex/upserve'
import { github } from '@neplex/upserve-github'
import { electron } from '@neplex/upserve-electron'
const updates = createUpserve({
apps: {
desktop: {
provider: github({ repository: process.env.UPDATE_REPOSITORY! }),
adapters: [electron()],
},
},
})
serve({ fetch: updates.fetch, port: 3000 })pnpm add @neplex/upserve @neplex/upserve-github @neplex/upserve-electron @hono/node-serverUPDATE_REPOSITORY=owner/repository npx tsx server.tsimport { Hono } from 'hono'
import { serve } from '@hono/node-server'
import { createUpserve } from '@neplex/upserve'
import { github } from '@neplex/upserve-github'
import { generic } from '@neplex/upserve-generic'
const updates = createUpserve({
apps: {
desktop: {
provider: github({ repository: process.env.UPDATE_REPOSITORY! }),
adapters: [generic()],
},
},
})
const app = new Hono()
app.route('/updates', updates)
serve({ fetch: app.fetch, port: 3000 })pnpm add hono @hono/node-server @neplex/upserve @neplex/upserve-github @neplex/upserve-genericUPDATE_REPOSITORY=owner/repository npx tsx server.tsimport { defineConfig } from '@neplex/upserve'
import { github } from '@neplex/upserve-github'
import { generic } from '@neplex/upserve-generic'
export default defineConfig({
apps: {
desktop: {
provider: github({ repository: process.env.UPDATE_REPOSITORY! }),
adapters: [generic()],
},
},
})pnpm add @neplex/upserve-cli @neplex/upserve @neplex/upserve-github @neplex/upserve-genericUPDATE_REPOSITORY=owner/repository pnpm exec upserve startPublish latest.json and signed updater artifacts in your release.
Integration guideReplace owner/repository with your GitHub release repository. Node.js 22.13 or newer.
Keep the updater you already use.
Upserve serves each client’s expected format from the same release and caching services.
Tauri
Tauri v2 updaterStatic manifests and dynamic checks. Existing artifact signatures stay intact.
/tauri/:target/:arch/:versionElectron
electron-builder / electron-updaterGeneric YAML feeds, installers, blockmaps and single-range downloads.
/electron/latest.ymlAndroid
Direct APK distributionAPK manifests with SHA-256, file sizes and configurable compatibility.
/android/latest.jsonCustom clients
Framework-independent JSONQuery releases, versions, channels and applicable updates through one API.
/generic/update/:versionAn update check shouldn’t become an upstream request.
Fresh metadata serves repeated checks from cache. Concurrent cold requests share a refresh, and upstream failures respect a bounded stale window and retry cooldowns.
Start without external infrastructure.
Recover metadata across server restarts.
Reuse ETags and Last-Modified validators.
Simulated requests in one process. No upstream calls are made.
Extend the protocol, provider or store.
Official integrations use the same public contracts available to your code.
defineProvider()Bring a release source.
Resolve releases and open known assets from your own artifact infrastructure.
defineAdapter()Speak your client’s protocol.
Register Hono routes with scoped release resolution and asset delivery services.
defineCache()Choose where metadata lives.
Implement a small asynchronous get, set and delete contract.
import { defineAdapter } from '@neplex/upserve'
export const myUpdater = defineAdapter({
name: 'my-updater',
register(app, services) {
app.get('/version', async (c) => {
const release = await services.latest(
c.req.param('channel')!,
)
return release
? c.json({ version: release.version })
: c.body(null, 204)
})
},
})Run it where you run your apps.
Fetch-based at the core. Node.js and Bun entry points are validated. The standalone image runs as a non-root user with optional SQLite persistence.
Self-hosting guideConnect your first application.
Configure a provider, choose an adapter, serve updates.