Deploy with Coolify: The Self-Hoster's Guide to Running Any App on Your Own VPS
Heroku killed its free tier. Railway and Render get expensive fast. And raw Docker Compose on a VPS means writing Nginx configs, managing SSL certs, and SSH-ing in every time something needs updating. Coolify is the open-source PaaS that lives on your own server and gives you the deployment experience of a modern cloud platform — automatic HTTPS, Git-based deploys, database management, environment variable editing, and a clean dashboard — without the per-dyno bill. This guide walks you through a complete Coolify setup and shows you how to deploy with Coolify from a blank VPS to a running multi-app server.
Prerequisites
- A fresh Linux VPS — Ubuntu 22.04 LTS strongly recommended (Coolify's installer is tested against it)
- At least 2 vCPU and 2GB RAM — 4GB+ recommended if you're running multiple apps
- A public IP address and SSH root access
- A domain name with DNS access — you'll point subdomains at your server for each app
- Ports 22, 80, 443, and 8000 open (8000 is Coolify's own dashboard port)
- No existing Nginx, Apache, or other web server running on the machine — Coolify manages its own Traefik reverse proxy
Connect to your VPS and confirm the environment:
ssh root@your-server-ip
# Check OS version
lsb_release -a
# Confirm required ports are free
ss -tlnp | grep -E ':80|:443|:8000'
# Check available resources
free -h
nproc
What Is Coolify and How Does It Work?
Coolify is an open-source self-hosted PaaS (Platform as a Service). It installs on your server and provides a web UI for deploying and managing applications, databases, and services — all backed by Docker under the hood.
What Coolify Manages For You
- Reverse proxy — Traefik is installed and managed automatically. Add a domain to any app and HTTPS is configured with Let's Encrypt without touching a config file.
- Docker orchestration — every app, database, and service runs in Docker containers. Coolify generates and manages the Compose configs.
- Git-based deployments — connect GitHub, GitLab, or Gitea. Push to a branch and Coolify rebuilds and redeploys automatically.
- Database management — deploy PostgreSQL, MySQL, MongoDB, Redis, and others as managed services with automatic backups.
- Environment variables — set and update secrets from the dashboard. No SSH required after initial setup.
- Multi-server support — manage apps across multiple VPS instances from one Coolify dashboard.
Coolify vs. Raw Docker Compose
Raw Docker Compose is fine for a single service you set up once. But when you're running 5–10 services — n8n, Keycloak, a custom API, a frontend, a database — Coolify gives you a control plane that makes adding, updating, and monitoring services manageable without a full-time DevOps engineer. For a detailed example of deploying a specific tool through Coolify, see our guide on n8n Coolify deployment.
Installing Coolify on Your VPS
Run the Installer
Coolify has a one-line installer that handles everything: Docker installation, Coolify setup, Traefik configuration, and service startup:
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
The installer takes 3–5 minutes. It will:
- Install Docker Engine and Docker Compose
- Pull and start the Coolify stack (dashboard, proxy, database)
- Print your dashboard URL when complete
Watch the output for the final line — it will tell you to open http://your-server-ip:8000. Do that and complete the initial setup wizard.
Verify the Installation
# Check Coolify service status
sudo systemctl status coolify
# Verify Coolify containers are running
docker ps | grep coolify
# Check Traefik is up (Coolify's reverse proxy)
docker ps | grep traefik
# Confirm the dashboard is responding
curl -I http://localhost:8000
You should see Coolify containers running: coolify, coolify-db, coolify-redis, and coolify-proxy (Traefik). All should be in Up status.
First-Time Setup
Open http://your-server-ip:8000 in your browser. You'll be walked through:
- Creating your admin account (email + password)
- Registering your server — Coolify will connect to
localhostvia SSH internally - Choosing whether to use Coolify's own domain or a custom domain for the dashboard
Once the wizard completes, you're in the Coolify dashboard. The server is already connected and ready for deployments.
Securing the Dashboard with a Custom Domain and HTTPS
Running the Coolify dashboard over plain HTTP on port 8000 is fine for initial setup but not for ongoing use. Move it to a proper domain with HTTPS before you deploy anything sensitive.
Point a DNS Record at Your Server
# DNS A record for Coolify dashboard
Type: A
Name: coolify (→ coolify.yourdomain.com)
Value: YOUR_SERVER_IP
TTL: 300
# Verify DNS propagation before proceeding
dig +short coolify.yourdomain.com
# Must return your server IP before Coolify can provision a cert
Configure the Custom Domain in Coolify
Go to Settings → Configuration in the Coolify dashboard and set:
- App URL:
https://coolify.yourdomain.com - Let's Encrypt Email: your email address for cert notifications
Save, then go to Servers → your server → Proxy and click Save Configuration. Coolify updates Traefik's routing rules and provisions a Let's Encrypt cert automatically. Within 60 seconds, https://coolify.yourdomain.com is live with a valid certificate.
Deploying Your First Application
Deploying from a Docker Image
The simplest deploy path: use a pre-built Docker image. From the Coolify dashboard, click New Resource → Application → Docker Image.
As an example, here's deploying a simple web app from Docker Hub:
- Set Docker Image:
traefik/whoami - Set Internal Port:
80 - Set Domain:
https://whoami.yourdomain.com - Toggle SSL on
- Click Deploy
Coolify pulls the image, starts the container, configures Traefik routing, and provisions an SSL cert. The entire process takes under 60 seconds. Visit https://whoami.yourdomain.com to confirm it's live.
Deploying from a Docker Compose File
For multi-service apps, use the Docker Compose deployment type. Paste your Compose config directly into Coolify's editor. Here's a working example deploying a Node.js app with a Redis cache:
version: '3.8'
services:
app:
image: node:18-alpine
working_dir: /app
volumes:
- ./app:/app
command: node server.js
environment:
- REDIS_URL=redis://redis:6379
- PORT=3000
restart: unless-stopped
labels:
# Coolify reads these to configure Traefik routing
- coolify.managed=true
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- redis_data:/data
volumes:
redis_data:
Set the domain and port in Coolify's UI fields rather than hardcoding Traefik labels — Coolify injects those automatically when you specify a domain and internal port.
Deploying from a Git Repository
Connect GitHub or GitLab under Settings → Source, then create a new application and select your repo. Coolify builds your app using the Dockerfile in the repo root (or Nixpacks for buildpack-style auto-detection) and deploys on every push to the configured branch.
Set up the webhook in your Git provider so Coolify triggers automatically. The webhook URL is shown in your application's Webhooks tab in Coolify.
Managing Environment Variables
Go to your application → Environment Variables. Add key-value pairs from the UI. Mark sensitive values as secret — they're encrypted at rest and masked in logs. No SSH required to update env vars; just save and redeploy:
# Example environment variables for a typical web app
DATABASE_URL=postgresql://user:password@db:5432/myapp
REDIS_URL=redis://redis:6379
JWT_SECRET=your-jwt-secret-here
API_KEY=your-api-key-here
NODE_ENV=production
PORT=3000
Deploying Databases and Persistent Services
Managed Database Deployment
Coolify has first-class support for databases. Go to New Resource → Database and choose from PostgreSQL, MySQL, MariaDB, MongoDB, Redis, DragonFly, or KeyDB.
Coolify handles:
- Container setup with secure defaults
- Persistent volume mounting
- Generating a connection string you can copy directly into your app's env vars
- Scheduled backups to S3-compatible storage (configure under database settings)
The generated connection string format looks like:
# Coolify-generated PostgreSQL connection string format:
postgresql://coolify:generated-password@your-server-ip:PORT/database-name
# For internal container-to-container connections (same server):
postgresql://coolify:generated-password@postgres-container-name:5432/database-name
# Use the internal URL when your app is on the same Coolify server
# Use the external URL for connecting from your local machine or external tools
Connecting Apps to Coolify-Managed Databases
When your app and database are both on the same Coolify server, use the internal network name for the connection — it's faster and doesn't expose the database port publicly. Coolify shows both URLs in the database detail page.
Don't expose database ports publicly unless you specifically need external access. In Coolify's database settings, toggle Publicly Available off to keep the port bound only to the Docker internal network.
Tips, Gotchas, and Troubleshooting
SSL Certificate Not Provisioning
The most common issue after adding a domain to an app. Before Coolify can get a cert, your DNS must resolve to the server and port 80 must be reachable (Let's Encrypt uses HTTP-01 challenge):
# Verify DNS resolves to your server
dig +short yourapp.yourdomain.com
# Confirm port 80 is open
sudo ufw status
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
# Check Traefik logs for certificate errors
docker logs coolify-proxy --tail 50 | grep -i acme
docker logs coolify-proxy --tail 50 | grep -i error
App Deploys but Returns 502
Traefik can reach the container but can't talk to the app. Usually a port mismatch — the internal port in Coolify's settings doesn't match what your app actually listens on:
# Find what port your container is actually listening on
docker ps | grep your-app-name
docker inspect your-container-id | jq '.[0].NetworkSettings.Ports'
# Check app logs for the actual bound port
docker logs your-container-name --tail 30 | grep -i listen
docker logs your-container-name --tail 30 | grep -i port
# Update the internal port in Coolify's app settings to match, then redeploy
Coolify Dashboard Itself Goes Down
# Restart the Coolify service
sudo systemctl restart coolify
# Or restart individual containers
docker restart coolify
docker restart coolify-db
docker restart coolify-redis
# Check Coolify's own logs
docker logs coolify --tail 50
Updating Coolify
Coolify has a built-in update button in the dashboard under Settings → Update. You can also update via the CLI:
# Update Coolify via CLI
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
# The installer is idempotent — running it again updates to the latest version
# Your apps, databases, and configs are preserved
# Verify update
docker inspect coolify | jq '.[0].Config.Image'
Running Multiple Servers from One Dashboard
Coolify's multi-server feature lets you manage apps across several VPS instances from one dashboard. Go to Servers → Add a Server, paste the IP and SSH private key, and Coolify handles the connection. Deploy apps to any connected server from the same UI — useful when you outgrow one machine or want to separate workloads by server.
Pro Tips
- Use Coolify's built-in backup for databases — configure S3-compatible storage under each database's settings. Automated daily backups cost almost nothing and have saved countless self-hosters from data loss during updates.
- Enable resource limits per app — in the app's Advanced settings, set CPU and memory limits to prevent one noisy app from starving others on the same server.
- Use preview deployments for pull requests — Coolify can spin up isolated deployments for each PR branch automatically. Useful for staging reviews before merging to main.
- Watch the persistent storage settings carefully — by default, some app types don't persist data between redeploys. For anything stateful, explicitly add a volume in the app settings before your first deploy.
- Keep Coolify on its own subdomain with 2FA or IP restriction — your Coolify dashboard controls everything on your server. Treat access to it as carefully as you'd treat root SSH access.
What to Deploy Next
Once Coolify is running, the real fun starts. Every self-hosted tool covered elsewhere in the sysbrix guide series deploys cleanly through Coolify — the pattern is always the same: paste a Docker Compose config, set environment variables, add a domain, hit Deploy.
A natural starting point for most teams is automation: our guide on n8n Coolify deployment walks through exactly how to deploy n8n through Coolify with persistent storage, PostgreSQL, and a custom domain — the same pattern applies to virtually any other tool in your stack.
Wrapping Up
Deploying with Coolify changes the economics of self-hosting. A single $10–$20/month VPS becomes a platform that can run a dozen apps, with automatic HTTPS, Git-based CI/CD, managed databases, and a control plane that any developer on your team can use — no SSH or Docker expertise required for day-to-day operations.
Install it on a fresh Ubuntu VPS, secure the dashboard with a domain and HTTPS, deploy one app to confirm the pattern works, then start migrating workloads off cloud platforms one by one. Within a week you'll have a self-hosted stack that costs a fraction of what you were paying before — and you'll actually understand what's running on it.
Want Your Entire Stack Designed and Deployed on Coolify?
If you're migrating from cloud platforms to self-hosted infrastructure — or building a new stack from scratch — the sysbrix team can design the architecture, set up Coolify, deploy your apps, configure backups, and hand it over running. We do the infrastructure work so your team can focus on the product.
📚 More Coolify Guides on Sysbrix