Self Hosting (Updated: ) 14 min read

Coolify Guide: The Ultimate Self-Hosted Heroku Alternative (2026)

Suresh S Suresh S
Coolify Guide: The Ultimate Self-Hosted Heroku Alternative (2026)

A few years ago, I received a surprise $150 bill from a managed cloud provider for a side project that got unexpectedly popular on Reddit. I was paying for a database, a Redis cache, and a few web workers. The convenience of platforms like Heroku, Vercel, and Render is incredible — until you see the enterprise pricing tier.

I knew I could rent a Linux VPS for $10 a month with 10x the performance. But I dreaded the idea of manually configuring Nginx, writing deployment scripts, setting up Git hooks, and managing TLS certificates at 2 AM.

Then I found Coolify.

Coolify is an open-source, self-hosted Platform-as-a-Service (PaaS). It gives you the “git push to deploy” magic of Vercel or Heroku, but it runs on your own hardware. If you’ve been looking for an open source Heroku alternative, this is it.

In this guide, I’ll walk you through how to deploy a Coolify selfhost instance, connect it to GitHub, spin up databases with one click, and take back control of your infrastructure costs.


What is Coolify (And Why Should You Care)?

At its core, Coolify is a beautiful dashboard that sits on top of Docker. It abstracts away the complex command-line administration, allowing you to deploy applications just like you would on a managed cloud provider.

Here’s why I deploy almost everything on Coolify now:

  • Git-based CI/CD → You push to your main branch, and Coolify automatically builds and deploys your code.
  • Zero vendor lock-in → It’s your server. If you decide to stop using Coolify, your Docker containers keep running.
  • Nixpacks integration → You don’t even need to write a Dockerfile. Coolify analyzes your repository (whether it’s Node, Python, Rust, or Go) and builds it automatically.
  • Automated SSL → It handles Let’s Encrypt certificates and reverse proxying (via Traefik) completely transparently.
  • One-click databases → Need PostgreSQL? Click a button. Need Redis? Click a button. No more wrestling with docker-compose.yml networking.
  • Cost control → You pay a flat rate for your VPS server. Run 50 apps on a $20 server if it has the RAM.

The Cost Reality: Coolify vs. Heroku vs. Vercel

If you’re building a serious application with a Postgres database, a Redis cache, a background worker, and a web server, here’s what your monthly bill looks like:

FeatureHerokuVercel (Pro)Coolify (Self-Hosted)
Web Server$25 (Standard-1X)$20 (Base)$10-$20 (VPS Cost)
Database$50 (Standard-0)External requiredBuilt-in (One-click)
Redis Cache$15 (Premium-0)External requiredBuilt-in (One-click)
Worker Process$25 (Standard-1X)Functions limitJust another container
Total Monthly~$115/mo$20+ (plus DB costs)~$15/mo

By switching to self-hosting, you aren’t just saving a few dollars; you’re changing the fundamental economics of your side projects and startups.


Server Requirements and Prerequisites

Before you install Coolify, you need a server. Do not try to run this on shared hosting or a $2 micro-VPS with 512MB of RAM. The build process (especially for Next.js or Node apps) requires actual compute power.

Minimum Requirements:

  • 2 CPU Cores
  • 2 GB RAM (4 GB highly recommended)
  • 30 GB SSD storage
  • Ubuntu 22.04 / 24.04 or Debian 11 / 12

I recommend providers like Hetzner, DigitalOcean, or Linode. If you’re building a home lab with Proxmox, a dedicated Debian VM works perfectly.

Step 1: Prepare Your Server

SSH into your fresh server. If you aren’t familiar with secure access, read our guide on how to secure SSH on Ubuntu first.

Make sure your system is updated:

sudo apt update && sudo apt upgrade -y

Before installing Coolify, ensure ports 80, 443, and 22 are open. If you are using a cloud provider’s external firewall (like AWS Security Groups), open those ports now. We’ll configure the internal UFW firewall later.


Installing Coolify

Installing Coolify is ridiculously simple. You don’t need to manually install Docker, configure networks, or set up databases. The installation script handles everything.

Run the official install script:

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

