Skip to Content
♜ ReignHub / Docs
Self-hosting

Upgrades and operations

Preserve service identity, back up metadata and verify releases.

Upgrade procedure

  1. Read release notes for configuration and migration changes.
  2. Back up D1 and retain the Worker name, D1 ID, domain and variables.
  3. Update source and dependencies, then run checks, tests and the Web build.
  4. Deploy with the existing configuration and verify health, config, pairing and session reads.
git pull --ff-only
pnpm install --frozen-lockfile
pnpm check
pnpm test
pnpm build:web
pnpm run deploy

Preserve your SITE_URL build variable if using a public custom domain.

Backups

pnpm exec wrangler d1 export DB --remote --output ./reignhub-backup.sql

Keep backups private and out of Git. D1 contains device metadata, credential hashes, pairing records and service signing identity even though it stores no plaintext chats.

Recreating the database changes service identity and affects directories and short-lived leases. Do not clear it to fix routine connectivity issues. Controller-side local session caches are not included in a D1 backup.

Verify deployment

View version and domain status in the Cloudflare dashboard, or use the CLI:

pnpm exec wrangler deployments list
pnpm exec wrangler versions list

After deploying, check /healthz and /p2p/config, then connect to a device through /chat. If an upgrade fails, roll back to a working version in the Cloudflare dashboard.

Monitoring and cost

Watch Worker/DO requests, CPU, WebSocket counts, D1 reads/writes and storage, and optional probe traffic. Relaying application data has a different load profile from signaling. Configure budget alerts for your Cloudflare plan.

Edit this page on GitHub

On this page