Deploying applications can be a complex process, especially if you're managing multiple projects. Coolify offers a streamlined solution for developers who want control without the complexity. In this guide, I'll walk you through what Coolify is and how to set it up on your own VPS.
What is Coolify?
Coolify is an open-source, self-hostable alternative to platforms like Heroku and Netlify. It's designed to simplify the deployment and management of applications, websites, and databases on your own infrastructure. With Coolify, you can deploy applications directly from Git repositories with just a few clicks.
Why Use Coolify?
- Complete Control: You own your infrastructure and data
- Cost-Effective: Eliminate ongoing SaaS subscription fees
- Privacy: Your code and data stay on your servers
- Customization: Configure everything to your exact needs
- One-Click Deployments: Deploy applications straight from your Git repositories
- Multiple Application Support: Host various applications, websites, and databases in one place
Prerequisites
Before installing Coolify, ensure your VPS meets these requirements:
- At least 2 CPU cores
- Minimum 4 GB RAM
- 40 GB storage
- Ubuntu 20.04 or newer (Ubuntu 24.04 recommended)
- Root or sudo access
- SSH access
- Internet connection
- Basic understanding of Docker
Step-by-Step Installation Guide
Step 1: Connect to Your VPS
Connect to your server via SSH:
ssh root@your_server_ip
Step 2: Update Your System
Always start with a fully updated system:
apt update && apt upgrade -y
Step 3: Verify Docker Installation
Coolify requires Docker and Docker Compose. Check if Docker is already installed:
docker --version
If Docker isn't installed, follow the official Docker installation guide for your Ubuntu version from the Docker documentation.
Step 4: Install Coolify
The simplest way to install Coolify is using the official installation script:
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | sudo bash
Step 5: Access Coolify Dashboard
After installation completes successfully, the script will display your Coolify URL (typically http://your_server_ip:8000
).
To access your dashboard:
- Visit this URL in your web browser
- You'll be redirected to a registration page
- Create your first admin account immediately
Making Coolify Publicly Accessible
By default, Coolify might only be accessible locally. Let's configure it for public access.
Step 1: Configure Firewall Rules
First, check your firewall status:
sudo ufw status
If UFW isn't installed:
sudo apt install ufw
# Allow SSH
sudo ufw allow ssh
# Allow Coolify main port
sudo ufw allow 8000/tcp
# Allow HTTP and HTTPS for deployed applications
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
# Enable the firewall
sudo ufw enable
Step 2: Verify Port Binding
Ensure Coolify is listening on all interfaces:
sudo netstat -tulpn | grep 8000
You should see it bound to 0.0.0.0:8000 rather than just 127.0.0.1:8000.
Step 3: Restart Coolify
After making changes, restart Coolify:
cd /data/coolify/source
docker compose down
docker compose up -d
Step 4: Test External Access
Now try accessing Coolify from outside your server:
http://your-server-ip:8000
If you don't know your server's public IP address, use:
curl -4 icanhazip.com
Setting Up a Custom Domain for Your Coolify Dashboard
For a more professional setup, you can configure Coolify to use your own domain.
Step 1: Add DNS Record
First, add an A record at your domain registrar:
- Type: A
- Name: coolify (or subdomain of your choice, or @ for root domain)
- Value: Your server's IP address
Step 2: Update Coolify Configuration
Modify Coolify's environment variables:
cd /data/coolify/source
# Backup existing environment file
cp .env .env.backup
# Edit the .env file
nano .env
Add or update these variables:
APP_URL=https://yourdomain.com
COOLIFY_FQDN=yourdomain.com
Step 3: Restart Coolify with New Configuration
cd /data/coolify/source
# Stop everything
docker compose --env-file .env -f docker-compose.yml -f docker-compose.prod.yml stop
# Start everything fresh
docker compose --env-file .env -f docker-compose.yml -f docker-compose.prod.yml up -d
Coolify should now be accessible via your custom domain!
Verifying Your Installation
To ensure everything is running properly:
1. Check Container Status:
docker ps
Look for Coolify-related containers running without errors.
2. Check Logs:
cd /data/coolify/source
docker compose logs
3. Test Dashboard Access:
Visit your dashboard URL (either IP:8000 or your custom domain) in a browser.
Conclusion
Coolify provides a powerful, self-hosted platform for managing your applications. By following this guide, you've successfully set up your own deployment platform that gives you complete control over your infrastructure.
With Coolify up and running, you can now deploy websites, applications, and databases with ease—all from a clean, user-friendly dashboard that you control.
Upcoming
explore more open-source technologies while solving real life problems.
Stay tuned and happy deploying!
Top comments (0)