Skip to content

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 sudo privileges 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.in pointing to the server's public IP address.

  • Ports: Ports 80, 443, and 3000 must 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:

  1. Ensure the Docker engine is installed and running on the server.

  2. Execute the Docker run command to launch the CapRover container with the necessary environment variables and volume mounts.

  3. The container is configured to accept terms automatically via the ACCEPTED_TERMS environment 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 80 maps to container port 80.

  • Host port 443 maps to container port 443.

  • Host port 3000 maps to container port 3000.

  • Volume Mounts:

  • /var/run/docker.sock is mounted to /var/run/docker.sock inside the container to allow CapRover to manage other Docker containers.

  • /captain on the host is mounted to /captain inside the container for persistent data storage.

  • Environment Variables:

  • ACCEPTED_TERMS is set to true.

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, and 3000 must 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.in to 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 run command provided in the installation section. If the container is stopped, it can be restarted using docker 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/caprover and then recreate the container using the same docker run command with the updated image.

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×