Self-Hosting Coolify: Your Own Heroku-Like PaaS

Remember when Heroku had a free tier and deploying apps was just git push heroku main? Coolify brings that experience back — on your own hardware. It’s an open-source, self-hosted Platform-as-a-Service that handles deployments, SSL certificates, databases, and more through a clean web interface.

No more manually writing Docker Compose files for every project. No more SSH-ing into servers to debug deployments. Coolify gives you a Vercel/Heroku-like experience while keeping everything under your control.


What Coolify Does

  • Git-push deployments — connect GitHub, GitLab, or Gitea repos and deploy on push
  • One-click services — deploy databases (PostgreSQL, MySQL, Redis, MongoDB), apps (WordPress, Ghost, Plausible), and more from a catalog
  • Automatic SSL — Let’s Encrypt certificates with zero config
  • Multiple servers — manage deployments across multiple machines from one dashboard
  • Docker & Docker Compose — deploy any Dockerized app, or raw Docker Compose files
  • Nixpacks & Buildpacks — auto-detect your app’s language and build it (Node, Python, Go, Rust, PHP, Ruby, etc.)
  • Environment variables — manage secrets per app, per environment
  • Webhooks & notifications — Slack, Discord, email alerts on deploy status
  • Team management — invite collaborators with role-based access
  • Resource monitoring — CPU, memory, disk usage per container

Coolify vs The Alternatives

FeatureCoolifyCapRoverDokkuHeroku
Web UI✅ Modern, polished✅ Basic❌ CLI only✅ Yes
Git-push deploy✅ Yes✅ Yes✅ Yes✅ Yes
Multi-server✅ Yes✅ Yes❌ Single✅ Yes
One-click apps✅ 100+✅ Yes✅ Plugins✅ Marketplace
Auto SSL✅ Let’s Encrypt✅ Let’s Encrypt✅ Let’s Encrypt✅ Included
Docker Compose✅ Native⚠️ Limited❌ No❌ No
Database management✅ Built-in✅ Basic✅ Plugins✅ Add-ons
Buildpacks✅ Nixpacks✅ Heroku packs✅ Heroku packs✅ Native
PriceFree (self-hosted)Free (self-hosted)Free (self-hosted)$5+/dyno
S3 backups✅ Built-in❌ No❌ Manual✅ Add-on

Coolify stands out for its modern UI, native Docker Compose support, and multi-server management. If you want CapRover’s simplicity but with a better interface and more features, Coolify is the answer.


Prerequisites

  • A server — VPS or home server with at least 2 CPU cores, 2GB RAM (4GB+ recommended)
  • Ubuntu 22.04+, Debian 12+, or similar — Coolify’s installer targets Linux
  • Root or sudo access
  • A domain (optional but recommended) — for SSL and clean URLs
  • Ports 80 and 443 open — for web traffic and SSL

Note: Coolify installs and manages Docker itself. If you already have Docker installed, that’s fine — Coolify works alongside it. But don’t install Coolify on a server where another reverse proxy (Nginx, Caddy, Traefik) is already binding ports 80/443 unless you configure them to coexist.


Step 1: Install Coolify

Coolify provides a one-line installer. SSH into your server and run:

curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash

This installs:

  • Docker (if not already present)
  • Docker Compose
  • Coolify and its supporting services (PostgreSQL, Redis, a reverse proxy)

The install takes 2–5 minutes depending on your server. When it’s done, you’ll see:

CAococleisfsyyionusrtadlalsehdbosaurcdceasts:fuhltltyp!://YOUR_SERVER_IP:8000

What the installer creates

/datasdrpsb/oaersacutdohcoraix/kocbsyulea//pi/ssfe/ys//######CPRTSSooerScosdaHhltieeigsfkdfrieuyedkylSaseaQtrdpLaefpvoblderaiarcctsrkaaeeutmpipoortsnoetxocysroeadcrgeovenefrisg

Step 2: Initial Setup

Open http://YOUR_SERVER_IP:8000 in your browser. You’ll see the registration page — the first account created becomes the admin.

  1. Create your admin account — email and password
  2. Configure your server — Coolify auto-detects the localhost server. Click “Validate” to confirm Docker is working
  3. Set your instance URL — if you have a domain, set it now (e.g., coolify.yourdomain.com)

Point a domain at Coolify

Create a DNS A record:

