Unified Gateway

Docker on a Linux VPS

Run the Compose stack on any Linux host with Docker.

Any Linux host with Docker and the Compose plugin can run the full stack directly.

Bring up the stack

git clone https://github.com/boelabs/unified-gateway.git && cd unified-gateway

MASTER_KEY=$(openssl rand -base64 48) \
CREDENTIALS_ENCRYPTION_KEY=$(openssl rand -hex 32) \
docker compose -f docker-compose.yml -f compose.local.yaml up -d

This starts Postgres, Redis, the one-off migration job, the gateway (127.0.0.1:4000) and the docs (127.0.0.1:3000). The gateway talks to Postgres/Redis over the internal Compose network in plaintext, so there is no TLS and no Bun TLS issue.

Production notes

  • Reverse proxy. Put the gateway behind Caddy, nginx, or Traefik for TLS termination at the public edge. The local override binds services to loopback, so they are reachable by a proxy on the host without listening on every interface.
  • Secrets. Set MASTER_KEY and CREDENTIALS_ENCRYPTION_KEY; the production Compose base leaves them empty and the gateway refuses to start without them. See Setup → Secrets.
  • Migrations. The migrate service runs them automatically on docker compose up. For a manual run: docker compose run --rm migrate.
  • Backups. Persist the pgdata and redisdata named volumes.

To point at an external managed database instead of the bundled one, set DATABASE_URL/REDIS_URL and prefer a public-CA managed provider.

On this page