Self-Hosting a Heroku-Style PaaS on a VPS with Coolify or CapRover
Heroku made deployment simple: connect a repository, push, and the platform builds the app, runs it and gives it an HTTPS address. Self-hosted platforms such as Coolify and CapRover bring the same workflow to a VPS you control, for the price of the server.
This guide explains what these tools do, how they differ, how much server they need, how to install each one and which security basics you must not skip.
What a self-hosted PaaS does
PaaS means platform as a service. On your own VPS, the platform takes care of the steps you would otherwise script by hand:
- Build: turns your repository into a Docker image, from a Dockerfile or by detecting the language automatically.
- Run: starts the container, restarts it if it crashes and replaces it on the next deploy.
- Route: a reverse proxy sends each domain to the right app and requests free Let's Encrypt certificates.
- Configure: environment variables, volumes and logs are managed from a web dashboard.
- Add services: databases such as PostgreSQL, MySQL and Redis, and ready-made apps, with a few clicks.
Under the hood everything runs in Docker. If containers are new to you, read our introduction to Docker containers on a VPS first. You do not need to be an expert, but you should know what an image, a container and a volume are.
Coolify and CapRover compared
| Coolify | CapRover | |
|---|---|---|
| Underlying technology | Docker, with Traefik or Caddy as the proxy | Docker Swarm, with Nginx as the proxy |
| How apps are built | From Git with automatic build packs, a Dockerfile or Docker Compose | From a captain-definition file, a Dockerfile or a prebuilt image |
| Deploy trigger | Git push through GitHub or GitLab integration, webhooks, or the dashboard | CLI (caprover deploy), webhooks, or the dashboard |
| Several servers | Manages extra servers over SSH | Adds nodes to the Swarm cluster |
| Database backups | Scheduled backups to S3-compatible storage built in | Handled through your own scripts or one-click tools |
| Minimum for the platform | 2 CPU cores, 2 GB RAM, 10 GB free disk | 1 GB RAM, 5 GB free disk |
| Dashboard port before HTTPS | 8000 (plus 6001 and 6002) | 3000 |
In short, Coolify has a more feature-rich dashboard and closer Git integration. CapRover is lighter and has been around longer, with a simple CLI workflow. Both are open source.
How much server do you need?
The minimums above cover the platform itself. Your apps, databases and especially builds come on top. Building a Node.js or Java project can briefly use several gigabytes of RAM, and if the build runs on the same server as your live apps, they compete for memory.
- A few small apps and one database: 4 vCPU and 8 GB RAM gives room for builds without starving running apps.
- Many apps, or memory-hungry builds: choose more RAM, or build images in CI (for example GitHub Actions) and let the platform only pull and run them.
- Disk: images and old build layers pile up. Leave plenty of free space and clean up unused images regularly.
Before you install
- Start from a fresh Ubuntu 24.04 LTS server. Do not install a PaaS on a server that already runs a web server or a control panel, because both need ports 80 and 443.
- Log in with SSH keys rather than a password. Our firewall setup guide also covers locking down the server before you expose anything.
- Point DNS at the server. A wildcard record such as
*.apps.example.comlets every new app get its own subdomain without extra DNS work. CapRover requires one. - Update the system:
sudo apt update && sudo apt upgrade -y.
Installing Coolify
- Run the official installer as root. It installs Docker if needed and starts Coolify:
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | sudo bash - Open
http://SERVER_IP:8000and create the admin account straight away. Coolify's documentation warns that whoever reaches the registration page first becomes the instance admin, with root-level control of the server. - Enable two-factor authentication for your account.
- In the settings, set a domain for the dashboard, such as
coolify.example.com, so it is served over HTTPS through the proxy. - Once the dashboard, real-time updates and terminal work on that domain, close public access to ports 8000, 6001 and 6002.
To deploy, create a new resource, choose your repository, pick a build method, set the domain and environment variables, then click Deploy. Coolify stores its own data under /data/coolify.
Installing CapRover
- Create the wildcard DNS record, for example
*.apps.example.com, pointing to the server's IP address. - Download and run the installer:
curl -fsSL https://get.caprover.com -o caprover-install.sh sudo bash caprover-install.sh - Open
http://SERVER_IP:3000and log in with the initial passwordcaptain42. Change it immediately. - Set the root domain to
apps.example.com, enable HTTPS for the dashboard, then turn on Force HTTPS. - Close public access to port 3000 once the dashboard works over HTTPS at
captain.apps.example.com.
To deploy, create an app in the dashboard, add a captain-definition file to your project and push it with the CLI:
{
"schemaVersion": 2,
"dockerfilePath": "./Dockerfile"
}
npm install -g caprover
caprover deploy
Security basics
A PaaS dashboard is effectively root access to your server, so treat it that way.
- Know that Docker bypasses ufw. Ports published by containers are opened through Docker's own firewall rules, so a ufw rule alone may not block them. Do not publish database ports, and use a network-level firewall or a tool such as ufw-docker if you need hard guarantees.
- Keep databases internal. Apps reach their databases over the internal Docker network. There is rarely a reason to expose port 5432 or 3306 to the internet.
- Close the setup ports (8000, 6001, 6002 for Coolify, 3000 for CapRover) once HTTPS works.
- Update regularly. Update the platform from its dashboard, and keep Ubuntu patched with automatic security updates.
- Back up three things: the platform's data (
/data/coolifyor/captain), your database dumps, and persistent volumes. Store copies off the server. Our article on VPS backup strategy compares snapshots and file backups. - Use strong, unique passwords and two-factor authentication where available.
What maintenance looks like
A self-hosted platform removes most deployment chores, but someone still owns the server. A realistic monthly routine takes under an hour when nothing is wrong:
- Apply platform updates from the dashboard after reading the release notes.
- Check that operating system security updates are installing.
- Confirm the latest database backups exist off the server, and restore one into a test app every few months.
- Review disk usage and remove unused images, stopped containers and old build caches.
- Look at memory and CPU graphs for apps that keep growing.
Other tools worth knowing
Dokku is the closest to the original Heroku experience: you deploy with git push, and it supports Heroku-style buildpacks. It has no full web dashboard by default and runs on a single server. Dokploy is a newer option built on Docker Swarm and Traefik, with a dashboard similar in spirit to Coolify. All of them run on the same kind of VPS, so you can try more than one before you commit.
When a PaaS is not the right tool
- A single WordPress site or a brochure site runs more simply on shared hosting with cPanel.
- If nobody on the team wants to handle server updates, backups and incidents, a self-hosted platform shifts that work to you.
- Apps that need high availability across regions need more than one VPS and careful planning, whatever tool you use.
Frequently asked questions
Should I choose Coolify or CapRover?
Choose Coolify if you want Git integration, built-in database backups and a broad catalog of services. Choose CapRover if you prefer a lighter footprint and a straightforward CLI deploy. Both handle typical web apps well.
Can I run both on the same server?
No. Each runs its own reverse proxy on ports 80 and 443. Use separate servers if you want to compare them.
Can I add more servers later?
Yes. Coolify can manage additional servers over SSH, and CapRover can add worker nodes to its Swarm cluster. Starting with one VPS and adding more as needed is a common path.
Is it really free?
Both are open source and free to self-host. You pay for the VPS, any off-site backup storage and your own time. Coolify also offers a paid hosted dashboard if you would rather not run that part yourself.
Hostinq.com KVM VPS plans give you root access, NVMe storage and unlimited bandwidth in nine locations. The Cloud VPS Starter plan (4 vCPU, 8 GB RAM, 75 GB NVMe, $24.80 a month in Germany) is a reasonable starting point for Coolify or CapRover with a few small apps.