Log inSign up

Host apps on your own server with CapRover

CapRover is an open source app platform built on Docker Swarm, nginx and Let's Encrypt. Create a wildcard A record such as *.apps.example.net, start the caprover/caprover container with the Docker socket and /captain mounted, then run caprover serversetup from your computer to set the root domain, a new password and HTTPS. After that each app deploys with caprover deploy or from a one-click template.

Topic: Containers and PaaS · Tested on: Ubuntu 24.04 and 22.04, Debian 12 and 13 · Updated 2026-12-03

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::24

Then check that any random name resolves:

dig +short anything.apps.example.net
dig +short captain.apps.example.net

Both 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/caprover

Give it a minute, then follow its progress:

sudo docker service ls
sudo docker service logs captain-captain --tail 50

The 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 serversetup

Answer 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 deploy

The 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.

All prices
PlanFits becauseSizeMonthlyOrder from
A2-4the platform plus several small apps2 vCPU, 4 GB RAM, 100 GB NVMe$14.40/mo$43.20 for 3 months
A4-8builds on the server and a few databases4 vCPU, 8 GB RAM, 180 GB NVMe$28.80/mo$86.40 for 3 months

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.

How does it compare to Dokploy and Coolify?

All three wrap Docker with a dashboard. CapRover uses nginx and a captain-definition file; see the Dokploy and Coolify guides to compare workflows.