How to Set Up Coolify on a VPS (Open-Source Heroku Alternative)

If you’ve ever used platforms like Heroku, you know how easy it is to deploy applications without worrying about infrastructure. But the downside is cost, limited control, and vendor lock-in.
That’s where Coolify comes in.
Coolify is an open-source, self-hosted platform that gives you:
- One-click deployments
- Git-based CI/CD
- Built-in SSL
- Docker-based apps
- Full control over your infrastructure
In this guide, you’ll learn how to set up Coolify on a VPS step by step, so you can run your own Heroku-like platform for free.
What is Coolify?
Coolify is a self-hosted Platform-as-a-Service (PaaS) that allows you to deploy applications directly from Git repositories.
It supports:
- Node.js apps
- PHP applications
- Docker containers
- Static websites
Why Use Coolify Instead of Heroku?
1. No Monthly Costs
You only pay for your VPS.
2. Full Control
You own your infrastructure and data.
3. Unlimited Apps
No artificial limits like SaaS platforms.
Requirements
Before setting up Coolify on a VPS, you need:
- VPS (Ubuntu 22.04 recommended)
- Minimum 2GB RAM (4GB recommended)
- Root or sudo access
- Domain name (optional but recommended)
Step 1: Connect to Your VPS
ssh root@your-server-ip
Update system:
sudo apt update && sudo apt upgrade -y
Step 2: Install Docker
Coolify runs on Docker.
curl -fsSL https://get.docker.com | bash
Verify:
docker --version
Step 3: Install Docker Compose
sudo apt install docker-compose -y
Step 4: Install Coolify
Run the official install script:
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
This will:
- Install required services
- Configure Docker containers
- Set up Coolify dashboard
Step 5: Access Coolify Dashboard
Open browser:
Create admin account.
Step 6: Connect Your Server
Coolify may prompt you to connect your server internally. Confirm the setup.
Step 7: Add Your First Project
- Click “New Project”
- Connect Git repository
- Select branch
- Choose deployment type
Step 8: Deploy Your App
Coolify automatically:
- Builds app
- Runs container
- Exposes service
Step 9: Set Up Domain
Add domain inside Coolify dashboard.
Example:
👉 app.yourdomain.com
Step 10: Enable SSL
Coolify provides automatic SSL using Let’s Encrypt.
Step 11: Configure Environment Variables
Add variables like:
- DATABASE_URL
- API_KEYS
Step 12: Monitor Deployments
Coolify provides:
- Logs
- Deployment status
- Resource usage
Advanced Features
Multiple Applications
Run multiple apps on same VPS.
Database Support
Supports MySQL, PostgreSQL.
GitHub Integration
Auto deploy on push.
Performance Optimization
- Use VPS with SSD
- Allocate enough RAM
- Monitor containers
Common Issues
Port Conflicts
Ensure ports are free.
Docker Errors
Restart Docker:
systemctl restart docker
Best Practices
- Use domain + SSL
- Backup data
- Monitor logs
- Limit access
Real-World Insight
Coolify is perfect if:
- You want Heroku-like simplicity
- Without recurring cost
- With full DevOps control
FAQs
Is Coolify free?
Yes, fully open-source.
Can I use it in production?
Yes, widely used.
Final Thoughts
Setting up Coolify on a VPS gives you a powerful, flexible, and cost-effective platform to deploy applications without relying on expensive cloud services.
