What You Will Build

By the end of this tutorial, a plain Ubuntu VPS will behave like your own private Vercel or Heroku. You will be able to push code to GitHub and have it auto-deploy over HTTPS, spin up PostgreSQL or Redis with one click, and host unlimited projects, all without per-app fees. Coolify is an open-source, self-hosted platform-as-a-service that wraps Docker, Traefik, and Let's Encrypt behind a clean dashboard. It is built for developers and agencies who want PaaS convenience without vendor lock-in, and it runs happily on a single $6-12/month VPS.

This guide is for anyone comfortable with SSH and basic Linux commands. You do not need Docker experience; Coolify installs and manages Docker for you.

Prerequisites

  • A fresh server running Ubuntu 24.04 or 22.04 LTS (64-bit). Debian 12 also works, but this guide uses Ubuntu.
  • At least 2 vCPUs and 4 GB RAM (2 GB is the bare minimum; builds stall on less), and 40 GB of disk.
  • A non-root user with sudo access, or root access.
  • A domain name you control (optional, but you need it if you want HTTPS for your apps, which you almost certainly do).
  • Your server's public IP address.

Step 1 — Point Your DNS to the Server (Do This First)

If you plan to host apps on a domain, create DNS A records now rather than later. DNS propagation takes time, and doing it first means records will be live by the time you finish installing. Point the records for every app you plan to host, for example:

@        A    203.0.113.10
app      A    203.0.113.10
coolify  A    203.0.113.10

The @ record covers the bare domain, app is where your first application will live, and coolify is a nice address for the dashboard itself. Replace 203.0.113.10 with your server's real IP. Coolify will request Let's Encrypt certificates automatically once it can reach your server over these names, so getting DNS out of the way early saves you a debugging round trip.

Step 2 — SSH In and Update the System

Connect to your server and bring the package lists and installed software up to date. Coolify's installer expects a clean, current system, and starting from stale packages is a classic source of weird install failures.

ssh deploy@203.0.113.10
sudo apt update && sudo apt upgrade -y

apt update refreshes the list of available packages, and apt upgrade -y installs the newer versions without asking for confirmation. Reboot if the upgrade installed a new kernel, so the running kernel matches the installed one.

Step 3 — Run the Coolify Installer

Coolify ships an official install script. It installs Docker Engine if it is missing, pulls the Coolify containers, and wires everything together. It takes 2-5 minutes on a fresh VPS, and the output will look like a lot of Docker image pulls, which is normal.

curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash

curl -fsSL downloads the script silently and fails loudly on HTTP errors instead of piping an error page into bash. The pipe to bash executes it immediately. You do not need to pre-install Docker; the script handles it. When it finishes, it prints the URL of your new dashboard: http://YOUR_SERVER_IP:8000. Do not close the terminal yet; the dashboard may take another 30-60 seconds to become responsive while the containers settle.

Note: If you prefer to inspect scripts before running them, download it first with curl -fsSL https://cdn.coollabs.io/coolify/install.sh -o install.sh, read it with less install.sh, then run sudo bash install.sh. The result is identical.

Step 4 — Open the Required Firewall Ports

Coolify needs a handful of ports reachable from the internet. On Ubuntu that usually means configuring ufw, which is often enabled by default on cloud images.

sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 8000/tcp
sudo ufw enable

Port 22 is SSH, 80/443 are HTTP/HTTPS for your apps and for Let's Encrypt's domain validation, and 8000 is the Coolify dashboard. ufw enable turns the firewall on with these rules; it will warn you that enabling may disrupt SSH, so confirm only when you are confident port 22 is allowed. If your cloud provider (Hetzner, DigitalOcean, AWS) has its own network firewall or security group, open the same ports there too; the OS firewall alone is not enough on those platforms.

Step 5 — Complete the Onboarding in Your Browser

Open http://YOUR_SERVER_IP:8000 in a browser. Coolify v4 greets you with a registration screen where you create the first admin account; there is no default password to look up. After registering, you land on the dashboard. Do three quick things here:

  1. Go to Settings and set your instance's timezone and notification preferences.
  2. Under Servers, confirm your local server shows as connected (it is added automatically during install).
  3. Skim the Keys & Tokens area; you will need an API token later if you want programmatic deploys.

This registration step only appears on first launch. Every subsequent visit goes straight to the login screen, so keep your credentials somewhere safe; there is no password reset email until you configure SMTP.

Step 6 — Give the Dashboard Its Own Domain and HTTPS

Running the admin panel over plain HTTP on port 8000 is fine for a quick test, but for daily use you want it on a proper domain with HTTPS. If you created the coolify A record in Step 1, go to Settings, find the instance domain field, and enter https://coolify.yourdomain.com. Coolify provisions a Let's Encrypt certificate for it automatically through its built-in Traefik reverse proxy. After saving, wait a minute and visit the new URL. From now on, manage Coolify at that address; you can close port 8000 on the firewall once the domain works.

