Introduction
Heroku killed its free tier in 2022. Vercel’s Pro plan starts at $20/month. Render’s paid plans are climbing too. The major PaaS platforms are getting increasingly expensive. But if you already own a VPS, why not run your own Platform as a Service?
Coolify is the answer. It’s an open-source, self-hosted PaaS that runs on your VPS and supports deploying static sites, Node.js, Python, PHP, Docker containers, databases, and even WordPress. Dubbed “the open-source Heroku,” it’s easy to install and packed with features.
This guide walks you through deploying Coolify on your VPS and getting your first application live.
What is Coolify?
Coolify is an open-source, self-hosted PaaS (Platform as a Service) solution. It provides a visual web interface that lets you deploy applications from Git repositories, Docker images, or manual uploads.
Key Features:
- 🆓 Completely Free & Open-Source — No platform fees (just pay for your VPS)
- 🔄 Git Auto-Deploy — Connect GitHub/GitLab/Bitbucket; push to deploy
- 🐳 Native Docker Support — Deploy any Docker image
- 📦 Built-in Databases — One-click PostgreSQL, MySQL, Redis, MongoDB, and more
- 🔐 Auto SSL — Integrated Let’s Encrypt for automatic certificate provisioning & renewal
- 🌐 Custom Domains — Bind custom domains to each application
- 🔄 Automated Backups — Scheduled backups for databases and volumes
- 🎯 Resource Monitoring — Real-time CPU, memory, and disk usage
- 🏗️ Build Pack Support — Node.js, Python, PHP, Ruby, Go, Deno, static files
Comparison with Major PaaS Providers
| Feature | Coolify (Self-Hosted) | Heroku | Vercel | Railway |
|---|---|---|---|---|
| Monthly Cost | 💰 VPS cost ($4-10) | $5-$25+/mo | $20+/mo | $5-$20+/mo |
| App Limit | Unlimited | Plan-limited | Plan-limited | Plan-limited |
| Docker Support | ✅ Full | ❌ Limited | ❌ No | ✅ Full |
| Database Support | ✅ Full | ✅ Limited | ❌ No | ✅ Full |
| Deploy Methods | Git / Docker / Upload | Git | Git | Git / Docker |
| Open Source | ✅ Fully Open | ❌ Proprietary | ❌ Proprietary | ❌ Proprietary |
| Data Sovereignty | ✅ Full Control | ❌ Data on Heroku | ❌ Data on Vercel | ❌ Data on Railway |
Prerequisites
Before you begin, ensure you have:
- A VPS — Recommended: 2 vCPU / 4GB RAM / 40GB disk (minimum 1 vCPU / 2GB works)
- Docker & Docker Compose — Coolify runs on Docker
- A domain name (optional but strongly recommended) — For accessing the Coolify dashboard and deployed apps
- SSH access — To connect to your VPS
Recommended VPS Providers
- Hetzner Cloud — €4.15/month (best value)
- DigitalOcean — $6/month (great documentation)
- Vultr — $6/month (global presence)
- Linode (Akamai) — $5/month (good performance)
Step 1: Install Docker
If Docker isn’t installed on your VPS yet:
# Install Docker (Ubuntu/Debian)
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Add your user to the docker group
sudo usermod -aG docker $USER
# Log out and back in, or run
newgrp docker
# Verify
docker --version
docker compose version
Step 2: Install Coolify
Coolify provides a one-line install script:
# Download and run the installer
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
The installer automates:
- Pulling Coolify Docker images
- Creating directory structures
- Configuring the reverse proxy (Traefik by default)
- Setting up the PostgreSQL database
- Starting all services
When complete, you’ll see something like:
✅ Coolify is ready!
URL: http://<your-vps-ip>:8000
Username: admin
Password: <auto-generated-password>
⚠️ Log in immediately and change the default password!
Step 3: Initial Configuration
3.1 Log into the Dashboard
Open your browser at http://<your-vps-ip>:8000 and log in with the auto-generated credentials.
3.2 Configure Domain & SSL
Navigate to Settings → General and set the Coolify dashboard domain (e.g., coolify.yourdomain.com). Enable Let’s Encrypt auto-SSL.
Benefits:
- HTTPS-secured admin panel
- Subdomains inherit SSL configuration automatically
3.3 Configure DNS
Add this A record in your DNS management panel:
coolify.yourdomain.com → <Your VPS IP>
3.4 Add Your Server
Coolify can manage multiple servers. On the Servers page:
- Click Add Server
- Choose Remote Server
- Enter the server name and IP
- Choose authentication (SSH key recommended)
- Coolify installs the required agent automatically
If Coolify and your apps run on the same VPS, use Localhost mode (already configured by default).
Step 4: Deploy Your First Application
4.1 Git Repository Deployment
This is the most common workflow — connect a GitHub/GitLab repo and deploy on every push.
- Go to Applications → New
- Choose Private Repository or Public Repository
- Click Connect and authorize GitHub/GitLab
- Select the repository and branch
- Coolify auto-detects the project type:
package.json→ Node.jsrequirements.txt→ Pythoncomposer.json→ PHPDockerfile→ Docker- No build config → Static files
- Configure a domain (e.g.,
myapp.yourdomain.com) - Click Deploy
4.2 Deploy a Simple Node.js App
Here’s a minimal Express app to test with:
// app.js
const express = require('express');
const app = express();
const port = process.env.PORT || 3000;
app.get('/', (req, res) => {
res.send('Hello from Coolify! 🚀');
});
app.listen(port, () => {
console.log(`App running on port ${port}`);
});
{
"name": "coolify-demo",
"version": "1.0.0",
"scripts": {
"start": "node app.js"
},
"dependencies": {
"express": "^4.18.0"
}
}
Push this repo to GitHub, connect it to Coolify, and watch it auto-deploy in seconds.
4.3 Deploy a Docker Compose Application
For multi-container applications:
- In Applications → New, select Docker Compose
- Upload or paste your
docker-compose.yml - Coolify parses and displays all services
- Configure domains and environment variables per service
- Click deploy
Step 5: Database Management
Coolify has built-in database management — no need to spin up containers manually.
Supported database types:
- PostgreSQL — Relational database
- MySQL / MariaDB — Relational database
- MongoDB — NoSQL document database
- Redis — Cache / key-value store
- DragonFly — High-performance Redis alternative
- CouchDB — NoSQL database
- ClickHouse — Column-oriented analytics database
To create a database:
- Go to Databases → New
- Choose the database type and version
- Configure resource limits (CPU/memory)
- Set automatic backup policies
- Click Create
Once created, Coolify generates connection credentials (host, port, username, password) that you can inject directly into your application’s environment variables.
Step 6: Environment Variables & Configuration
Setting Environment Variables
In your application’s detail page, under Environment Variables:
- Key-Value pairs — Add one by one
- Bulk import — Import from a
.envfile - Service references — Auto-fill database connection URLs
Coolify also supports environment variable groups for sharing configuration across multiple applications.
Build-time vs Runtime Variables
- Build-time variables: Used during frontend builds (e.g.,
VITE_API_URL) - Runtime variables: Needed when the app is running (e.g.,
DATABASE_URL)
Coolify distinguishes between these automatically and injects them at the right stage.
Step 7: SSL Certificates & Custom Domains
Auto-SSL
Coolify integrates with Let’s Encrypt via ACME:
- Enable Auto SSL in the application settings
- Make sure your domain’s DNS A record points to your VPS
- Coolify handles certificate issuance and renewal automatically
Custom Domains
Binding a domain to your app:
- In the application’s Domains section, click Add Domain
- Enter your domain (e.g.,
blog.yourdomain.com) - Enable auto SSL
- Update DNS to point to your VPS
Coolify configures the reverse proxy (Traefik) to route traffic to the correct container.
Step 8: Git Auto-Deploy Pipeline
One of Coolify’s most powerful features is Git-driven deployment pipelines.
Setting Up Auto-Deploy
- Connect your app to a GitHub/GitLab repository
- Coolify automatically adds a webhook
- On every push to the configured branch, Coolify:
- Pulls the latest code
- Runs build commands (e.g.,
npm run build) - Builds a Docker image
- Deploys the new version
- Performs a health check
- Automatically rolls back if deployment fails
Deployment Rollback
If a new version causes issues, click the Rollback button in the Coolify dashboard to revert to any previous deployment. This is invaluable in production environments.
Advanced Tips
1. Multi-Server Load Balancing
Coolify can manage multiple VPS instances. Use this for:
- High availability
- Load balancing
- Geographic distribution
2. Custom Build Packs
For special requirements, customize build commands:
# Example: using pnpm instead of npm
npm install -g pnpm
pnpm install
pnpm build
pnpm start
3. Webhook Integration
Use Coolify as a deployment webhook endpoint for external CI/CD:
POST https://coolify.yourdomain.com/api/v1/deploy?force=false
Authorization: Bearer <your-api-token>
4. Resource Monitoring & Alerts
Coolify’s built-in monitoring dashboard shows:
- CPU usage history
- Memory consumption trends
- Disk I/O
- Network traffic
Set alert thresholds to receive notifications when resource usage exceeds limits.
Security & Maintenance Notes
- Security First: Only access the Coolify dashboard via HTTPS. Use a strong password.
- Resource Planning: Each app uses resources. Plan deployments according to your VPS specs.
- Backup Strategy: Regularly back up Coolify’s database and configuration (Settings → Backup).
- Stay Updated: Coolify notifies you of available updates. Apply them promptly for security patches.
- Firewall: Ensure ports 80, 443, and 8000 are open on your VPS firewall.
Conclusion
Coolify is a standout project in the self-hosting ecosystem. It gives VPS owners access to a full-featured PaaS experience at a fraction of the cost of commercial alternatives.
Key Takeaways:
- ✅ Completely free & open-source — no hidden fees
- ✅ One-click install, live in minutes
- ✅ Supports every major language and framework
- ✅ Git auto-deploy for smooth workflows
- ✅ Built-in database & SSL management
- ✅ Full control over your data
Instead of paying $20-$50+/month to Heroku, Vercel, or Railway, a $4-$10 VPS with Coolify lets you deploy dozens of applications with zero restrictions.
Give it a try today — turn your VPS into your personal PaaS and enjoy the freedom of self-hosted deployment.
Happy self-hosting! 🚀
