Skip to content

How to install Coolify on a VPS and deploy from Git

Coolify is an open source, self hosted platform for deploying applications, databases and services, similar to Heroku, Netlify or Vercel but on your own server. You point it at a Git repository, it builds a Docker image, runs the container, routes a domain to it and gets an HTTPS certificate. This guide installs Coolify on a fresh VPS, secures the first login and deploys an app from a public repository.

What you need

  • A VPS with Ubuntu 24.04 (other LTS versions and Debian work too). Coolify needs at least 2 CPU cores, 2 GB RAM and 10 GB of free disk. That minimum covers Coolify itself, while your apps are built and run on the same server.
  • Our recommendation is VPS-4 (4 vCPU, 8 GB RAM, 128 GB NVMe). Builds with Nixpacks or a Dockerfile use a lot of CPU and memory for a few minutes, and every app and database adds its own container. VPS-3 (2 vCPU, 4 GB RAM) is enough for a couple of small sites. Compare options on the Coolify VPS page.
  • SSH access. See how to connect via SSH.
  • A domain for the dashboard and apps, with access to its DNS settings.

Step 1. Connect and update the server

bash
ssh root@YOUR_SERVER_IP
apt update && apt upgrade -y

Use a clean server. Coolify manages Docker and its own reverse proxy, so it works best when nothing else listens on ports 80 and 443.

Step 2. Run the install script

Coolify has an official installer. Run it as root:

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

The script installs Docker if it is missing, downloads the Coolify containers and starts them. It takes a few minutes. When it finishes it prints the address of the dashboard.

Docker from snap

If Docker was installed from snap, remove it before running the script, or let the script install Docker for you. The snap version is not supported.

Step 3. Create the admin account immediately

Open the dashboard in your browser:

http://YOUR_SERVER_IP:8000

You see a registration page. Create your admin account right away. The first person to register becomes the instance admin with root level control over the server, so do not leave the page open for someone else to find.

Coolify then walks you through a short onboarding. When it asks where to deploy, choose the server Coolify is running on. It is added automatically as localhost.

Step 4. Save the installation secrets

Coolify keeps its secrets, including APP_KEY, in /data/coolify/source/.env. You need this file to restore Coolify on another server. Copy it to your computer:

bash
scp root@YOUR_SERVER_IP:/data/coolify/source/.env ./coolify.env

Store it somewhere private, like a password manager.

Step 5. Open the right ports

A fresh Ubuntu image has UFW disabled. If you use it, allow these ports before turning it on:

PortPurpose
22/tcpSSH
80/tcpHTTP and certificate generation through the Coolify proxy
443/tcpHTTPS through the Coolify proxy
8000/tcpDashboard by IP address
6001/tcpReal time dashboard updates by IP address
6002/tcpWeb terminal by IP address
bash
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 8000/tcp
ufw allow 6001/tcp
ufw allow 6002/tcp
ufw enable

Never remove the SSH rule, or you lock yourself out. Keep in mind that ports published by Docker containers bypass UFW, so the firewall does not hide containers you expose on purpose.

Step 6. Add a domain for the dashboard

Working through an IP and port 8000 over plain HTTP is fine for the first minutes, but the dashboard should get its own domain with HTTPS.

  1. In your DNS provider create an A record, for example coolify pointing to YOUR_SERVER_IP.
  2. Wait until it resolves. Check with dig coolify.example.com.
  3. In Coolify open Settings and enter https://coolify.example.com as the instance domain. Save.
  4. Open the new address. Coolify's proxy gets a Let's Encrypt certificate automatically.

Once the dashboard works on the domain, ports 8000, 6001 and 6002 are no longer needed from the outside. With UFW you can remove them:

bash
ufw delete allow 8000/tcp
ufw delete allow 6001/tcp
ufw delete allow 6002/tcp

Step 7. Deploy an app from Git

Take any public repository with a web app, for example a Node.js, Python or static site project.

  1. Open Projects, pick a project (or create one) and its environment, then click + New.
  2. Choose Public Repository, paste the HTTPS URL of the repository and click Check Repository.
  3. Select the branch and the Build Pack. Nixpacks detects the language and framework automatically. Choose Dockerfile if the repository has one, or Docker Compose for multi container projects.
  4. For a server app enter the internal port it listens on, for example 3000. For a static site enable the static option and set the publish directory.
  5. Continue to the application page. Add environment variables under Configuration if the app needs them.
  6. In the Domains field enter https://app.example.com. Create an A record for app pointing to the same server IP.
  7. Click Deploy and watch the build log.

When the deployment finishes, open https://app.example.com. Coolify has issued the certificate and routes traffic to the container. For private repositories connect GitHub or another Git provider in Sources first.

Keep Coolify healthy

  • Updates. Coolify shows available updates in the dashboard and can install them from there.
  • Disk space. Every build leaves images and build cache behind. Watch disk usage and use Coolify's cleanup settings for the server if the disk fills up.
  • Databases. Coolify can create PostgreSQL, MySQL, Redis and other databases in a few clicks. Configure scheduled backups for them in the database settings, preferably to external S3 compatible storage.
  • Email. Outgoing mail ports are closed on DataPasa by default, so apps should send email through an HTTPS API such as Postmark, Resend or Amazon SES.

Summary

Coolify turns a single VPS into your own deployment platform: one install command, an admin account, a domain for the dashboard, and every Git push can become a running app with HTTPS. Start with VPS-4 for comfortable builds and scale up as you add apps. See all plans on the Coolify VPS page.