Standalone CLI and Docker
Run Upserve as a service with typed configuration, health checks and persistent metadata.
Use the CLI if you want a standalone service. You don't need to write an HTTP listener. For an existing server, see embedding in Hono, Node.js and Bun.
Install the CLI
Use Node.js 24 for the service and SQLite cache. Install the packages your configuration imports too:
npm install @neplex/upserve-cli @neplex/upserve @neplex/upserve-github @neplex/upserve-genericnpx upserve initThis creates upserve.config.ts and refuses to overwrite an existing file. The executable is upserve; you can also run pnpm exec upserve, yarn upserve or bunx upserve after installation.
Configuration file
Edit the generated file. Use editor consistently as the application ID and replace owner/editor with your repository.
import { defineConfig } from "@neplex/upserve";
import { github } from "@neplex/upserve-github";
import { generic } from "@neplex/upserve-generic";
export default defineConfig({
apps: {
editor: {
provider: github({ repository: "owner/editor" }),
adapters: [generic()],
},
},
});npx upserve startThe service prints structured JSON, including a line like:
{ "time": "2026-01-01T00:00:00.000Z", "event": "listening", "port": 3000 }Check it from another terminal:
curl http://localhost:3000/health/ready
curl -i http://localhost:3000/editor/stable/generic/latestReadiness returns {"status":"ready"}. The second request tests your release source; health endpoints don't contact GitHub.
Environment variables
| Variable | Default | Purpose |
|---|---|---|
UPSERVE_CONFIG | upserve.config.ts | Path to your trusted TypeScript configuration |
HOST | 0.0.0.0 | Listener address; use 127.0.0.1 for local-only access |
PORT | 3000 | Listener port, integer from 1 to 65535 |
UPSERVE_CACHE_DIR | Unset | Directory for metadata.sqlite; created if needed |
Set UPSERVE_CACHE_DIR=./data to enable persistent metadata unless your configuration already supplies a cache. The CLI opens and closes that SQLite store for you. It doesn't delete old entries automatically.
Secrets such as GITHUB_TOKEN are read by your configuration, not automatically applied by the CLI. Upserve doesn't load .env files for you. Pass values through your shell, process manager or container environment. See authentication before adding a GitHub token.
On SIGINT or SIGTERM, the service marks readiness as draining, stops accepting connections and allows up to ten seconds for requests to finish. Downloads that exceed the drain deadline can be interrupted. Liveness at /health/live returns {"status":"ok"}.
Docker Compose
During initial development, build the image from the repository. No published image is assumed:
docker build -t upserve .The repository's Compose file builds this image, mounts examples/upserve.config.ts and stores metadata in a named volume. Edit that configuration first, then run:
docker compose up --build -d
docker compose logs -f upserve
curl http://localhost:3000/health/readyThe image runs Node.js as UID/GID 10001, listens on port 3000, reads /config/upserve.config.ts and stores SQLite data under /data. Bind-mounted data directories must be writable by that user. Custom configuration imports must be installed in the image; mounting a config file doesn't install extra dependencies.
Coolify
Select a Dockerfile deployment from this repository, expose port 3000, mount persistent storage at /data, and mount your configuration at /config/upserve.config.ts. Configure environment secrets in Coolify. Use /health/ready for the health check and your platform's HTTPS proxy for the public domain.
You don't need PostgreSQL or Redis. One process is the simplest deployment when you want all update checks to share refresh coordination.
Reverse proxy configuration
Terminate HTTPS at your proxy and accept only the intended host. Upserve builds asset URLs from the incoming origin, so verify generated URLs use the public HTTPS host in your environment. Forward authorization, range and conditional headers, preserve 206 responses, and disable buffering for streamed downloads. Never cache private routes at the CDN.
Upserve doesn't start a polling timer. Checks refresh expired metadata as needed; GitHub webhooks can refresh release lists after publication. Don't expose the programmatic refresh methods as unauthenticated HTTP routes.