Deployment Overview of CloudPanel on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful installation, the server must meet the following requirements:
-
Operating System: Ubuntu (latest stable version).
-
Privileges: Root or sudo access is required.
-
Network/Ports: The following ports must be free and available for use by CloudPanel:
-
80(HTTP) -
443(HTTPS) -
3306(MySQL/MariaDB) -
Domain Configuration: A valid FQDN is required. The server's hostname must resolve correctly in the
/etc/hostsfile.
FQDN of the final panel on the hostkey.in domain¶
The administration interface for CloudPanel is accessible via a specific subdomain template:
| Parameter | Value |
|---|---|
| Prefix | cloudPanel |
| Domain | hostkey.in |
| Full template | cloudPanel{Server_ID_from_Invapi}.hostkey.in |
File and Directory Structure¶
The following directories are used for configuration and data management:
-
/etc/cloudpanel: Main application configuration directory. -
/root/nginx: Contains the Docker Compose configuration for the Nginx proxy. -
/data/nginx/user_conf.d: Stores custom Nginx configuration files. -
/data/nginx/nginx-certbot.env: Environment file for Certbot settings.
Application installation process¶
The installation follows a multi-stage process to prepare the environment and deploy the panel:
-
Environment Preparation:
-
The system stops and disables any conflicting services such as
mysql,mariadb,nginx, orapache2. -
Any existing installations of CloudPanel, MySQL, Percona Server, or MariaDB are purged to prevent conflicts.
-
Required base packages (
curl,wget,lsof,ca-certificates, etc.) are installed viaapt. -
Installer Download and Modification:
-
The official installation script is downloaded from
https://installer.cloudpanel.io/ce/v2/install.shto/root/cloudpanel-install.sh. -
The installer is patched to ensure the use of MySQL 8.0 and to allow package downgrades if necessary during the setup process.
-
Core Installation:
-
The installation script is executed to install CloudPanel components.
-
Proxy Setup:
-
Docker is installed on the host.
-
A Nginx container with Certbot integration is deployed via Docker Compose to handle SSL termination and reverse proxying.
Access Rights and Security¶
-
Firewall: Ensure that ports
80,443, and8443are open in your network firewall. -
Service Isolation: The installation script attempts to disable conflicting web servers (Apache/Nginx) to ensure CloudPanel manages the primary web traffic.
-
User Access: Administrative access is typically managed through the panel's internal port.
Databases¶
CloudPanel utilizes MySQL 8.0 as the default database engine for its operations. The installation process ensures that no conflicting database services are running before configuring the application's data layer.
Docker Containers and Their Deployment¶
The deployment includes a specialized container to manage SSL certificates and reverse proxying:
-
Nginx Proxy Container
-
Image:
jonasal/nginx-certbot:latest -
Ports: Uses
hostnetwork mode (mapping directly to host ports 80 and 443). -
Volumes:
-
nginx_secrets:/etc/letsencrypt(for SSL certificates) -
/data/nginx/user_conf.d:/etc/nginx/user_conf.d(for custom site configurations) -
Environment Variables:
-
CERTBOT_EMAIL: Set via environment file or configuration. -
Restart Policy:
unless-stopped
Custom Scripts and Additional Setup¶
The deployment performs several non-standard actions to ensure compatibility:
-
Installer Patching: A script modifies the official CloudPanel installer in
/root/cloudpanel-install.shto force a specific MySQL version (8.0) and allowapt upgrade --allow-downgrades. -
Nginx Path Redirection: The configuration is automatically modified to redirect traffic from the root path (
/) to the application's internal service, replacing default location blocks.
Application Update Instructions¶
To update the main CloudPanel application:
-
Re-run the installation script if a manual update is required via the official installer.
-
For the Nginx proxy component, navigate to
/root/nginxand execute:
Location of configuration files and data¶
-
Application Configs:
/etc/cloudpanel -
Nginx Proxy Configs:
/data/nginx/user_conf.d -
Docker Compose File:
/root/nginx/compose.yml
Available ports for connection¶
| Service | Port | Protocol |
|---|---|---|
| Web Interface (HTTPS) | 443 | TCP |
| Internal Panel Access | 8443 | TCP |
| HTTP (Redirect) | 80 | TCP |
| MySQL/MariaDB | 3306 | TCP |
Starting and Stopping the application¶
-
Main Application: Managed via
systemctl. -
Start Nginx:
systemctl start nginx -
Stop Nginx:
systemctl stop nginx -
Proxy Container: Managed via Docker Compose.
-
Start Proxy:
docker compose up -d(from/root/nginx) -
Stop Proxy:
docker compose down(from/root/nginx)
Proxy Servers¶
The system uses a Dockerized Nginx instance with Certbot integration to act as a reverse proxy. This container handles SSL certificate acquisition and manages the routing of incoming traffic from port 443 to the application's internal service on port 8443. Custom domain configurations are managed through files located in /data/nginx/user_conf.d.