Skip to main content

Self-hosting

This is an operator checklist for hosting the app that serves the API. Use the application source and deployment files from the release you intend to run.

App, database and PDF service​

  • App and PostgreSQL: The app's docker-compose.yaml starts the app and a PostgreSQL service with persistent database storage. For an external PostgreSQL service, change or override the Compose service's DATABASE_URL setting; a different value only in .env is insufficient because the explicit service variable wins. Then maintain the external service's storage and backups yourself.
  • Login: For a regular instance configure Better Auth and a supported login provider (Google OAuth or custom OIDC) with the variables shown in the app's .env.example. You need a signed-in workspace Admin or Owner to mint integration keys.
  • PDF export: CHROMIUM_HOST points to the Chromium service used for PDF generation. The included Compose stack runs that service; JSON API reads and backups don't need it. Keep its debugging port and the PostgreSQL port private; don't expose the sample development stack as-is.
  • Runtime: Use Docker with Compose for the bundled deployment. The app README lists Node.js 24 and pnpm for development outside the containers.

After configuring the checked-out app's Compose stack for your environment, the app README documents this start command:

docker compose up -d

Origin and credentials​

Set BETTER_AUTH_URL to the public app origin and terminate HTTPS at your ingress. Forward Authorization to the app and redact it in logs. Guest menu links and QR codes also depend on the configured public URL. Configure proxy trust and browser origins for the actual network path; don't use the documentation hostname as the API origin.

Set BETTER_AUTH_SECRET on the server and prefer a separate API_KEY_JWT_SECRET for workspace JWTs. If API_KEY_JWT_SECRET isn't set, the workspace-key code uses BETTER_AUTH_SECRET. Use the same signing secret across app replicas; changing the active secret invalidates existing workspace keys. Leave INSTANCE_MASTER_API_KEY unset unless operators need it. Store all secrets outside source control and client bundles.

Update and recover​

The container runs prisma migrate deploy on startup before starting the app. Before deploying a new release, review its migrations and save a restorable PostgreSQL backup plus the configuration and secrets needed for recovery. Test the update and restore on a separate database first. A workspace JSON export is useful as a second copy of workspace content, but it cannot roll back a database migration or restore accounts and credentials. After updating, verify sign-in, a read-only v1 request with a workspace key, and any optional services your users depend on.

Demo versus production​

docker-compose.demo.yaml uses the same app image in DEMO_MODE with separate database storage. It creates temporary sample workspaces that expire according to DEMO_TTL_HOURS; the app cleans up expired workspaces. Use isolated data and credentials for demos and API experiments. Don't use demo workspaces for backups, production integrations or lasting records.

See README.md and docs/ENV.md in the app source for the deployment and environment settings for your release.