On this page
- How does CapRover work?
- What do you need first?
- How do you prepare the wildcard DNS record?
- How do you start CapRover?
- How do you finish setup with the CLI?
- How do you deploy an app?
- How do one-click apps and persistent data work?
- How do you update and back up CapRover?
- What are the usual problems?
- Questions
How does CapRover work?
CapRover runs a small set of containers on a single node Swarm: the captain service with its web dashboard, an nginx proxy that routes each subdomain to the right app, and a certificate helper that requests Let's Encrypt certificates. Every app you create becomes a Swarm service with its own subdomain under the root domain you choose, for example notes.apps.example.net. Apps are built from a Dockerfile, an existing image, or a language template, and the definition sits in a small file called captain-definition in your repository.
What do you need first?
You need a clean server with Docker, a domain you control and a few minutes for DNS to spread. Ubuntu 24.04 or 22.04 and Debian 12 or 13 all work. Install Docker using the Docker Engine tutorial, or deploy the Docker app image. Plan at least 1 GB of memory for CapRover itself and more for builds; 2 GB or 4 GB is realistic once you build Node.js or Java apps on the server. Ports 80 and 443 must not be used by anything else:
docker version --format '{{.Server.Version}}'
sudo ss -tlnp | grep -E ':(80|443|3000) 'How do you prepare the wildcard DNS record?
Create one wildcard A record that sends every name under your chosen subdomain to the server. In your DNS zone add:
*.apps.example.net. 300 IN A 198.51.100.24
*.apps.example.net. 300 IN AAAA 2001:db8:4f2a::24Then check that any random name resolves:
dig +short anything.apps.example.net
dig +short captain.apps.example.netBoth should print 198.51.100.24. The DNS records tutorial covers adding records in general. Using a sub zone like apps keeps the main domain free for other uses.
How do you start CapRover?
Open the firewall for the web ports and the setup port, then start the installer container. It initialises Swarm and launches the rest of the stack:
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 3000/tcp
sudo ufw enable
sudo docker run -d -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/caproverGive it a minute, then follow its progress:
sudo docker service ls
sudo docker service logs captain-captain --tail 50The dashboard is now available at http://198.51.100.24:3000 with the default password captain42. Change it immediately in the next step. If you later add more nodes, CapRover also uses 996 for its registry plus the Swarm ports 2377, 7946 and 4789, which should only be allowed from your other servers as shown in the Docker Swarm guide.
How do you finish setup with the CLI?
Install the CapRover command line tool on your own computer with Node.js, then run the guided setup. It asks for the server IP, the root domain, a new password and an email for certificates:
npm install -g caprover
caprover serversetupAnswer with 198.51.100.24 and apps.example.net. When it completes, the dashboard lives at https://captain.apps.example.net with a valid certificate and HTTPS forced. You can also do these steps in the web dashboard: set the root domain, enable HTTPS, then force HTTPS. Once the domain works, remove the temporary rule with sudo ufw delete allow 3000/tcp, and keep in mind that Docker published ports can bypass ufw, so check from another machine with nc -zv 198.51.100.24 3000.
How do you deploy an app?
Create the app in the dashboard, add a captain-definition file to the repository, and deploy from the project folder. A definition that points at your Dockerfile looks like this:
{
"schemaVersion": 2,
"dockerfilePath": "./Dockerfile"
}cd ~/code/notes
caprover login
caprover deployThe CLI asks which server and app to use, uploads the current Git commit, and streams the build log. In the app settings set the container HTTP port your app listens on, add environment variables, and enable HTTPS for the app subdomain or a custom domain such as notes.example.net. For automatic deploys, CapRover can pull from GitHub, GitLab or any Git host through a webhook in the Deployment tab.
How do one-click apps and persistent data work?
One-click apps are templates for common software such as PostgreSQL, MySQL, Redis and many self hosted tools. Pick one, fill in the requested values and CapRover creates the service with a persistent volume. When you create your own app that writes files, tick the persistent data option and map a path such as /app/uploads; without it, files vanish on the next deploy. Databases created this way are reachable from other apps at srv-captain--name on the internal network and do not need public ports.
How do you update and back up CapRover?
Update CapRover from Settings in the dashboard, which pulls the new captain image and restarts the service. App data lives in Docker volumes and the platform state lives in /captain. The dashboard has a backup function that exports the configuration; store that file off the server. For files and databases use dumps or a tool like restic, and add the daily backups option for whole disk recovery through a support ticket. Keep the host current with sudo apt update && sudo apt upgrade.
What are the usual problems?
If the root domain step fails, the wildcard record is missing or still propagating; test with dig. Certificate errors usually mean port 80 is blocked or the name points elsewhere. A build that stops with no message often ran out of memory, so watch free -h during a deploy or build images elsewhere and deploy by image name. When nginx shows a 502, the HTTP port in the app settings does not match the port your process listens on.
Plans that fit this guide
Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.
Questions about CapRover PaaS
Is CapRover free?
Yes, CapRover is open source and free to self host on any server you control.
Do I need a wildcard domain?
It is the intended setup, because each app gets its own subdomain automatically. Custom domains per app can be added on top.
Can I keep the default password?
No. Change captain42 during setup; anyone who reaches port 3000 could otherwise log in.
Does CapRover work on a single server?
Yes. Most installs are one node. Extra worker nodes are optional and join over the Swarm ports.
More in Containers and PaaS
- Docker Compose stacks
- Docker volumes and bind mounts
- Read and limit Docker logs
- Free disk space used by Docker
- Build, tag and push Docker images
- Run and manage containers
- Podman and rootless containers
- Docker Swarm across servers
- Automatic updates with Watchtower
- Portainer CE web UI
- Dokploy self-hosted PaaS
- Dokku git push deploys
- Coolify on your own server