Skip to content

Deployment Overview of CloudPanel on Server

Prerequisites and Basic Requirements

To ensure a successful deployment, the server must meet the following requirements:

  • Operating System: Ubuntu (specifically required for the installation script).

  • Privileges: Root or sudo access is required to execute installation scripts and manage system services.

  • Required Ports: The following ports must be free and available for use by CloudPanel and its components:

  • 80 (HTTP)

  • 443 (HTTPS)

  • 3306 (MySQL/MariaDB)

FQDN of the final panel on the hostkey.in domain

The application uses a specific domain template for accessing the management interface via SSL.

Parameter Value
Prefix cloudPanel
Domain hostkey.in
Full template cloudPanel{Server_ID}.hostkey.in

Application installation process

The installation of CloudPanel is performed through a multi-step process involving system preparation and an official installer script:

  1. System Cleanup: The process begins by stopping and disabling any existing web or database services (such as MySQL, MariaDB, Nginx, or Apache2) to prevent port conflicts. Any previous installations of CloudPanel or Percona/MySQL are purged from the system.

  2. Dependency Installation: Essential base packages including curl, wget, lsof, ca-certificates, gnupg, apt-transport-https, and apt-utils are installed via the package manager.

  3. Installer Preparation: The official CloudPanel installation script is downloaded to /root/cloudpanel-install.sh.

  4. Configuration Patching: The installer is modified locally to ensure compatibility with MySQL 8.0 and to allow system upgrades that involve package downgrades if necessary.

  5. Execution: The installation script is executed, which installs the CloudPanel core components and configures the environment.

Docker Containers and Their Deployment

The deployment utilizes a Docker container to manage SSL certificates via Nginx and Certbot. This container operates in host network mode to facilitate seamless integration with the system's networking.

Container Name Image Ports Volumes Restart Policy
nginx jonasal/nginx-certbot:latest Host Network (80, 443) - nginx_secrets:/etc/letsencrypt
- /data/nginx/user_conf.d:/etc/nginx/user_conf.d
unless-stopped

Environment Variables for Nginx Container:

  • CERTBOT_EMAIL: [email protected]

  • Configuration is further supplemented by an external environment file located at /data/nginx/nginx-certbot.env.

Custom Scripts and Additional Setup

Several custom actions are performed during the deployment to ensure the environment is correctly configured:

  • Installer Modification: A sed command is used on /root/cloudpanel-install.sh to force the use of MYSQL_8.0 instead of the default version and to enable --allow-downgrades during the apt upgrade phase.

  • Nginx Proxy Configuration: After the Docker container is initialized, a configuration modification is applied to /data/nginx/user_conf.d/{Prefix}{Server_ID}.hostkey.in.conf. The location /django_client block is updated to location / to ensure correct traffic routing for the application.

  • Directory Creation: A directory at /root/nginx is created to house the Docker Compose configuration files.

Application Update Instructions

To update the main CloudPanel application, you must re-run the installation script:

  1. Navigate to the root directory.

  2. Execute the installer script:

    bash /root/cloudpanel-install.sh
    

For the Nginx/Certbot proxy container, updates can be performed using Docker Compose:

cd /root/nginx
docker compose pull && docker compose up -d

Location of configuration files and data

The following paths are used for configuration and persistent data:

  • Nginx Proxy Configurations: /data/nginx/user_conf.d

  • Docker Compose (Proxy): /root/nginx/compose.yml

  • CloudPanel System Configs: /etc/cloudpanel

  • Certbot Certificates: Managed via the nginx_secrets Docker volume.

Available ports for connection

The following ports are utilized by the application and its proxy:

Port Service Access Type
8443 CloudPanel Management Interface Internal/External (via Proxy)
443 HTTPS Web Traffic External
80 HTTP Web Traffic External
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×