sudo ufw delete allow 8000/tcp

This removes the raw dashboard port from the firewall. The dashboard is now reachable only through its HTTPS domain, which is a meaningful security upgrade for an admin panel.

Step 7 — Deploy Your First App from GitHub

This is the moment the PaaS magic shows up. In the dashboard, go to Projects, create a project, and inside its production environment click Add resource, then choose Public Repository. Paste the URL of any public GitHub repo, for example a simple Node.js or static site.

Coolify inspects the repo and picks a build strategy automatically, usually Nixpacks, which detects the language and builds a Docker image without a Dockerfile. Accept the defaults, then in the resource's Domains section add the domain you pointed at the server in Step 1 (for example https://app.yourdomain.com), and hit Deploy.

Watch the live build log. A first deploy takes a few minutes while the base images download; later deploys reuse cached layers and are much faster. When the status flips to running, visit your domain. It should load over HTTPS with a valid certificate, issued automatically moments after the deploy finished. For private repos, connect your GitHub account under Sources first, which also enables automatic redeploys on every push to your chosen branch.

Step 8 — Add a Database with One Click

Most apps need a database, and Coolify treats databases as first-class resources. In the same project environment, click Add resource again and choose Database, then pick PostgreSQL (MySQL, MariaDB, MongoDB, and Redis are also available). Coolify provisions a containerized database with a generated root password, persistent storage, and scheduled backups.

Open the database resource, copy the internal connection URL, and paste it into your app's environment variables (the Environment Variables tab of your app resource) as DATABASE_URL. Redeploy the app. Because the app and database run on Coolify's internal Docker network, the connection stays inside the server: fast, and never exposed to the public internet. This pattern, app plus managed database plus automatic HTTPS, covers the vast majority of side projects and client sites.

Verify It Worked

Run these three checks from your server's terminal to confirm the installation is healthy:

docker ps --format "table {{.Names}}\t{{.Status}}" | head -20
curl -s -o /dev/null -w "%{http_code}\n" http://localhost:8000
sudo systemctl is-active docker

The first command lists Coolify's containers; you should see the main Coolify service and its database marked Up. The second should print 200, proving the dashboard is answering locally. The third should print active, confirming Docker itself is running. Then do the real-world test: visit your dashboard domain and your deployed app's domain in a browser, and check that both load over HTTPS with no certificate warnings.

Common Issues and Fixes

1. "Connection refused" on port 8000 right after installing

The installer finished, but the containers need 30-90 seconds to initialize their databases. Wait two minutes and retry. If it still fails, check that ufw (Step 4) actually allowed the port, and on cloud providers confirm the provider-level firewall or security group allows it too.

2. Let's Encrypt certificate never issued for a domain

Almost always a DNS problem. From your laptop run dig +short app.yourdomain.com and confirm it returns your server's IP. Let's Encrypt validates over port 80, so that port must be reachable from the public internet, not just from your office. Also note the rate limit: five duplicate certificates per domain per week, so do not repeatedly delete and re-add the same domain while debugging.

3. First app build hangs or runs out of memory

Nixpacks builds are the hungriest part of Coolify. On a 2 GB server, a Node.js or Python build can exhaust RAM and stall silently. The fix is a bigger server: 4 GB RAM is the practical minimum for building real apps. You can watch memory pressure during a build with free -h in a second SSH session. Also check the build log tab in the dashboard; the actual error is usually in the last twenty lines.

4. Docker does not start after a server reboot

Coolify configures Docker's restart policies correctly, but if Docker itself is not enabled as a system service, nothing comes back up. Run sudo systemctl enable --now docker once, and verify with sudo systemctl is-enabled docker, which should print enabled.

5. Disk fills up over weeks of deploys

Every deploy leaves old images and build cache behind. Reclaim the space with docker system prune -a -f, which removes unused images, stopped containers, and build cache. Run it monthly, or set it as a scheduled task. Coolify also has built-in cleanup settings under Settings that prune automatically; turn those on so the disk never surprises you.

Conclusion

You now have a self-hosted PaaS on Ubuntu: one-click deploys from Git, managed databases, automatic HTTPS, and no per-project bill. The same server comfortably hosts dozens of small apps, staging environments, and client sites, and because everything runs in Docker, migrating to a bigger machine later is a backup-and-restore operation, not a rebuild. From here, explore Coolify's scheduled tasks for cron jobs, its S3-compatible backups for off-site safety, and additional build servers when a single machine is no longer enough.

If you would rather have an expert set this up for you, XpertBees configures and manages self-hosted platforms like Coolify on client VPS infrastructure every week, including hardened firewalls, backup strategies, and monitoring. Reach out through the contact page and we will get your PaaS production-ready.