Deployment Overview of CapRover on Server¶
Prerequisites and Basic Requirements¶
The following requirements must be met before deploying CapRover on the server:
-
Operating System: Debian-based Linux distribution.
-
Privileges: Root access or
sudoprivileges are required to install Docker and manage system services. -
Domain Configuration: A wildcard DNS A record must be configured for the subdomain
*.caprover<Server ID>.hostkey.inpointing to the server's public IP address. -
Ports: Ports
80,443, and3000must be open and accessible on the server.
FQDN of the Final Panel¶
The CapRover management panel is accessible via the following Fully Qualified Domain Name (FQDN):
caprover<Server ID>.hostkey.in
The panel listens on standard HTTP and HTTPS ports.
Application Installation Process¶
CapRover is deployed as a single Docker container. The installation process involves the following steps:
-
Ensure the Docker engine is installed and running on the server.
-
Execute the Docker run command to launch the CapRover container with the necessary environment variables and volume mounts.
-
The container is configured to accept terms automatically via the
ACCEPTED_TERMSenvironment variable.
The specific command used to deploy the application is:
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
Docker Containers and Their Deployment¶
The deployment relies on a single container image from the official CapRover repository.
-
Image Name:
caprover/caprover -
Port Mappings:
-
Host port
80maps to container port80. -
Host port
443maps to container port443. -
Host port
3000maps to container port3000. -
Volume Mounts:
-
/var/run/docker.sockis mounted to/var/run/docker.sockinside the container to allow CapRover to manage other Docker containers. -
/captainon the host is mounted to/captaininside the container for persistent data storage. -
Environment Variables:
-
ACCEPTED_TERMSis set totrue.
File and Directory Structure¶
The deployment utilizes the following directory structure on the host system:
-
/captain: This directory stores all persistent data, including application configurations, logs, and database files managed by CapRover. -
/var/run/docker.sock: The Docker socket file, which is mounted into the container to enable container orchestration capabilities.
Access Rights and Security¶
Security and access are managed through the following mechanisms:
-
Firewall: Ports
80,443, and3000must be allowed through the server's firewall to ensure external access to the panel and deployed applications. -
Docker Socket: The container requires access to the Docker socket, which grants it the ability to create and manage other containers on the host. This is a standard requirement for CapRover's functionality.
-
DNS: A wildcard A record is configured for
*.caprover<Server ID>.hostkey.into route traffic to the server's IP address.
Available Ports for Connection¶
The following ports are exposed and available for connection:
| Port | Protocol | Description |
|---|---|---|
| 80 | TCP | HTTP traffic for the CapRover panel and deployed applications. |
| 443 | TCP | HTTPS traffic for secure access to the panel and applications. |
| 3000 | TCP | Alternative port for CapRover access if standard ports are unavailable. |
Starting, Stopping, and Updating¶
Since CapRover is deployed as a standalone Docker container, standard Docker commands are used to manage its lifecycle:
-
Start: The container is started using the
docker runcommand provided in the installation section. If the container is stopped, it can be restarted usingdocker start <container_id>. -
Stop: To stop the running instance, use
docker stop <container_id>. -
Update: To update CapRover to the latest version, pull the new image using
docker pull caprover/caproverand then recreate the container using the samedocker runcommand with the updated image.