You can install Coolify on a 2-vCPU/4-GB KVM VPS in under 10 minutes and get Vercel-like deployments with zero per-seat fees. Coolify is an open-source platform-as-a-service that runs on your own server. It connects to GitHub, builds your app with Nixpacks, and serves it over HTTPS through Traefik. You pay only for the VPS. There are no bandwidth overages, no seat limits, and no surprise invoices because a preview deployment stayed active for three weeks.
This guide shows you how to install Coolify on a fresh Ubuntu VPS, harden the server, resolve common port conflicts, and deploy your first application. It also explains when a self-managed PaaS is the right choice and when Linux server administration is the safer move.
Why Developers Are Leaving Managed PaaS for Coolify
Managed platforms like Vercel, Heroku, and Render charge for convenience. That convenience becomes expensive when you add team members, exceed bandwidth allowances, or run background workers. A $20 monthly project can become a $200 invoice without warning.
Coolify removes the vendor layer. You provide the server. Coolify provides the automation. The result is git-push deployments, automatic SSL, preview URLs, one-click databases, and container health checks on infrastructure you control. The tradeoff is that you become responsible for updates, backups, and security. If you are comfortable with SSH and basic Linux commands, the tradeoff is usually worth it. If you are not, the time you spend debugging builds and patching the host OS can cost more than the PaaS subscription.
What Coolify Needs from Your VPS
Coolify runs as a set of Docker containers. It needs Docker Engine, a reverse proxy (Traefik by default), an internal PostgreSQL database, and enough headroom to build and run your applications. The official documentation specifies these minimums:
- CPU: 2 cores
- RAM: 2 GB
- Storage: 30 GB SSD
- OS: Ubuntu 20.04 LTS or newer (Ubuntu 24.04 recommended)
- Network: public IPv4, ports 22, 80, 443, and 8000 accessible
In practice, the platform itself consumes 750 MB to 1.2 GB of RAM before you deploy a single app. On a 2 GB VPS, that leaves roughly 800 MB for your application and database. That is enough for one lightweight Node.js or PHP service, but it leaves no margin for build spikes or traffic bursts.
For production hosting or multiple projects, 4 GB of RAM is the practical starting point. If you plan to run PostgreSQL, Redis, and a Next.js application on the same server, 8 GB is safer. CPU matters during builds. Nixpacks compilation is CPU-intensive. A dedicated KVM core compiles faster and more predictably than a shared container vCPU that is throttled by neighboring tenants.
ServerSpan offers both shared LXC containers and dedicated KVM virtual machines. The LXC tiers work for evaluation and light workloads. For production builds and consistent runtime performance, a KVM VPS with dedicated cores is the better foundation.
Step 1: Provision and Harden the Server
Start with a fresh Ubuntu 24.04 server. Coolify can coexist with existing software, but port conflicts on 80 and 443 are the most common source of installation failure. If the server already runs NGINX or Apache, decide now whether to remove it or to configure Coolify's Traefik instance on alternative ports. For a first install, a clean server is faster.
Update the system and install basic utilities:
sudo apt update && sudo apt upgrade -y
sudo apt install curl wget git ufw fail2ban -y
Create a non-root user with sudo access. Even though Coolify's installer runs as root, daily administration should not:
adduser deployer
usermod -aG sudo deployer
Configure the firewall before you install anything that opens ports. Allow SSH, HTTP, HTTPS, and the Coolify dashboard port. Restrict port 8000 to your office IP if possible:
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 8000/tcp
sudo ufw enable
Enable fail2ban to protect SSH from brute-force attempts:
sudo systemctl enable fail2ban
sudo systemctl start fail2ban
If you are using password authentication, switch to SSH keys now. Coolify itself will generate an SSH key pair to manage the local Docker daemon, so the server must support key-based auth.
Step 2: Install Coolify
Coolify provides a single official installer. It detects your distribution, installs Docker Engine and Docker Compose, creates the directory structure at /data/coolify/, pulls the Coolify images, starts Traefik, starts PostgreSQL, and launches the dashboard.
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
The installation takes 3 to 5 minutes on a VPS with SSD storage and a stable connection. When it finishes, the terminal prints the dashboard URL, typically http://your-server-ip:8000. It also warns you to back up the environment file at /data/coolify/source/.env. That file contains encryption keys and database credentials. Copy it to your password manager or to secure external storage before you proceed.
Verify that the core containers are running:
docker ps | grep coolify
Good output shows containers named coolify, coolify-realtime, coolify-proxy (Traefik), and coolify-database (PostgreSQL). If any container is missing, check the installation log at /data/coolify/source/installation-*.log or inspect the Docker service with journalctl -u docker -f.
Step 3: First Login and Basic Configuration
Open the dashboard URL in your browser. The first account you create becomes the administrator. Use a strong password and a valid email address for notifications.
During onboarding, Coolify asks you to confirm the server type. Choose localhost for a single-server setup. The wizard then creates a default project and verifies that Coolify can reach the local Docker daemon over SSH.
Immediately after onboarding, go to Settings → Configuration and disable public registration. If port 8000 is open to the internet, anyone who finds your IP can create an account until you turn this off.
Set your instance domain under Settings → Instance Domain. Use a subdomain such as https://coolify.yourdomain.com. Point an A record from that subdomain to your server IP, then save. Coolify requests a Let's Encrypt certificate through Traefik and redirects HTTP to HTTPS automatically.
Step 4: Deploy Your First Application
Coolify supports GitHub, GitLab, and Bitbucket. Connect your source provider under Sources, then create a project and add an application.
The deployment workflow is straightforward:
- Select your repository and branch.
- Choose the build pack. Nixpacks auto-detects Node.js, Python, Go, PHP, and static sites.
- Add your domain (for example,
app.yourdomain.com) and enable automatic HTTPS. - Set environment variables if your application needs database URLs or API keys.
- Click Deploy.
Coolify clones the repository, builds a Docker image, starts the container, and configures Traefik to route traffic to it. For a typical Next.js or Laravel application, the first build takes 1 to 3 minutes depending on dependency size and available CPU.
If you need a database, go to New Resource → Database and select PostgreSQL, MySQL, Redis, or MongoDB. Coolify runs the database in a container on the same Docker network, so your application connects using the internal hostname (for example, postgres or redis) rather than a public IP.
Step 5: Troubleshoot Common First-Install Problems
Traefik Cannot Bind to Port 80 or 443
This is the most common failure on servers that previously hosted websites. If NGINX or Apache is already running, Traefik cannot claim the ports it needs for Let's Encrypt and HTTP routing.
Check which service holds the port:
sudo ss -tlnp | grep -E ':(80|443)'
If NGINX appears in the output, stop and disable it:
sudo systemctl stop nginx
sudo systemctl disable nginx
Then restart the Coolify proxy container:
cd /data/coolify/source
docker compose restart coolify-proxy
If you must keep NGINX running for other sites, you can configure it as a reverse proxy upstream to Traefik on non-standard ports, but that adds complexity. For a dedicated PaaS server, removing NGINX is the cleaner path.
Build Failures and Where to Read Logs
When a Nixpacks build fails, the error surface is usually in the application logs inside the Coolify dashboard. Navigate to Application → Deployments → [latest build] and read the output stream.
If the dashboard log is truncated or the container exited before logging started, read directly from the builder container:
docker logs coolify-builder --tail 200
Common build failures include out-of-memory kills during npm install, missing build scripts in package.json, and native dependency compilation errors on Alpine-based images. If the build fails with a 137 exit code, the container was killed by the Linux OOM killer. That almost always means your VPS needs more RAM.
SSL Certificates Not Issuing
Let's Encrypt requires valid DNS, reachable port 80, and no rate-limit violations. Verify DNS propagation first:
dig +short yourdomain.com
If the IP matches your server, check Traefik's ACME logs:
docker logs coolify-proxy 2>&1 | grep -i acme
Rate limits are 5 certificates per domain per week. If you hit the limit, you must wait or use a staging certificate until the window resets.
Step 6: Resource Planning and VPS Sizing
Coolify's resource footprint is predictable once you understand the overhead. The platform reserves roughly 750 MB to 1.2 GB of RAM for itself. Everything above that is available for your applications and databases.
Here is how common ServerSpan LXC tiers map to Coolify workloads:
| ServerSpan Plan | Specs | Coolify Fit |
|---|---|---|
| ct.Entry | 1 Core / 512 MB / 10 GB | Insufficient. Below minimum requirements. |
| ct.Ready | 2 Cores / 2 GB / 25 GB | Minimum viable. One lightweight app only. No headroom. |
| ct.Steady | 4 Cores / 4 GB / 50 GB | Good starting point. One app plus one database. |
| ct.Go | 4 Cores / 8 GB / 80 GB | Comfortable. Multiple apps, databases, and build concurrency. |
The LXC plans are cost-effective for evaluation and small static sites. For production workloads where build speed and runtime consistency matter, step up to a dedicated KVM plan. KVM gives you dedicated CPU cores that are not shared with other tenants. A Nixpacks build that takes 90 seconds on a dedicated core can take 5 minutes or longer on a heavily loaded shared host.
Disk space also deserves attention. Docker images, build caches, and container layers consume storage faster than traditional native hosting. A 25 GB VPS fills quickly after pulling Node.js base images and building a few applications. Plan for at least 50 GB, and monitor with df -h and docker system df weekly.
Security and Maintenance After Installation
Installing Coolify is only the beginning. A self-hosted PaaS is a production control plane. If it is compromised, every application and database on the server is compromised.
Apply these maintenance rules:
- Enable automatic security updates with
unattended-upgrades. - Keep the
/data/coolify/source/.envfile backed up externally. Without it, you cannot recover the instance. - Run
docker system prune -a --volumesmonthly to remove dangling images and reclaim disk space. Do this during a maintenance window, not during active builds. - Set log rotation in
/etc/docker/daemon.jsonto prevent container logs from filling the disk. - Restrict port 8000 to your IP or a VPN once the instance domain is working.
- Review user access under Settings → Members monthly. Remove former team members immediately.
For a deeper guide on managing Docker in production without letting containers destabilize your host, see ServerSpan's article on managing Docker and containers on a VPS.
When Self-Hosting Coolify Makes Sense (and When It Does Not)
Self-hosting is the right choice when you want predictable costs, full data control, and the ability to deploy unlimited applications on a fixed monthly bill. It fits solo developers, small agencies, and startups that outgrew shared hosting but do not want to pay per-seat PaaS fees.
It is the wrong choice when nobody on your team has time to patch the OS, monitor disk space, rotate logs, or troubleshoot failed builds at midnight. A broken build pipeline on a client project is not a theoretical problem. It is a deadline problem. If you do not have someone watching the server, managed hosting or a managed PaaS is usually safer than a fragile DIY setup.
In production hosting environments, the common failure pattern is not the initial install. It is the six-month mark, when Docker images have drifted, log files have filled the disk, and a security update for the host kernel has been pending for weeks. Coolify does not remove the need for server administration. It only automates the deployment layer.
Next Steps: Choose Your VPS and Deploy
If you are ready to run your own PaaS, start with a 4 GB RAM server and a clean Ubuntu 24.04 image. Install Coolify, harden the firewall, connect your first Git repository, and deploy. The whole process takes less than 30 minutes from server creation to live application.
If you are deploying multiple client projects and need dedicated resources without noisy-neighbor builds, compare ServerSpan's KVM VPS hosting options and pick the RAM and core count that fit your workload. For teams that prefer to focus on code instead of infrastructure, ServerSpan's Linux server administration service can handle hardening, updates, logs, and recovery planning while you manage deployments through Coolify.
Frequently Asked Questions
Can I run Coolify on a 2 GB RAM VPS?
Yes, but only for a single lightweight application. Coolify itself uses 750 MB to 1.2 GB of RAM. That leaves less than 1 GB for your app and database. If the app grows or traffic spikes, the OOM killer will terminate containers.
Does Coolify work with Debian instead of Ubuntu?
Yes. The install script supports Debian 11 and newer. Ubuntu 24.04 LTS is the recommended path because it receives the most testing and has the widest driver support for cloud VPS environments.
Can I use Coolify with an existing NGINX setup?
Only if you reconfigure ports. Traefik and NGINX both bind to 80 and 443 by default. You must stop NGINX, run Traefik on alternative ports with an NGINX upstream, or move existing sites into Coolify as containerized applications.
Where are Coolify backups stored?
Coolify can back up databases to any S3-compatible storage. The platform does not back up the host OS automatically. You must configure server-level backups or snapshot your VPS through your provider's control panel.
Is Coolify free for commercial use?
Yes. Coolify is open source under the Apache 2.0 license. There is no per-app or per-seat cost. You pay only for the VPS and any optional cloud services you connect.
Source & Attribution
This article is based on original data belonging to serverspan.com blog. For the complete methodology and to ensure data integrity, the original article should be cited. The canonical source is available at: Stop Paying the Vercel Tax: Self-Host Coolify on Your VPS and Deploy Like a PaaS.