--- title: "How to Install Coolify on Ubuntu 24.04 as a Self-Hosted PaaS" description: "Install Coolify on Ubuntu 24.04, secure the dashboard with your own domain and HTTPS, then deploy a Git application and a PostgreSQL database with backups." category: "Web Applications Extended" language: en source: https://cubepath.com/docs/web-applications-extended/coolify-self-hosted-paas-installation updated: 2026-09-25 --- # How to Install Coolify on Ubuntu 24.04 as a Self-Hosted PaaS Coolify is an open-source, self-hosted platform as a service (PaaS) that builds and runs your applications, databases and services as Docker containers, with automatic HTTPS through a Traefik proxy. It gives you a Heroku or Netlify style workflow on a server you control. In this tutorial you will install Coolify on Ubuntu 24.04, put the dashboard behind your own domain with a Let's Encrypt certificate, deploy an application from a Git repository and add a PostgreSQL database with scheduled backups. ## Prerequisites To follow this tutorial you need: - A fresh server running Ubuntu 24.04 LTS, for example a CubePath VPS, with at least 2 vCPUs, 2 GB of RAM and 30 GB of free disk. Use 4 GB of RAM or more if you plan to build several applications on the same server, since builds are memory hungry. - SSH access as `root` or as a user with `sudo` privileges. The Coolify installer must run as root. - A domain name. You will create DNS records for `coolify.your_domain` (the dashboard) and a wildcard `*.your_domain` or individual records for your applications, all pointing to `your_server_ip`. - No other web server listening on ports 80 or 443. Coolify's proxy needs both. > Important: Install Coolify on a dedicated server. The installer manages Docker, and its proxy takes over ports 80 and 443, so it will conflict with an existing Nginx, Apache or Docker setup. Don't have a server yet? Get [Coolify VPS hosting](/coolify) ready in minutes. ## Step 1 - Creating the DNS records Coolify issues certificates with the HTTP-01 challenge, so the DNS records must already point to your server when you add a domain. In your DNS provider, create these records: | Type | Name | Value | |------|------|-------| | A | `coolify` | `your_server_ip` | | A | `*` (optional wildcard) | `your_server_ip` | The wildcard record lets Coolify generate hostnames such as `myapp.your_domain` for every new application without touching DNS again. Check that the records resolve before continuing: ```bash dig +short coolify.your_domain ``` ```output your_server_ip ``` ## Step 2 - Configuring the firewall Allow SSH, HTTP and HTTPS, plus the ports Coolify uses before a domain is configured: `8000` for the dashboard, `6001` for real-time updates and `6002` for the web terminal. ```bash sudo ufw allow OpenSSH sudo ufw allow 80/tcp sudo ufw allow 443/tcp sudo ufw allow 8000/tcp sudo ufw allow 6001/tcp sudo ufw allow 6002/tcp sudo ufw enable ``` Verify the rules: ```bash sudo ufw status ``` ```output Status: active To Action From -- ------ ---- OpenSSH ALLOW Anywhere 80/tcp ALLOW Anywhere 443/tcp ALLOW Anywhere 8000/tcp ALLOW Anywhere 6001/tcp ALLOW Anywhere 6002/tcp ALLOW Anywhere ... ``` > Note: Ports published by Docker containers bypass UFW rules because Docker writes its own iptables rules. Never publish a database port to the internet unless you mean to, and treat UFW as protection for host services only. ## Step 3 - Installing Coolify Coolify's supported installation method is its install script, which installs Docker Engine, creates `/data/coolify` and starts the Coolify containers. Download it first so you can read it before running it: ```bash curl -fsSL https://cdn.coollabs.io/coolify/install.sh -o coolify-install.sh less coolify-install.sh ``` When you are happy with what it does, run it as root: ```bash sudo bash coolify-install.sh ``` The installation takes a few minutes. When it finishes, the script prints the address of the dashboard: ```output ... Your instance is ready to use! You can access Coolify through your Public IP: http://your_server_ip:8000 ``` Confirm that the Coolify containers are running: ```bash sudo docker ps --format 'table {{.Names}}\t{{.Status}}' ``` ```output NAMES STATUS coolify Up 2 minutes (healthy) coolify-realtime Up 2 minutes (healthy) coolify-db Up 2 minutes (healthy) coolify-redis Up 2 minutes (healthy) ``` The configuration, including generated secrets, lives in `/data/coolify/source/.env`. Back up this file: you need it to restore the instance. ## Step 4 - Creating the admin account Open `http://your_server_ip:8000` in your browser. The first account registered on a new instance becomes the root administrator, so do this immediately after the installation finishes, before anyone else can reach the page. 1. Register with your email and a strong password. 2. In the onboarding wizard, choose **This Machine** (localhost) as the server where resources will be deployed. Coolify validates the server over SSH and starts the proxy. After onboarding, the Traefik proxy container appears: ```bash sudo docker ps --filter name=coolify-proxy --format '{{.Names}}\t{{.Status}}' ``` ```output coolify-proxy Up 30 seconds (healthy) ``` ## Step 5 - Serving the dashboard on your domain with HTTPS Using the dashboard over plain HTTP on port 8000 sends your session and credentials unencrypted. Give it a domain instead: 1. Go to **Settings** and set the instance domain to `https://coolify.your_domain`. 2. Save. Coolify reconfigures Traefik, which requests a Let's Encrypt certificate for that hostname. 3. Go to **Servers**, open **localhost** and set **Wildcard Domain** to `https://your_domain` if you created the wildcard record. New applications will then get a generated `https://.your_domain` address. After a minute, open `https://coolify.your_domain`. Verify the certificate from the command line: ```bash curl -sI https://coolify.your_domain | head -n 1 ``` ```output HTTP/2 302 ``` A redirect to the login page is expected. Once the dashboard works over HTTPS, close the direct ports so the panel is only reachable through the proxy: ```bash sudo ufw delete allow 8000/tcp sudo ufw delete allow 6001/tcp sudo ufw delete allow 6002/tcp ``` ## Step 6 - Deploying an application from Git Coolify builds an application from a Git repository using one of several build packs: **Nixpacks** (detects the language automatically), **Dockerfile**, **Docker Compose** or **Static**. The example below deploys a public repository. For private repositories, connect a GitHub App under **Sources** first; Coolify then lists your repositories and configures push webhooks for you. 1. Go to **Projects**, create a project (for example `production`) and open its default environment. 2. Click **+ New** and choose **Public Repository**. 3. Paste the repository URL and pick the branch. 4. Choose the build pack. If your repository has a `Dockerfile` at its root, select **Dockerfile**; otherwise leave **Nixpacks**. 5. Set **Ports Exposes** to the port your application listens on inside the container (for example `3000` for a typical Node.js app). 6. In **Domains**, enter `https://myapp.your_domain`. The `https://` prefix tells Coolify to request a certificate. 7. Click **Deploy**. If you build with a Dockerfile, make sure the app listens on `0.0.0.0` and not only on `localhost`. A minimal Node.js example: ```dockerfile FROM node:22-alpine WORKDIR /app COPY package*.json ./ RUN npm ci --omit=dev COPY . . EXPOSE 3000 CMD ["node", "server.js"] ``` Follow the build in the **Deployments** tab of the application. When it finishes, test the application from your workstation: ```bash curl -I https://myapp.your_domain ``` ```output HTTP/2 200 ... ``` Environment variables such as API keys belong in the application's **Environment Variables** tab, not in the repository. Changing them requires a redeploy to take effect. ## Step 7 - Adding a PostgreSQL database with backups Coolify runs databases as containers in the same Docker network as your applications, so apps can reach them by an internal hostname without exposing any port. 1. In your project environment, click **+ New** and choose **PostgreSQL**. 2. Keep the generated username and password, or replace them with your own strong values, then click **Start**. 3. Copy the **Postgres URL (internal)** from the database page and add it to your application as `DATABASE_URL` in **Environment Variables**, then redeploy the application. The database page shows its status as **Running** once the container is healthy. You can confirm from the server that a PostgreSQL container is up: ```bash sudo docker ps --format '{{.Names}}\t{{.Image}}\t{{.Status}}' | grep postgres ``` To configure backups, open the database and go to **Backups**. Add a scheduled backup with a cron expression such as `0 3 * * *` (every day at 03:00). To keep copies off the server, first add an S3-compatible bucket under **S3 Storages** and select it in the backup settings. Run the backup once manually and confirm it appears in the list with a successful status. ## Step 8 - Keeping Coolify updated Coolify can update itself. In **Settings**, you can enable automatic updates or apply an available update from the dashboard. You can also update manually by re-running the install script, which keeps your data in `/data/coolify`: ```bash curl -fsSL https://cdn.coollabs.io/coolify/install.sh -o coolify-install.sh sudo bash coolify-install.sh ``` Keep the operating system patched as well: ```bash sudo apt update && sudo apt upgrade ``` ## Troubleshooting **The dashboard does not load on port 8000.** Check that the containers are up and read the Coolify logs: ```bash sudo docker ps -a --filter name=coolify sudo docker logs coolify --tail 100 ``` **A certificate is not issued for a domain.** The DNS record must point to this server and port 80 must be reachable from the internet. Check resolution with `dig +short myapp.your_domain` and read the proxy logs for ACME errors: ```bash sudo docker logs coolify-proxy 2>&1 | grep -i acme ``` **The build fails or the server freezes during builds.** Builds run on the same server, and running out of memory is the most common cause. Check with `free -h` and add swap or move to a plan with more RAM. **The app deploys but returns 502 or 503.** The value in **Ports Exposes** does not match the port the application listens on, or the app listens on `127.0.0.1` inside the container. Check the application logs in the **Logs** tab. ## Conclusion You installed Coolify on Ubuntu 24.04, moved the dashboard behind HTTPS on your own domain, deployed an application from Git and connected it to a PostgreSQL database with scheduled backups. From here you can connect a GitHub App for automatic deploys on push, add more servers under **Servers** so builds and workloads run on separate machines, or deploy one of Coolify's one-click services from the **+ New** menu.