Skip to main content

Self-Host Coolify on a VPS: Deploy Any App Without Heroku (2026)

· 6 min read
Yassine El Haddad
Software Developer & Automation Specialist

I build production AI agents, web scrapers, and automation pipelines. Most of what I publish here comes from the actual problems they run into: proxies that get banned, anti-bot stacks that fingerprint your client, RAG that drifts when the underlying data moves. Stack: Python, TypeScript, Go, FastAPI, LangChain, Crawlee, Playwright, deployed on AWS, GCP, and Cloudflare.

Coolify is an open-source, self-hosted Heroku and Vercel alternative. Run it on your own VPS to deploy web apps, databases, and cron jobs — with GitHub integration, auto SSL, and one-click PostgreSQL, MySQL, Redis, and MongoDB. No vendor lock-in, no per-app fees.

What Is Coolify?

Coolify is a self-hosted platform-as-a-service (PaaS) that mirrors Heroku and Vercel workflows. You connect a server via SSH, point it at a GitHub repo, and Coolify handles the build (via Nixpacks), deployment, and HTTPS with Let's Encrypt. You own the infrastructure, pay only for the VPS, and avoid per-app pricing.

Coolify also manages databases (PostgreSQL, MySQL, Redis, MongoDB), static sites, and cron jobs. It integrates with Cloudflare Tunnels and custom domains.

VPS Requirements

ResourceMinimumRecommended
OSUbuntu 22.04 LTSUbuntu 24.04 LTS
vCPU24
RAM2 GB4 GB
Storage20 GB SSD40 GB+ SSD

For production with multiple apps, use at least 4 GB RAM. Liquid Web VPS offers managed hosting, SSD storage, and 99.99% uptime SLA — ideal for Coolify deployments.

Installation

Connect to your server via SSH, then run:

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

The script installs:

  • Docker and Docker Compose
  • Traefik (reverse proxy for HTTPS)
  • PostgreSQL (Coolify's own database)
  • Coolify itself

Installation takes about 5–10 minutes. When done, you'll see a URL and admin credentials.

First Login and Server Setup

  1. Open http://YOUR_SERVER_IP:8000 in a browser.
  2. Create the admin account (email and password).
  3. Add your server:
    • Go to ServersAdd New Server
    • Enter a name (e.g. production)
    • Choose Public or Private (for SSH)
    • Add SSH connection: root@YOUR_IP or user@YOUR_IP with key-based auth

Coolify uses SSH to run Docker commands on the server. Ensure ssh-copy-id has been run so Coolify can connect without a password.

Deploying Your First App

  1. New ResourceApplication
  2. Connect GitHub (or GitLab, Bitbucket) and authorize Coolify.
  3. Select your repository and branch.
  4. Build Pack: Nixpacks (auto-detects Node, Python, Go, etc.)
  5. Domain: e.g. app.yourdomain.com — point DNS A record to your server IP
  6. Enable Automatic HTTPS (Let's Encrypt via Traefik)
  7. Click Deploy

Coolify builds the image, runs the container, and configures SSL. Your app is live at the specified domain.

Managing Databases

Coolify provides one-click databases:

  • PostgreSQLpostgres:15 (or latest)
  • MySQLmysql:8
  • Redisredis:7
  • MongoDBmongo:7

Add a database from New ResourceDatabase, choose type, set a root password, and deploy. Connect from your app using the internal Docker network hostname (e.g. postgres, redis).

Enable Backups in the database settings to run periodic dumps.

Cloudflare Tunnels and Custom Domains

For Cloudflare Tunnels, install the Cloudflare connector in Coolify and route traffic through the tunnel instead of exposing ports. Useful when the server is behind NAT or you want Cloudflare's WAF and DDoS protection.

For custom domains, add the domain in the application settings. Coolify uses Traefik to obtain a Let's Encrypt certificate and serve the app over HTTPS.

Coolify vs Dokku vs CapRover vs Heroku

FeatureCoolifyDokkuCapRoverHeroku
CostVPS onlyVPS onlyVPS onlyPer-app, dyno-based
GUIFull web UICLI + pluginsWeb dashboardWeb dashboard
BuildpacksNixpacksHeroku buildpacksNixpacks, DockerfileHeroku buildpacks
DatabasesOne-click PG, MySQL, Redis, MongoVia pluginsOne-clickAdd-ons (paid)
Auto SSLYes (Traefik)Yes (Caddy)Yes (Caddy)Yes
Multi-serverYesLimitedSingle serverManaged
Learning curveLowMediumLowLow

Choose Coolify for a modern UI, Nixpacks, and easy database setup. Use Liquid Web VPS for managed hosting with SSD and high availability.

Nixpacks Buildpack Behavior

Coolify uses Nixpacks by default to detect your app type and build it. It auto-detects:

  • Node.jspackage.jsonnpm install + start script
  • Pythonrequirements.txt or pyproject.tomlpip install + app server
  • Gogo.modgo build
  • RubyGemfilebundle install
  • Static — HTML/CSS/JS → served via Nginx

Add a nixpacks.toml in your repo root to override defaults (e.g. custom build commands, env vars). For full control, switch to Dockerfile in the Coolify build settings.

Cron Jobs and Workers

Coolify supports scheduled and recurring jobs. From New ResourceCron Job, add a schedule (e.g. 0 2 * * * for daily at 2 AM) and the command or script to run. The job runs in a container on your server. Use this for backups, report generation, or data sync. For web scrapers and pipelines, integrate with Apify for managed execution.

When to Use Liquid Web VPS for Coolify

Liquid Web suits Coolify when you need:

  • Managed hosting — proactive monitoring and support
  • SSD storage — faster builds and database I/O
  • 99.99% uptime — SLA-backed availability
  • Scalability — easy upgrades as you add more apps

Combine Coolify with our Traefik v3 guide for advanced routing, and Docker Compose production guide for robust container workflows.

Apify Affiliate Banner 728x90Apify Affiliate Banner 728x90Apify Affiliate Banner 300x50Apify Affiliate Banner 300x50
Start small

Begin with a 4 GB VPS, deploy one app, then add databases and more services. See VPS security hardening checklist to lock down SSH and TLS.

Frequently Asked Questions

Coolify is an open-source, self-hosted PaaS that lets you deploy apps like Heroku or Vercel on your own VPS. It uses Nixpacks for builds, Traefik for SSL, and provides one-click databases.

2 GB minimum for a single app. 4 GB recommended for multiple apps plus databases. Each app and database container adds memory usage.

Yes. Add your domain in the app settings. Coolify uses Traefik and Let's Encrypt to issue and renew SSL certificates automatically.

Yes. Install the Cloudflare connector in Coolify and route traffic through the tunnel to avoid exposing ports directly.

Add a database in Coolify, note the internal hostname (e.g. postgres), and set your app's DATABASE_URL or equivalent env var to that host. They share the same Docker network.

Common mistakes and fixes

Coolify install script fails

Use Ubuntu 22.04 or newer. Ensure 2GB+ RAM. Run as root or with sudo. Disable conflicting Docker/Traefik installations first.

Can't add server via SSH

Copy your SSH key to the server with ssh-copy-id. Ensure port 22 is open. Use root or a user with docker group access.

Build fails with Nixpacks

Check build logs in Coolify. Ensure your repo has a valid nixpacks.toml or standard files (package.json, requirements.txt). Increase build memory if OOM.