coolify.yourdomain.comYOUR_SERVER_IP

Then in Coolify’s Settings → General, set the instance URL to https://coolify.yourdomain.com. Coolify’s built-in Traefik proxy will automatically get a Let’s Encrypt certificate.


Step 3: Connect a Git Source

To deploy from repositories, connect a Git provider:

  1. Go to Sources in the sidebar
  2. Click + Add and choose GitHub, GitLab, or Gitea
  3. For GitHub: Create a GitHub App (Coolify walks you through it) — this gives it access to your repos and webhooks
  4. For GitLab/Gitea: Provide the instance URL and an access token

Once connected, you can deploy any repo with a single click.


Step 4: Deploy Your First Application

From a Git Repository

  1. Go to Projects → create a new project (or use the default)
  2. Click + New ResourceApplication
  3. Select your Git source and pick a repository
  4. Coolify auto-detects the build method:
    • Nixpacks (default) — auto-detects language and builds
    • Dockerfile — uses your repo’s Dockerfile
    • Docker Compose — uses your docker-compose.yml
    • Static site — builds and serves with Nginx
  5. Set a domain (e.g., myapp.yourdomain.com)
  6. Click Deploy

Coolify builds the app, starts the container, configures the reverse proxy, and provisions an SSL certificate. Your app is live.

From a Docker Image

Don’t have a Git repo? Deploy any Docker image directly:

  1. + New ResourceApplicationDocker Image
  2. Enter the image (e.g., nginx:latest, ghost:5)
  3. Set ports, environment variables, and a domain
  4. Deploy

One-Click Services

Coolify’s service catalog includes pre-configured stacks:

  • Databases: PostgreSQL, MySQL, MariaDB, MongoDB, Redis, ClickHouse
  • Apps: WordPress, Ghost, Plausible, Gitea, Minio, Appwrite, Supabase
  • Tools: Uptime Kuma, n8n, Grafana, Umami

Go to + New ResourceService, pick from the catalog, and deploy. Each comes with sane defaults and required environment variables pre-filled.


Step 5: Database Management

Coolify makes databases first-class citizens:

  1. + New ResourceDatabase
  2. Choose PostgreSQL, MySQL, MariaDB, MongoDB, or Redis
  3. Coolify generates secure credentials automatically
  4. Optionally expose the database externally or keep it internal-only

Connecting Apps to Databases

Coolify injects database connection details as environment variables. In your app’s settings, reference them:

DATABASE_URL=postgresql://user:password@db-host:5432/mydb

Or use Coolify’s internal DNS — containers on the same server can reach each other by service name.

Scheduled Backups

  1. Go to your database → Backups tab
  2. Set a cron schedule (e.g., 0 2 * * * for daily at 2 AM)
  3. Configure S3-compatible storage (AWS S3, Backblaze B2, MinIO)
  4. Coolify handles dump, compress, upload, and retention

Step 6: Managing Multiple Servers

One of Coolify’s killer features — manage remote servers from a single dashboard:

  1. Go to Servers+ Add
  2. Enter the remote server’s IP and SSH credentials
  3. Coolify installs Docker on the remote server and validates the connection
  4. Now deploy apps to any server from the same UI

This is great for:

  • Separating workloads — databases on one server, apps on another
  • Edge deployments — deploy to servers closer to your users
  • Scaling — spread load across multiple machines

Step 7: Environment Variables and Secrets

Coolify handles secrets per-resource:

  1. Go to your app → Environment Variables
  2. Add key-value pairs
  3. Mark sensitive ones as Secret (hidden in UI after saving)
  4. Variables are injected at build time and/or runtime (you choose)

For shared secrets across apps, use Coolify’s Shared Variables feature at the project or environment level.


Automatic Deployments

Git Push Deploy

Once your Git source is connected, Coolify sets up webhooks automatically. Every push to your configured branch triggers a new deployment. You can:

  • Set the deploy branch — only deploy on main, production, etc.
  • Enable preview deployments — deploy pull requests to temporary URLs
  • Manual deploy — click “Deploy” in the UI anytime

Deploy Notifications

Set up notifications in SettingsNotifications:

  • Discord — webhook URL
  • Slack — webhook URL
  • Email — SMTP settings
  • Telegram — bot token and chat ID

Get notified on successful deploys, failures, and health check alerts.


Reverse Proxy and SSL