Go grab a coffee. The script will:

  1. Install Docker Engine. (Curious how this works? See our Docker installation guide).
  2. Download the Coolify Docker images.
  3. Set up the internal PostgreSQL database Coolify uses for its own state.
  4. Configure Traefik as the reverse proxy.

Once it finishes, it will output a URL (usually http://<your-server-ip>:8000).

First Login and Setup

  1. Open your browser and go to the provided IP address.
  2. Register the first admin account. (This data stays entirely on your server).
  3. You’ll be presented with the main Coolify dashboard.

Immediate Security Task: Before doing anything else, go to the Coolify settings and enable Two-Factor Authentication (2FA). You are now a sysadmin, and a compromised dashboard means a compromised server. Generate a strong password using our password generator and store it in a secure manager like Vaultwarden.


Deploying Your First App from GitHub

The magic of Coolify is Git integration. Let’s deploy a standard web application.

1. Connect GitHub (or GitLab/Gitea)

In the Coolify dashboard, navigate to SourcesAdd New Source. Select GitHub App. Coolify will guide you through installing a GitHub App on your account or organization. This allows Coolify to listen for push events (webhooks) and clone your private repositories securely.

If you are unfamiliar with Git workflows, our Git and GitHub guide covers the basics of version control.

2. Create a New Project

  1. Go to ProjectsAdd New Project.
  2. Select your environment (e.g., “Production”).
  3. Click New ResourcePublic Repository or Private Repository.
  4. Select the repository and branch you want to deploy.

3. The Build Pack (Nixpacks vs Dockerfile)

Coolify needs to know how to build your app. You have a few options:

  • Nixpacks → This is the default and it’s incredible. Nixpacks automatically analyzes your code. If it sees a package.json, it knows it’s a Node app. If it sees requirements.txt, it builds a Python environment. For most standard apps built in React, Vue, or Svelte or backend APIs written in Node.js, Nixpacks just works with zero configuration.
  • Dockerfile → If you have a custom Dockerfile in your repository, select this. Coolify will build your exact image.
  • Docker Compose → If you have a complex setup with multiple interconnected containers, point Coolify to your docker-compose.yml. (Need help writing one? Try our Docker Compose generator).

4. Configure Domains and Deploy

Before hitting deploy, scroll down to the Domains section. Enter your custom domain (e.g., https://myapp.com).

Make sure you’ve already gone to your DNS provider (like Cloudflare) and pointed an A Record for myapp.com to your server’s IP address.

Click Deploy.

Coolify will pull your code, build the container, start it, configure Traefik to route traffic from your domain to the container, and automatically issue a Let’s Encrypt SSL certificate.

You just deployed an app exactly like Heroku, but on your own hardware.


One-Click Databases and Services

Self-hosting an app is easy. Self-hosting a database securely is historically terrifying. Coolify makes it trivial.

Deploying a Database

Need a database for your new app?

  1. Go to your Project environment.
  2. Click New ResourceDatabase.
  3. Choose PostgreSQL, MySQL, Redis, MongoDB, or MariaDB.
  4. Coolify will instantly provision the database in an isolated Docker container.

It automatically generates strong root passwords and connection URIs. If you aren’t sure which database engine to choose, our PostgreSQL vs MySQL comparison breaks down the technical differences.

Internal vs External Networking

This is a critical security concept: Do not attach a public domain to your database.

Coolify places your web app and your database on the same internal Docker network. Your web app can communicate with the database using the internal hostname (e.g., postgres-1234:5432) without the database ever being exposed to the public internet. This is a massive security win. For more on this concept, read our guide on securing Docker containers.

One-Click Services (Nextcloud, Ghost, n8n)

Coolify isn’t just for your custom code. It has a massive catalog of one-click open-source templates.

Want to host your own analytics? Click to deploy Plausible or Umami. Want to replace Google Drive? Click to deploy Nextcloud. Want to automate tasks? Click to deploy n8n. Want a media server? Click to deploy Jellyfin. Want to manage PDFs? Click to deploy Stirling PDF.

It is a self-hoster’s dream platform.


Environment Variables and Secrets

Managing secrets (.env files) securely is paramount. Never commit API keys to GitHub. (If you have, use git filter-repo to scrub them and rotate them immediately).

In Coolify, go to your application settings and find the Environment Variables tab. Here you can securely inject your API keys, database URLs, and secrets. Coolify stores these securely and injects them into your container at runtime.

If you need help scaffolding standard .env templates for your projects, use our ENV generator tool.


Multi-Server Scaling (Bring Your Own Server)

Here is where Coolify obliterates the competition.

Let’s say your web app is getting massive traffic, and your single $10 VPS is struggling. You want to separate your web workers from your database.

With Coolify, you don’t need to migrate platforms or learn Kubernetes (though if you want to, here’s our Kubernetes explained simply guide). You essentially build your own localized cloud computing environment—which helps to deeply understand what is cloud computing beyond the marketing hype.

You simply:

  1. Rent a second VPS.
  2. Go to Servers in Coolify → Add New Server.
  3. Provide the SSH keys for the new server.
  4. Coolify connects via SSH, installs Docker, and adds it as a “Destination”.

Now, when you deploy a new application or database, you can select which physical server it runs on. Coolify manages the entire cluster from your primary dashboard. You’ve just built a multi-node private cloud.


Backups and Disaster Recovery

A server without backups is a ticking time bomb. Hardware fails. Bad deployments happen.

Coolify has built-in database backup scheduling.

  1. Go to your Database settings → Backups.
  2. Add an S3-compatible storage destination (AWS S3, Cloudflare R2, MinIO, or Backblaze B2).
  3. Set a cron schedule (e.g., 0 2 * * * for 2 AM daily). If you struggle with cron syntax, use our cron expression generator.

For a comprehensive look at how to protect your data, read our complete guide on backup strategies for self-hosted servers.


Migration Strategy: Heroku to Coolify

Moving a live production app from Heroku/Vercel to Coolify requires a zero-downtime strategy.

  1. Provision Coolify: Set up your VPS and deploy your app and database on Coolify.
  2. Sync Secrets: Copy all environment variables from Heroku to Coolify.
  3. Data Migration: Put your Heroku app in maintenance mode (or read-only). Export the Heroku database and import it into your Coolify database using pg_restore or mysql CLI. (See our FTP/SFTP transfer guide for moving large dump files).
  4. DNS Switch: Update your domain registrar’s A Record to point to the Coolify VPS IP. If you’re fuzzy on how domain records propagate or what happens when you type a URL, review our guide on what is DNS and use a DNS checker tool. Be sure to configure AAAA records if you need IPv6 support (see IPv4 vs IPv6).
  5. Wait for Propagation: DNS can take a few hours. Because Coolify automatically handles the Let’s Encrypt certificates, the traffic will seamlessly transition to the new server securely.
  6. Decommission: Once traffic has fully migrated, shut down the Heroku dynos. You can also explore replacing external object storage if you want to self-host that too—like setting up a private file sync with Syncthing.

Troubleshooting Common Coolify Issues

When things go wrong in a self-hosted PaaS, it’s usually one of three things:

1. Build Timeouts / Out of Memory (OOM)

If your Next.js or Nuxt application fails during the “Building” phase, it’s almost always a memory issue. Webpack and Vite require significant RAM to compile. Fix: Add swap memory to your Linux server. Read how Linux memory management works to understand how to create and mount a swapfile.

2. Connection Refused (502 Bad Gateway)

If your deployment says “Healthy” but the domain shows a 502 error, the internal Traefik proxy can’t route traffic to your container. Fix: Check that your application is actually listening on the port Coolify expects. If your Node app listens on 3000, ensure the Coolify “Ports Exposes” setting matches 3000. You can inspect active ports using Linux security commands.

3. Webhook Failures

If you push to GitHub but Coolify doesn’t deploy: Fix: Check the GitHub Webhooks page in your repository settings. Ensure the payload URL matches your Coolify instance and that no firewall is blocking incoming GitHub traffic. Check your system logs in Coolify to see if the webhook was received.

For advanced reverse proxy setups outside of Coolify, you might want to look into Nginx Proxy Manager or Caddy.


Server Security Checklist

Since you are the sysadmin now, you must secure the host OS.

  • Disable password authentication and use SSH keys exclusively.
  • Install Fail2ban or CrowdSec to automatically block IP addresses that repeatedly fail SSH logins.
  • Configure UFW (Uncomplicated Firewall) to only allow ports 22, 80, and 443.
  • Keep the underlying Linux OS updated regularly. You can use our cron generator to schedule automated apt upgrade scripts.
  • Set up monitoring. I highly recommend spinning up Uptime Kuma on a separate cheap VPS to alert you if your Coolify server goes offline.

Coolify Alternatives

While Coolify is arguably the most feature-rich open-source PaaS right now, there are alternatives if it doesn’t fit your workflow:

  • Dokploy: A lightweight, Docker-based alternative that focuses heavily on simplicity. See our Dokploy setup guide.
  • CapRover: An older, highly stable PaaS that relies on Docker Swarm.
  • Portainer: Not a PaaS, but a fantastic visual management tool for Docker environments. See our Portainer guide.
  • Dokku: A CLI-only Heroku clone. Excellent for developers who prefer the terminal over web dashboards.

You can browse more self-hosted tools in our guide to the best open source alternatives.


Conclusion

The era of paying $100/month for a simple web app and a database is over. Tools like Coolify have democratized infrastructure, making it possible for solo developers and small teams to run enterprise-grade deployments on affordable hardware. (If you literally have $0 budget, check out our guide on how to host a website for free using static app providers).

Yes, there is a learning curve to managing your own VPS. But the independence, cost savings, and deep understanding of how your applications actually run in production are well worth the effort.


Official Documentation


Frequently Asked Questions (FAQ)

What is Coolify?

Coolify is an open-source, self-hosted Platform-as-a-Service (PaaS). It acts as an alternative to Heroku or Vercel, allowing you to deploy applications, databases, and services to your own servers using a web-based dashboard and automated Git deployments.

Is Coolify really free?

The software itself is 100% free and open-source. However, because it is self-hosted, you must pay for the underlying server infrastructure (like a VPS from Hetzner, DigitalOcean, or AWS) to run it on.

What are the minimum system requirements for Coolify?

Coolify requires at least 2 CPU cores, 2 GB of RAM (4 GB recommended), and 30 GB of storage running Ubuntu 22.04+ or Debian 11+. Compiling large applications (like Next.js) will fail on low-RAM servers without proper swap space configured.

Can Coolify host databases?

Yes. Coolify features one-click deployments for PostgreSQL, MySQL, MariaDB, Redis, and MongoDB. It provisions them securely inside internal Docker networks and handles persistent volume mounting automatically.

How does Coolify handle SSL certificates?

Coolify uses Traefik as an internal reverse proxy. When you attach a custom domain to a deployed application, Traefik automatically requests, provisions, and renews a Let’s Encrypt SSL certificate without any manual configuration.

Do I need to write a Dockerfile to use Coolify?

No. While you can use a custom Dockerfile or Docker Compose file, Coolify integrates with Nixpacks. Nixpacks automatically analyzes your code repository, detects the language/framework (Node, Python, Go, etc.), and builds the container for you.

Is it safe to expose Coolify to the internet?

The Coolify dashboard is secure, but you must take basic server hardening steps. Enable Two-Factor Authentication (2FA) in the dashboard immediately, use SSH keys instead of passwords for server access, and configure a firewall (like UFW) to block unauthorized traffic.

How do I backup databases in Coolify?

Coolify has built-in backup scheduling. You can configure it to automatically dump your databases and upload the backups to any S3-compatible cloud storage (AWS S3, Cloudflare R2, MinIO, or Backblaze B2) on a cron schedule.

Can Coolify manage multiple servers?

Yes. Coolify supports multi-server architecture. You can install the dashboard on one server and add other remote servers (via SSH) as “Destinations.” You can then choose which physical server handles which application or database from a single dashboard.

How does Coolify compare to Portainer?

Portainer is a visual management tool for existing Docker environments — it requires you to understand Docker networking and volumes. Coolify is a full PaaS that abstracts Docker away entirely, offering automated Git deployments, automatic SSL, and Nixpacks builds.

Suresh S

Written by Suresh S

Systems Engineer & Tech Educator with 8+ years of experience in Linux Administration, Cloud Computing, and Cybersecurity. Founder of FreeTechLearner, dedicated to creating practical tutorials that help students and professionals build real-world skills.

Share this post:

Discussion

Loading comments...