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:
-
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.
-
Dependency Installation: Essential base packages including
curl,wget,lsof,ca-certificates,gnupg,apt-transport-https, andapt-utilsare installed via the package manager. -
Installer Preparation: The official CloudPanel installation script is downloaded to
/root/cloudpanel-install.sh. -
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.
-
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
sedcommand is used on/root/cloudpanel-install.shto force the use ofMYSQL_8.0instead of the default version and to enable--allow-downgradesduring theapt upgradephase. -
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. Thelocation /django_clientblock is updated tolocation /to ensure correct traffic routing for the application. -
Directory Creation: A directory at
/root/nginxis created to house the Docker Compose configuration files.
Application Update Instructions¶
To update the main CloudPanel application, you must re-run the installation script:
-
Navigate to the root directory.
-
Execute the installer script:
For the Nginx/Certbot proxy container, updates can be performed using Docker Compose:
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_secretsDocker 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 |