Self-Hosting & Deployment
Deploy Kipivo on a single host with Docker Compose and Caddy, or run multi-service production on Railway.
Kipivo ships with production deployment configurations for single-host Docker Compose + Caddy and managed multi-service Railway environments.
Docker Compose + Caddy (Single Host)
1. Prepare DNS & Secrets
Point your domain at your Docker host and allow inbound TCP ports 80 and 443. Copy .env.example to .env and populate the required values:
cp .env.example .envGenerate three independent 32-byte hex secrets (openssl rand -hex 32):
POSTGRES_PASSWORD(use hex so no URL escaping is needed)BETTER_AUTH_SECRETKIPIVO_CREDENTIALS_SECRET(retain across redeployments to keep encrypted credentials readable)
Set KIPIVO_DOMAIN to your public DNS name.
2. Configure Registration & Auth
KIPIVO_ALLOW_SIGNUP: Defaults to1. Set to0orfalseto disable new email registrations while keeping existing accounts active.KIPIVO_ALLOWED_EMAILS: Optional comma-separated, case-insensitive allowlist for sign-up.- GitHub OAuth (optional): Register an OAuth App with callback
https://<domain>/api/auth/callback/githuband setGITHUB_CLIENT_ID/GITHUB_CLIENT_SECRET. - Password Reset (optional): Set both
RESEND_API_KEYandKIPIVO_EMAIL_FROMwith a verified sender. - Docs URL (optional):
KIPIVO_DOCS_URLdefaults tohttps://docs.kipivo.comfor/docsredirects from the Web app.
3. Launch the Stack
From the repository root:
docker compose -f docker-compose.prod.yml config --quiet
docker compose -f docker-compose.prod.yml up -d --build --waitCompose runs Drizzle database migrations before starting the API. Caddy provisions HTTPS automatically and proxies /api/*, /rpc/*, /sse, /ws/runner, /webhooks/*, /channels/*, and /mcp to api:3000, while serving Web routes from web:3001.
Health Checks & Observability
GET /healthz: Public liveness/dependency check for PostgreSQL and Redis (2s budget,no-store).GET /readyz: Verifies dependencies plus API schema readiness.GET /metrics: Aggregated Prometheus metrics gated byKIPIVO_METRICS_TOKEN(blocked with404on public Caddy edges).- Security Audit Logs: View structured
category=security_auditentries viadocker compose -f docker-compose.prod.yml logs api.
Hosting This Docs Site (docs.kipivo.com)
docs builds as a standalone static site (SSG) with zero backend dependencies:
bun --filter @kipivo/docs buildUpload docs/dist/client directly to Cloudflare Pages, Vercel, Netlify, or GitHub Pages and attach your custom domain (docs.kipivo.com).