Uninstall CapRover
Before removing CapRover, export a CapRover backup and separate backups for every application's data. Record DNS and image registry dependencies. Removing CapRover or its Docker resources can make applications unavailable.
CapRover does not have a one-command uninstall that safely decides which application data or other Swarm services you want to keep. To retire a dedicated CapRover host:
- Remove or move each app through the dashboard, recording its actual Docker service name and preserving any volumes or bind mounts you need. Confirm no client still depends on its domain or published port.
- Run
docker service lsand identify CapRover core services (captain-captain,captain-nginx,captain-certbot, and any optional registry). Remove only the services you intend to retire withdocker service rm SERVICE_NAME. Do not usedocker service rm $(docker service ls -q)on a shared Swarm; it would remove unrelated applications too. - After confirming you have a tested off-host backup, review
/captainand the output ofdocker volume ls. Remove only the directories and volumes whose data you have explicitly chosen to destroy. A volume can still contain valuable data even if no container is running. - Remove DNS records, forwarded ports, and firewall rules no longer needed. Leave the Swarm with
docker swarm leave --forceonly if this host is being retired from that Swarm and no other service depends on it. Verify from another node first in a cluster.
- Keep the backup and registry images until the replacement system has passed its recovery checks.
- Avoid a blanket
docker system prune --all: it can remove images needed by other apps or rollbacks.