Coolify ships with Traefik as its reverse proxy (you can switch to Caddy in newer versions). It handles:

  • Automatic Let’s Encrypt SSL for every domain you configure
  • HTTP → HTTPS redirect by default
  • WebSocket support out of the box
  • Custom Traefik labels for advanced routing

Custom Domain Setup

For each app or service:

  1. Create a DNS A record pointing to your Coolify server
  2. Set the domain in the resource’s settings
  3. Coolify configures Traefik and provisions SSL automatically

Multiple domains per app are supported — useful for www + apex domain setups.


Updating Coolify

Coolify has a built-in update mechanism:

  1. Go to SettingsUpdate
  2. If a new version is available, click Update
  3. Coolify pulls the latest images and restarts itself

Or from the command line:

cd /data/coolify/source
docker compose pull
docker compose up -d

Coolify updates don’t affect your deployed apps — they keep running during the update.


Troubleshooting

Build fails with “out of memory”

Nixpacks and Docker builds can be memory-hungry. Options:

  • Add swap: fallocate -l 4G /swapfile && mkswap /swapfile && swapon /swapfile
  • Increase server RAM
  • Use a Dockerfile with multi-stage builds to reduce build-time memory

App deploys but isn’t reachable

  1. Check the domain’s DNS is pointing to your server: dig myapp.yourdomain.com
  2. Verify ports 80/443 are open: sudo ufw status or check your cloud firewall
  3. Check Traefik logs: docker logs coolify-proxy
  4. Ensure no other service is binding port 80/443

Database connection refused

  • Ensure the database and app are on the same server (or the database is exposed externally)
  • Check the connection string — Coolify’s internal DNS uses container names
  • Verify the database is running: check its status in the Coolify dashboard

SSL certificate not provisioning

  • DNS must propagate first — wait a few minutes after creating A records
  • Port 80 must be accessible (Let’s Encrypt uses HTTP-01 challenge)
  • Check Traefik logs for ACME errors: docker logs coolify-proxy 2>&1 | grep -i acme

Coolify dashboard is slow

  • Default PostgreSQL settings are conservative. In /data/coolify/source/docker-compose.yml, add PostgreSQL tuning:
    environment:
      - POSTGRES_SHARED_BUFFERS=256MB
      - POSTGRES_WORK_MEM=16MB
    
  • Clear old deployment logs: Coolify stores build logs that accumulate over time

Webhook not triggering deploys

  • Verify the webhook URL is reachable from GitHub/GitLab (not behind a firewall)
  • Check your Git source configuration — re-save the GitHub App settings
  • Look at webhook delivery logs in GitHub (Settings → Webhooks → Recent Deliveries)

Production Hardening

Restrict Dashboard Access

By default, Coolify’s dashboard is publicly accessible. Lock it down:

  • Use a strong admin password and enable 2FA (Settings → Profile)
  • Restrict IP access via firewall: only allow your IP to port 8000
  • Put Coolify behind Cloudflare and use Access policies

Resource Limits

Set CPU and memory limits per container in each app’s settings to prevent one runaway app from taking down the server.

Backup Your Coolify Instance

Beyond database backups, back up the entire Coolify config:

# Backup Coolify data
tar -czf coolify-backup-$(date +%Y%m%d).tar.gz /data/coolify/

# Exclude large build caches
tar -czf coolify-backup-$(date +%Y%m%d).tar.gz \
  --exclude='/data/coolify/source/.docker' \
  /data/coolify/

Who Should Use Coolify

Great for:

  • Developers who want Heroku-like deploys on their own hardware
  • Small teams deploying multiple apps across servers
  • Self-hosters who are tired of writing Docker Compose for every project
  • Anyone migrating off Heroku’s paid tiers

Maybe not for:

  • Single static sites (overkill — just use Caddy or Nginx)
  • Large-scale orchestration (Kubernetes is more appropriate)
  • Servers with less than 2GB RAM (Coolify itself needs resources)

Wrapping Up

Coolify is the closest thing to a self-hosted Heroku that actually works well. The web UI is polished, git-push deployments work reliably, and the one-click service catalog saves hours of Docker Compose writing. Multi-server management means you can grow from a single VPS to a fleet without changing your workflow.

The project is actively maintained with frequent releases, and the community is responsive. If you’re deploying more than a couple of apps, Coolify pays for itself in time saved on the first day.

Useful Links: