Coolify
Deploy the node target to Coolify, a self-hosted PaaS that builds the standard Docker image on your own VPS and fronts it with its built-in proxy.
Coolify is a self-hosted PaaS you run on your own VPS. It builds the node target's standard node:24-alpine image - the boilerplate has no Coolify-specific code, and both fullstack and separate are supported.
Deploy
Install Coolify on a fresh VPS (Ubuntu or Debian), then open http://<your-server-ip>:8000 and finish onboarding.
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | sudo bashlocalhost automatically. To deploy elsewhere, add the machine under Servers with SSH key access.Create a resource from your Git repository. Choose Dockerfile as the build pack and point it at the owner app's Dockerfile - the frontend app's (EXPOSE 3000) for fullstack, or apps/backend/Dockerfile (EXPOSE 3010) for separate. Set the resource's exposed port to match.
When building the frontend image, provide NEXT_PUBLIC_API_URL=https://yourdomain.com/api as a build-time arg - Next.js bakes it into the browser bundle and a runtime env var cannot fix it later (see Self-hosting with Docker).
DATABASE_URL is required because the CMD-time schema step reads it on boot.CMD pnpm start. The CLI prepends pnpm -F @repo/database run deploy to that script, so the schema migrates on every container start before the server boots.Bring your own database and cache
Coolify never reads infra/docker-compose.yml - that file is local development only. Use a managed provider, or run Postgres and Redis as separate Coolify resources, then point these vars at them.
| Variable | Required | Source |
|---|---|---|
DATABASE_URL | Yes | Self-hosted Postgres, Neon, or Supabase - see Database |
REDIS_URL | Yes | Self-hosted Redis or a Coolify Redis resource - see Caching |
BETTER_AUTH_SECRET | Yes | Random string, min 32 chars |
API_URL | Yes | Public URL the backend is reachable at |
INNGEST_APP_ID, INNGEST_EVENT_KEY, INNGEST_BASE_URL | Yes | Background jobs |
BASE_URL, TRUSTED_ORIGINS | Recommended | Production URL and allowed origins |
TRUSTED_PROXY | Not needed | Coolify fronts apps with Traefik, which the backend detects. Set it only for a CDN in front - see Client IP |
Self-hosted Redis is fully supported on a long-running host - the serverless-only Upstash requirement does not apply. Full list in Environment variables.
Never deploy a --demo build - its schema step resets the database and force-pushes the schema on every container start.
Self-hosting with Docker
The node target image, multi-stage build, and migrate-on-boot details.
Separate backend
Run the standalone Hono server on API_PORT for independent scaling.
Reverse proxy
Front the apps by host and path if you route outside Coolify's proxy.
Going to production
The pre-launch checklist of secrets, flags, and webhooks.