CapRover is a free, open-source PaaS that makes deploying apps on your own server close to “push and done”. It runs on Docker Swarm with an Nginx load balancer and automatic Let’s Encrypt certificates. You get a web dashboard, a CLI, and a library of one-click apps (databases, WordPress, Ghost and many more). It’s been around since 2017 (originally CaptainDuckDuck), and it’s simple and stable.
Comparison: Coolify and Dokploy offer more built-in features. CapRover is lighter and very predictable.
Requirements
- Ubuntu or Debian, with Docker installed. See install Docker.
- At least 1 GB RAM (2 GB+ recommended; builds need memory, so add swap). See swap.
- Ports 80, 443, 3000 (initial setup), plus Swarm ports if you add nodes (996, 7946, 4789, 2377).
- A domain with a wildcard DNS record:
*.apps.example.com→ your server IP.
Install
sudo ufw allow 80,443,3000,996,7946,4789,2377/tcp
sudo ufw allow 7946,4789,2377/udp
docker run -p 80:80 -p 443:443 -p 3000:3000 -e ACCEPTED_TERMS=true \
-v /var/run/docker.sock:/var/run/docker.sock -v /captain:/captain caprover/caprover
Wait a minute, and check with docker service ls that the captain services are running.
Then, from your computer (Node.js required):
npm install -g caprover
caprover serversetup
The wizard asks for the server IP, the root domain (apps.example.com), a new dashboard password, and your email for Let’s Encrypt. It enables HTTPS and forces it for the dashboard, which ends up at https://captain.apps.example.com.
After setup, close port 3000 if you won’t add nodes: sudo ufw delete allow 3000/tcp. See UFW.
Deploy an app
Create an app in the dashboard (for example api), and it gets api.apps.example.com. Enable HTTPS with one click. Add your own domain under “Connect new domain”.
Your project needs a captain-definition file at the root:
{
"schemaVersion": 2,
"dockerfilePath": "./Dockerfile"
}
Then deploy, using one of these methods:
- CLI:
caprover deployfrom the project folder, then choose the app. - Git webhook: connect a GitHub, GitLab or Bitbucket repository, and pushes trigger deploys.
- Tarball upload or a Docker image from a registry (
imageNamein captain-definition, or “Deploy via ImageName”).
Set environment variables, the container HTTP port, persistent directories (volumes) and instance count in the app settings.
One-click apps
Apps → One-Click Apps/Databases: PostgreSQL, MySQL, MongoDB, Redis, WordPress, Ghost, n8n, Uptime Kuma, MinIO, Plausible and many more. Database apps without a public domain are reachable from other apps at srv-captain--<app-name>. Keep them off public ports.
Customising Nginx
Each app has an editable Nginx config template in the dashboard (HTTP Settings), for upload size limits, headers, or WebSocket tweaks. For example, raise client_max_body_size for upload-heavy apps.
Clusters
Add worker nodes from the dashboard (“Cluster”) using Swarm. Images must go through a registry: CapRover can host a local registry for you. For most users, a single VPS is simpler. Upgrade the plan before adding complexity.
Security
- Use a strong dashboard password. CapRover has one admin account, so treat it like root.
- Consider limiting dashboard access: CapRover lets you change the captain subdomain, and you can block it by IP in its Nginx config.
- Keep Docker, CapRover (dashboard → Settings → check for updates) and app images updated.
- Never expose databases publicly without strong passwords and an IP allowlist.
Backups and maintenance
- Dashboard → Settings → Create backup exports CapRover’s configuration. App data lives in volumes under
/var/lib/docker/volumes, so back those up separately. See Docker volume backups. - Clean up old images: Settings → Disk cleanup, or
docker image prune. See Docker disk cleanup.
Quick reference
| Item | Value |
|---|---|
| Dashboard | https://captain.<root-domain> |
| CLI | npm i -g caprover → caprover serversetup, caprover deploy |
| App config file | captain-definition |
| Internal hostname | srv-captain--<app> |
| Data | /captain + Docker volumes |
Related: Docker Swarm tutorial and Docker VPS hosting.