Install and Configure Coolify on a Self-Hosted Ubuntu Server
Coolify is an open-source, self-hosted Platform as a Service (PaaS) that delivers a Heroku-like developer workflow on infrastructure you control. Rather than manually setting up Docker, reverse proxies, databases, and CI/CD pipelines on each server, you can install Coolify once, connect more machines through SSH, and deploy containerized applications from one central web dashboard.
This guide walks you through the beginner-friendly process of installing and configuring Coolify on a self-hosted Ubuntu server. You will learn how to connect extra servers, deploy your first containerized application, create a database, enable HTTPS, and resolve common problems so you can run modern workloads on cloud servers or virtual machines without the complexity of operating a full Kubernetes cluster.
Key Takeaways
- Self-hosted PaaS for modern workloads: Deploy and manage Docker-based applications such as Node.js, Laravel, Go, and Next.js with automatic HTTPS, protected secrets management, and built-in logs.
- Fast installation and quick launch: Start with a single command that installs Docker, Traefik, and the Coolify dashboard, reducing setup work so you can focus more on your applications.
- Simple multi-server management: Add additional servers through SSH to run applications, databases, and background jobs, all controlled from the centralized Coolify interface.
- Smooth Git integration: Connect GitHub, GitLab, or other repositories to trigger builds and deployments whenever code is pushed, with integrated health checks for better reliability.
- Ready for production use: Use centralized logging, encrypted secrets, environment-specific variables, persistent volumes, and automated job scheduling to operate stable, always-available services.
By completing this tutorial, you will understand how to deploy, secure, and operate Coolify as a flexible, self-hosted PaaS for everything from small side projects to serious production workloads.
What Is Coolify and Why Should You Use It?
Coolify places Docker, reverse proxy management, and multi-node orchestration behind a web interface, allowing you to:
- Deploy containerized applications without writing raw Docker Compose or Traefik configuration files.
- Organize applications, databases, and background workers into projects and environments.
- Add new servers using SSH keys instead of performing manual package installations.
- Standardize deployments across local systems and cloud-based infrastructure.
Coolify is a strong middle-ground option for teams that have outgrown basic single-server setups, custom Nginx proxies, or simple shell scripts, but do not yet want to manage the operational complexity of a full Kubernetes cluster. It is a self-hosted Platform as a Service that builds useful abstractions on top of familiar components.
Key Features of Coolify
Coolify is built to feel familiar for developers who have used managed PaaS platforms before:
- Unified dashboard: Manage applications, databases, queues, storage, and jobs from a single interface.
- Projects and environments: Structure resources into projects with production, staging, and preview environments.
- Multi-server support: Connect multiple virtual machines as managed servers and assign applications or databases to specific nodes.
- Git integration: Deploy directly from Git repositories using Dockerfiles or presets for common frameworks.
- Integrated reverse proxy and HTTPS: Traefik automatically manages routing and Let’s Encrypt certificates.
- Secrets and configuration: Store project-specific environment variables and secrets securely, then inject them into services during deployment.
- Volumes and storage: Attach persistent volumes or network storage to stateful services such as PostgreSQL or Jenkins.
- Scheduled tasks: Run cron-style jobs inside containers for backups, cleanup routines, or recurring scripts.
Choosing the Right Deployment Model: Local, Cloud, and Multi-Server Setups
As with many modern platforms, Coolify can be deployed in several different ways:
| Option | Pros | Cons | Recommended For |
|---|---|---|---|
| Single local server | Quick setup and no cloud costs | No redundancy and limited resources | Personal projects and local labs |
| Single cloud-based Coolify server | Simple architecture with straightforward DNS and HTTPS setup | Applications and databases share the same resources | Small teams and prototypes |
| Coolify server plus application servers | Separated workloads with better scalability and resilience | Requires planning for networking and node allocation | Production applications and multi-team environments |
| Hybrid local and cloud setup | Combines on-premises and cloud resources | More complex to manage and understand | Organizations with an existing on-premises infrastructure footprint |
For most developers and small teams, running one Coolify server together with one or more application or database servers in the same region provides a good balance between simplicity and resilience.
Prerequisites
Before installing Coolify, make sure the following requirements are in place:
- An Ubuntu 22.04 LTS server, or a newer version, for the Coolify server
- At least 4 CPU cores, 4 GB of RAM, and 80 GB of disk space on the server
- A domain name pointing to the Coolify server for the dashboard and HTTPS
- Root or sudo access through SSH
- An SSH key pair for authentication against managed servers
- Optional but recommended: an additional virtual machine for databases or CPU-intensive workloads
Although Coolify can install Docker automatically, it is useful to understand basic Docker commands.
Step 1 — Set Up the Coolify Server
Start by connecting to the server that will become your Coolify server. This machine is the main node responsible for managing your applications and infrastructure.
Replace 192.168.2.2 with the actual domain name or IP address of your server. If the server was just created, make sure your SSH key has been added through your infrastructure provider’s dashboard or by manual configuration.
For example, connect as the root user:
ssh root@192.168.2.2
Update the package index and install available security updates:
sudo apt update && sudo apt upgrade -y
Ensure the Hostname Resolves Correctly
Coolify requires the server hostname to resolve to a non-loopback IP address. If the hostname resolves to 127.0.0.1 or to multiple IP addresses, certain operations may fail or display confusing addresses.
Check how the hostname resolves:
hostname --ip-address
If only loopback addresses, such as 127.0.0.1, are returned, edit /etc/hosts:
sudo nano /etc/hosts
Example:
127.0.0.1 localhost
192.0.2.10 coolify-server.example.com coolify-server
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Save the file and run the hostname check again:
hostname --ip-address
You should now see the routable IP address of your Coolify server.
Step 2 — Install Coolify
Coolify provides a single-command installer that sets up Docker, Traefik, the core services, and the dashboard.
Run the following command:
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | sudo bash
The script will:
- Validate the operating system and required dependencies
- Install Docker and supporting packages if necessary
- Deploy Coolify and its internal services
- Show the dashboard URL after the setup is complete
When the installation finishes, usually after 3 to 5 minutes, you will see an output.
The installer displays the dashboard URL. Make a note of any credentials or additional instructions shown in the terminal output.
Open the URL in your browser:
https://coolify-server.example.com
Note: If DNS propagation has not completed yet, you can temporarily access the dashboard through the server IP address.
Step 3 — Complete the Initial Coolify Web Interface Setup
When you open Coolify for the first time, the platform guides you through an onboarding process to configure the instance:
Create the Owner Account
- Email address
- Name
- Strong password
Review the Basic Configuration
- Instance name, if desired
- Default language and time zone
- Telemetry and update preferences
Create Your First Project
- Use a project name such as
My First Project - Keep the default production environment
- Optionally prepare staging or preview environments for later use
This first setup creates your control plane and gives you a dedicated place to begin adding servers and applications.
Step 4 — Add Managed Servers
The Coolify server runs the Coolify dashboard and selected platform services. Your applications and databases can run on:
- the Coolify server itself, or
- additional managed servers connected through SSH.
To add a new server from the dashboard:
- Go to Servers → Add Server.
- Choose Local, for the same machine, or SSH, for a remote server.
For SSH-based servers, provide:
- Hostname or IP address, for example
app-1.example.com - SSH user, such as
rootor a user with sudo permissions
Coolify generates an SSH key and displays it in the dashboard. Copy the full public key, which starts with ssh-ed25519 or ssh-rsa, and add it to the target server’s ~/.ssh/authorized_keys file:
echo "ssh-ed25519 AAAA...your-actual-key-here... coolify" | sudo tee -a ~/.ssh/authorized_keys
Note: Replace the placeholder AAAA...your-actual-key-here... with the complete public key shown in the Coolify dashboard.
Click Verify in the Coolify interface to confirm that the connection works.
After verification, Coolify installs Docker and its agent on the managed server. This usually takes 1 to 2 minutes. The dashboard then displays CPU, RAM, disk, and status metrics for the new server.
Repeat the process for:
- Application servers that run API and web services
- Database servers for PostgreSQL, MySQL, or MongoDB
- Job-runner servers for cron-style workloads
Step 5 — Deploy an Application from Git
Most production workloads are deployed from your own repositories. Coolify can build and deploy these applications directly from Git.
- In the dashboard, connect your Git provider, such as GitHub, GitLab, Gitea, or another supported service.
- Add a new application and select Git Repository as the source.
- Choose the repository and branch, for example
main. - Provide a Dockerfile or use a preset for common frameworks.
Configure environment variables and secrets:
NODE_ENV=production
DATABASE_URL=postgres://user:password@db:5432/app
API keys for third-party services
Example Dockerfile for a Node.js or Next.js application:
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/.next ./.next
COPY package*.json ./
RUN npm ci --omit=dev
EXPOSE 3000
CMD ["npm", "start"]
- Enable auto-deployment on push if you want every commit to start a new build and rollout.
- Click Deploy to run the first build and deployment.
Coolify clones the repository, builds the image with BuildKit caching, starts the container, and connects it to Traefik for HTTPS routing. Depending on Dockerfile complexity, the build usually takes 2 to 5 minutes. Open the application detail page and select the Logs tab to follow the build progress in real time.
Note: During first deployments, check the logs carefully for build errors. Frequent causes include missing dependencies, incorrect Dockerfile paths, or misconfigured environment variables.
Step 6 — Provision Databases and Supporting Services
Coolify includes recipes for common supporting services:
- PostgreSQL
- MySQL / MariaDB
- Redis
- MongoDB
To create a PostgreSQL instance:
- Inside your project, click Add Resource → Databases → PostgreSQL.
- Choose the target server.
- Select the version, for example
15. - Define the storage size and volume path.
Coolify creates the container, defines a database name, user, and password, and exposes a connection URI. The credentials are displayed in the dashboard and are automatically saved in your project secrets.
Copy the connection URI from the database resource page, located under Connection Information, and use it in your application environment variables. Example format:
DATABASE_URL=postgres://app_user:strongpassword@postgresql:5432/app_db
Note: Replace the example values with the real credentials generated by Coolify. The connection URI format can differ depending on the network configuration. Use the service name postgresql for containers in the same project, or the full domain for external connections.
You can also manage:
- Database backups using scheduled jobs
- Read replicas by creating additional instances and updating your application configuration
Example: Deploy Jenkins with Coolify
To verify your Coolify setup and understand how containerized applications work in practice, you can deploy a well-known service such as Jenkins. This example shows how to deploy a pre-built Docker image from Docker Hub.
Use Case
Jenkins is a widely used CI/CD automation server that many teams rely on for building, testing, and deploying applications. When you deploy Jenkins through Coolify, you can manage it alongside your other applications, use automatic HTTPS, and move or scale it to different servers more easily.
Deployment Steps
- Inside your project, click Add Resource → Applications.
- Select a template or choose Docker Hub / Container Registry and search for
jenkins/jenkins:lts.
Configure the application:
- Name:
jenkins-ci - Server: Select the managed server that should run Jenkins
- Domain:
jenkins.example.com - Port:
8080, which is the Jenkins default - Volumes: Map
/var/jenkins_hometo a named volume, or to an attached disk path such as/mnt/data/jenkins_home, so Jenkins configuration and job data remain persistent.
Save the configuration and click Deploy.
Coolify will:
- Pull the Jenkins image from Docker Hub
- Create the Docker network and volume
- Start the container
- Stream logs during startup
Once the status changes to Running:
- open
https://jenkins.example.comin your browser to begin the built-in Jenkins onboarding process.
After a few moments, Jenkins should be fully installed and operational.
You can install plugins, create jobs, and configure Jenkins as you would in a traditional installation, while also benefiting from Coolify’s management interface, automatic HTTPS, and easier backup and restore options through volume management.
This example demonstrates how Coolify simplifies the deployment of any containerized application, whether it is a ready-made image from a registry or a custom application built from your Git repositories.
Troubleshooting Common Errors
| Error or Symptom | Possible Cause | Suggested Fix |
|---|---|---|
| Hostname resolves only to 127.0.0.1 | Incorrect /etc/hosts configuration |
Map the hostname to the public IP address and run hostname --ip-address again. |
| Server does not register through SSH | Missing SSH key or restrictive firewall rules | Add Coolify’s public key to authorized_keys and allow port 22 from the Coolify server IP. |
| Application remains in an exited state | Crash loop, port conflict, or incorrect environment variables | Review container logs, adjust the port mapping, or fix environment variables. |
| HTTPS certificate is not issued for a domain | DNS has not propagated or port 80 is blocked | Check the DNS A record, ensure ports 80 and 443 are open, and retry certificate issuance. |
| Database data is not persistent | Volume configuration is incorrect | Attach a named volume or host path and redeploy the database service. |
Use Coolify’s logs and server metrics to narrow down problems. For more advanced observability, forward logs to an ELK stack or send metrics to a Prometheus and Grafana setup.
FAQs
Is Coolify secure enough for production?
Yes. Coolify runs applications inside Docker containers, handles HTTPS termination through Traefik, and keeps secrets separate from code. You should still secure the operating system with firewalls, regular updates, and SSH best practices.
Can I manage multiple servers with one Coolify instance?
Yes. You can register several servers, deploy different applications to each one, and use projects and environments to keep resources organized.
Does Coolify only support Docker-based applications?
Coolify is designed around Docker. If your application can be containerized, it can run on Coolify. For applications that are not yet containerized, you typically create a Docker image as part of the migration process.
How do automatic deployments from Git work?
After connecting your Git provider, Coolify creates webhooks so that pushes to a branch, such as main, trigger a new build and deployment. You can disable automatic deployments or keep deployments manual for critical services.
Can I back up databases managed by Coolify?
Yes. You can run scheduled jobs inside Coolify to execute pg_dump or other backup commands, then send the backup files to block storage or object storage services.
What happens if the Coolify server becomes unavailable?
Applications on managed servers continue running, but the dashboard and orchestration features are temporarily unavailable. Keep backups of the Coolify server and consider using a more resilient virtual machine class for the control plane.
Conclusion
Coolify provides a practical, self-hosted PaaS layer on top of Docker. It helps standardize deployments across virtual machines and other infrastructure without requiring an immediate move to Kubernetes. With one Coolify server, a few managed servers, and Git-based builds, you can operate production applications with clear visibility into logs, resources, and failures.
Set up the Coolify server, add one or two application servers, deploy a test workload such as Jenkins, and then migrate your real applications step by step. As your requirements grow, you can add more servers, environments, and services without rebuilding your platform from the ground up.


