How to Install Coolify on an Ubuntu 24.04 Dedicated Server

Coolify is a powerful, open-source, and self-hostable Platform as a Service (PaaS) that serves as an excellent alternative to Heroku, Netlify, and Vercel. Learn how to manage servers, applications, and databases on your own hardware using Docker—without the risk of vendor lock-in.

Running Coolify on a dedicated server running Ubuntu 24.04 LTS gives you complete control over your infrastructure, maximum performance, and the ability to scale your deployments cost-effectively.

This comprehensive tutorial will guide you through the latest, technically verified steps to securely install and configure Coolify v4 on an Ubuntu 24.04 dedicated server.

Prerequisites

Before diving into the installation, ensure your dedicated server meets the following official minimum requirements for Coolify to function optimally:

  • Operating System: A fresh, clean installation of Ubuntu 24.04 LTS.
  • CPU: Minimum 2 CPU Cores.
  • RAM: Minimum 2 GB RAM (4 GB or more is highly recommended if deploying multiple apps/databases).
  • Storage: At least 30 GB of total disk space, with a strict minimum of 20 GB of available free space for the script to proceed.
  • Network: A valid public IPv4 address.
  • Access: Logged in directly as the root user (non-root users are not fully supported yet).
  • Domain Name: A registered domain name (e.g., yourdomain.com) pointing to your server's IP address.

Step 1: Prepare the System, Update Packages, and Add Swap Space

Connect to your server via SSH. Because Coolify requires pure root access to correctly assign directory ownership, switch to the root user immediately if you logged in as a standard user:

Bash
sudo -i
Security Best Practice

It is highly recommended to log in using SSH keys rather than a password. For production servers, consider disabling root password authentication in /etc/ssh/sshd_config to protect against brute-force attacks.

Update the package lists and upgrade existing packages:

Bash
apt update && apt upgrade -y

Ensure curl is installed (the Coolify installer relies on it):

Bash
apt install curl -y

(Note: If the upgrade process installs a new kernel, it is recommended to reboot your server and reconnect before proceeding).

Configure Swap Space (Crucial for Servers with < 4GB RAM)

Building Docker images (especially Node.js/Next.js applications) causes massive memory spikes. To prevent your server from crashing due to out-of-memory (OOM) errors, it is highly recommended to create a 4GB swap file:

Bash
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab

Step 2: Configure the UFW Firewall (Security Hardening)

Ubuntu 24.04 comes with UFW (Uncomplicated Firewall). Allow standard SSH, HTTP, HTTPS, and port 8000 (the default port for the Coolify dashboard during initial setup):

Bash
ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 8000/tcp

Enable the firewall and verify:

Bash
ufw enable
ufw status
Crucial Security Warning regarding Docker and UFW By default, Docker manipulates iptables directly. This means if you deploy a database in Coolify and bind it to a public port, Docker will expose that port to the internet even if UFW is configured to block it. Coolify's built-in Traefik router handles web traffic securely, but you must never manually map internal database ports to the host network.

Step 3: Run the Official Coolify Installation Script

Coolify provides an automated script that handles dependencies, provisions Docker, and sets up the required file structures under /data/coolify.

Important Note: Do not use a snap installation of Docker. If you have Docker installed via snap, remove it (snap remove docker) before running this script.

Execute the official installation script as the root user:

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

What this script does in the background:

  • Installs the official Docker Engine (version 24+) and Docker Compose.
  • Creates the core directory tree at /data/coolify.
  • Generates secure, randomized secrets for the internal services.
  • Pulls the required images from the GitHub Container Registry (ghcr.io) and boots up the core containers: coolify, coolify-db, coolify-redis, coolify-realtime, coolify-helper, and coolify-proxy.

This process typically takes 3 to 10 minutes depending on your network speed.

Step 4: Initial Dashboard Setup and Admin Account

Open your web browser and navigate to your server's IP address on port 8000:

http://your_server_ip:8000

  1. Register the Admin Account: The very first user to register on a fresh instance is automatically granted full administrative rights. Enter your Name, Email, and a strong password.
  2. Complete the Onboarding Wizard: Coolify will automatically detect localhost as the primary server. Click Validate Server to confirm communication with the underlying Docker daemon.

Step 5: Configure a Custom Domain and Clean Up

Accessing your PaaS dashboard via an IP address is insecure.

  1. Configure DNS: Log into your domain registrar and create an A Record pointing your chosen subdomain (e.g., coolify.yourdomain.com) to your server's public IP.
Note on DNS Propagation

DNS updates can take anywhere from a few minutes to a few hours. Ensure your DNS has fully propagated before proceeding to the next step; otherwise, Traefik will fail to provision your Let's Encrypt SSL certificate.

  1. Update Coolify: In the Dashboard, navigate to Settings -> Configuration. In the Instance Domain field, enter your full URL (e.g., https://coolify.yourdomain.com) and save.
  2. Wait for SSL: Coolify's built-in Traefik proxy will request a free Let's Encrypt certificate. You can now access your dashboard securely via HTTPS.
  3. Close Port 8000: Return to your server's terminal and close the unencrypted port for maximum security:
Bash
ufw delete allow 8000/tcp

Troubleshooting Common Installation Issues

  • Insufficient Disk Space Error: If the script fails, run df -h / and check the "Avail" column. Coolify strictly requires 20GB of free space.
  • Port 8000 is Already in Use: Run ss -tulpn | grep :8000 to find the conflicting process ID (PID) and terminate it using kill <PID>.
  • IPv6 Routing Failures (ghcr.io timeouts): On some hosting providers, outbound IPv6 routing is misconfigured, causing the script to timeout when fetching Docker images from GitHub. Force the server to prefer IPv4 by running:
Bash
echo "precedence ::ffff:0:0/96 100" >> /etc/gai.conf

Conclusion

You have successfully installed and secured Coolify on your Ubuntu 24.04 dedicated server! You now have a production-ready, self-hosted PaaS environment to connect GitHub repositories, deploy applications, and spin up one-click databases with zero platform fees.

Deploy Your Ubuntu 24.04 Dedicated Server with Fit Servers Today!

Experience enterprise-grade hardware, 99.99% uptime guarantees, and 24/7 expert support to keep your applications running smoothly. Whether you're hosting web apps on Coolify or managing complex infrastructure, Fit Servers provides the raw power you need.

Configure your server today!