GenerateSaaS

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.

Coolify is one of several long-running hosts for the node target, alongside Dokploy, Railway, Fly.io, and Render. They all run the same image - pick whichever you prefer to operate.

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 bash
Add your server. The host Coolify runs on registers as localhost 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).

Set environment variables on the resource (table below). DATABASE_URL is required because the CMD-time schema step reads it on boot.
Deploy. Coolify builds the image and starts the container with 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.
Attach a domain and TLS. Add your domain under the resource's Domains field. Coolify provisions a Let's Encrypt certificate and routes traffic through its built-in proxy.

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.

VariableRequiredSource
DATABASE_URLYesSelf-hosted Postgres, Neon, or Supabase - see Database
REDIS_URLYesSelf-hosted Redis or a Coolify Redis resource - see Caching
BETTER_AUTH_SECRETYesRandom string, min 32 chars
API_URLYesPublic URL the backend is reachable at
INNGEST_APP_ID, INNGEST_EVENT_KEY, INNGEST_BASE_URLYesBackground jobs
BASE_URL, TRUSTED_ORIGINSRecommendedProduction URL and allowed origins
TRUSTED_PROXYNot neededCoolify 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.

On this page