Shared hosting works well for a simple website, but it quickly limits anyone who needs to publish APIs, Node.js applications, databases, automations or container-based projects. Knowing how to install Coolify on a VPS lets you turn a Linux server into a deployment platform with control over resources, domains, environment variables and services.
Coolify is a self-hosted alternative to managed deployment platforms. It uses Docker to organize applications and databases, offers integration with Git repositories and automates tasks that would otherwise require many commands in the terminal. In exchange for this freedom, the responsibility for the server is also yours: updates, security, backups and CPU, memory and disk usage need to be monitored.
Before installing Coolify on a VPS
The most suitable scenario is a new Linux VPS with no hosting panels, no pre-configured Docker and no applications using the web ports. Coolify needs to control components such as containers, the reverse proxy and SSL certificates. Installing it on a server already used by cPanel, aaPanel, EasyPanel or another panel can cause conflicts in ports and services.
To get started without bottlenecks, use Ubuntu Server 22.04 LTS or 24.04 LTS, x86_64 architecture, SSH access as root or a user with sudo permissions, and a fixed public IP. For small tests, 2 vCPUs, 4 GB of RAM and 40 GB on NVMe SSD are usually enough. For multiple applications, databases and frequent builds, 4 vCPUs and 8 GB of RAM provide a safer margin.
Also check that ports 80 and 443 are available for the websites you publish and that port 22 is open for SSH. The Coolify panel uses its own port during the initial setup. Afterward, it is best to access it through a subdomain protected with HTTPS, rather than keeping the port exposed for daily use.
Before making any changes, update the system:
```bash sudo apt update && sudo apt upgrade -y sudo reboot ```
After reconnecting via SSH, confirm the Ubuntu version and the available space:
```bash lsb_release -a df -h free -h ```
This precaution prevents installing the panel on a VPS with an almost full disk or an incompatible distribution. Application builds can use more space than the final project, especially when there are heavy dependencies or old Docker images piling up.
Set up basic VPS security
A VPS reachable from the internet receives automated access attempts from the first minutes. Before publishing any application, set a strong password or, preferably, use SSH key authentication. Disable direct root password login once you are certain you can sign in with a configured key.
The firewall should allow only what is necessary. In a typical installation, keep SSH, HTTP and HTTPS available:
```bash sudo ufw allow OpenSSH sudo ufw allow 80/tcp sudo ufw allow 443/tcp sudo ufw enable sudo ufw status ```
If you need to temporarily access the initial interface through the port shown by the installer, open that port only during setup. Then use a domain for the panel, configure SSL and remove the extra firewall rule. This small step reduces unnecessary exposure.
It is also worth setting an easily identifiable hostname, especially if you manage more than one VPS:
```bash sudo hostnamectl set-hostname coolify-producao ```
For critical services, the Anti-DDoS protection of the infrastructure helps reduce the impact of malicious traffic, but it does not replace basic practices such as strong passwords, updates and restricted SSH access.
How to install Coolify on a VPS step by step
The official Coolify installation is performed by a script that prepares Docker, Docker Compose, the panel services and the components needed for deployment. Since installation scripts may change as new versions are released, always get the current command from the project's official documentation and run it only on a clean, trusted VPS.
The process usually takes a few minutes. During execution, the installer downloads container images and configures the services. Do not interrupt the SSH session or restart the VPS before it finishes. If you are on an unstable connection, run the installation inside a `tmux` or `screen` session so the process is not terminated when the terminal closes.
After installation, confirm that the containers are running:
```bash docker ps ```
You should see the services related to Coolify and the reverse proxy. If a container keeps restarting, check the logs before trying to reinstall everything:
```bash docker ps -a docker logs NOME_DO_CONTAINER --tail 100 ```
Reinstalling without identifying the cause can erase settings and does not solve problems such as insufficient RAM, an occupied port or a network failure. On smaller servers, lack of memory is a common cause of interrupted builds. If the VPS has 2 GB of RAM, consider upgrading the plan or creating swap carefully. Swap prevents some crashes, but it does not offer the same speed as real RAM.
Configure the domain, SSL and panel access
Once the panel is running, access the interface using the initial IP and port shown at the end of the installation. Create the administrator user and immediately change any temporary credentials. Then set up a dedicated subdomain for the panel, such as `deploy.yourdomain.com`.
In your domain's DNS, create an A record pointing that subdomain to the VPS public IP. Wait for propagation, then configure the domain inside Coolify so it can issue the SSL certificate. Ports 80 and 443 must be open for the automatic validation to work.
For applications, the process is similar: each project can use its own domain, such as `app.yourdomain.com` or `api.yourdomain.com`. Coolify forwards requests to the correct container and manages the certificates. This removes the need to manually configure a reverse proxy for each deployment, as long as no other service is competing for the VPS web ports.
Avoid using the same domain for the panel and an application. Separating these accesses simplifies maintenance and reduces routing errors. If the project sends transactional emails, also configure SPF, DKIM and the appropriate records in DNS. SSL protects web communication but does not solve email sending reputation.
Publish your first application with control
In the panel, create a new project and add an application resource. You can connect a Git repository, use an existing Docker image or provide a Docker Compose-based configuration. For most modern projects, the Git connection makes the workflow easier: each update pushed to the defined branch can trigger a new deployment.
Enter environment variables in the panel, never in the code or in files sent to the repository. API keys, database passwords, payment tokens and authentication secrets must stay out of version control. When you change a variable, run a new deployment so the container receives the updated configuration.
When publishing a database, do not expose its port publicly unless necessary. An application hosted on the same VPS can communicate through the internal container network. Opening PostgreSQL, MySQL or Redis to the entire internet increases the attack surface and is rarely needed for a typical operation.
Before considering the deployment finished, test the domain, the application logs and data persistence. A container can be online and still show a database connection error, a missing variable or a failure in the startup command. The log is the most direct source for finding these problems.
Backups, updates and resource limits
Coolify simplifies deployment, but it does not automatically create a continuity strategy. Make external backups of persistent volumes and databases. Keeping a copy on the same VPS disk protects against an application error, but not against a total server failure or accidental deletion of the volume.
Set a backup routine that matches the value of the project. A corporate website may accept daily backups; a platform handling orders or customer data may require more frequent copies and regular restore tests. A backup that has never been restored is just an expectation, not a guarantee.
Update the operating system and Coolify during planned windows. Before major updates, record the current version, check disk space and make sure a backup is available. Also monitor resource usage with simple commands:
```bash htop docker stats df -h ```
When CPU, RAM or disk are constantly close to their limits, the best fix is not just restarting containers. It may be time to optimize the application, remove unused images or migrate to a VPS with more resources. At HostMF, a Linux VPS with NVMe SSD, unlimited traffic and immediate activation provides a practical foundation for centralizing your deployments with Coolify.
Start with a simple application, document every variable and validate your backups before moving essential systems to production. This process creates a more predictable operation and leaves your VPS ready to grow along with your projects.