Deployment Overview of CloudPanel on Server¶
Prerequisites and Basic Requirements¶
The deployment of CloudPanel requires a fresh installation on an Ubuntu-based server. The system must have root privileges to execute installation scripts and manage services. Before proceeding, ensure the following conditions are met:
-
The server must run a supported Ubuntu operating system.
-
Root access (sudo privileges) is required for all installation and configuration steps.
-
Ports
80,443, and3306must be available and not occupied by other services such asnginx,apache2,mysql, ormariadb. -
Existing database installations (MySQL, MariaDB, Percona) and web servers will be purged and removed to prevent conflicts.
FQDN of the Final Panel¶
The fully qualified domain name (FQDN) for accessing the CloudPanel interface is constructed using the provided prefix and server ID within the hostkey.in zone. The access URL follows this format:
-
Domain Structure:
cloudPanel<Server ID>.hostkey.in -
External Port:
443(HTTPS) -
Internal Path:
/ -
Full URL Example:
cloudPanel<Server ID>.hostkey.in:443
File and Directory Structure¶
The application installs configuration files, logs, and data in specific locations on the host server. Key directories include:
-
Application Configuration:
/etc/cloudpanel -
SSL Certificates: Managed within Docker volumes linked to
/etc/letsencryptinside the container. -
Nginx User Configuration:
/data/nginx/user_conf.d -
Docker Compose for Proxy:
/root/nginx/compose.yml
Application Installation Process¶
CloudPanel is installed using the official installer script, which is downloaded and executed with specific modifications to ensure compatibility with the required database version.
-
System Preparation: Existing database and web server services (
mysql,mariadb,nginx,apache2) are stopped and disabled. -
Package Removal: Any existing installations of CloudPanel, MySQL, MariaDB, or Percona are removed, and their data directories (
/var/lib/mysql,/etc/mysql,/var/run/mysqld) are deleted. -
Dependency Installation: Essential packages such as
curl,wget,lsof,ca-certificates, andgnupgare installed. -
Installer Execution: The installer is downloaded from
https://installer.cloudpanel.io/ce/v2/install.shto/root/cloudpanel-install.sh. -
Script Modification: The installer script is patched to use
MYSQL_8.0instead of the default engine and allows package downgrades during the upgrade process. -
Final Installation: The script is executed to deploy CloudPanel, creating the directory
/etc/cloudpanelupon success.
Docker Containers and Their Deployment¶
A proxy container is deployed to manage SSL certificates and routing for the CloudPanel instance. This container is managed via Docker Compose.
-
Container Image:
jonasal/nginx-certbot:latest -
Deployment Method:
docker compose up -d -
Working Directory:
/root/nginx -
Configuration File:
/root/nginx/compose.yml
The Docker Compose configuration includes:
-
Restart Policy:
unless-stopped -
Network Mode:
host -
Volume Mounts:
-
nginx_secrets(external volume) mapped to/etc/letsencryptfor SSL storage. -
Host directory
/data/nginx/user_conf.dmapped to/etc/nginx/user_conf.dfor custom configurations. -
Environment Variables:
-
CERTBOT_EMAIL: Set to[email protected].
Proxy Servers¶
The application utilizes an Nginx-based proxy container to handle SSL termination via Certbot. This setup ensures that traffic to the hostkey.in domain is encrypted and routed correctly.
-
Proxy Software: Nginx (via Docker container)
-
SSL Provider: Let's Encrypt (Certbot)
-
Certificate Email:
[email protected] -
Custom Domain Support: Configured via files in
/data/nginx/user_conf.d. -
Routing: The proxy configuration redirects traffic for
cloudPanel<Server ID>.hostkey.into the internal CloudPanel service.
Permission Settings¶
File and directory permissions are set during the installation and Docker deployment phases to ensure security and proper functionality.
-
Nginx Config Directory:
/root/nginx -
Owner:
root -
Group:
root -
Mode:
0644 -
Compose File:
/root/nginx/compose.yml -
Owner:
root -
Group:
root -
Mode:
0644 -
Custom Config Directory:
/data/nginx/user_conf.d -
Accessible by the Nginx container via volume mount.
Available Ports for Connection¶
The deployment configures the following ports for internal and external communication:
| Port | Direction | Protocol | Description |
|---|---|---|---|
8443 | Internal | HTTPS | Internal communication between the proxy and CloudPanel service. |
443 | External | HTTPS | Public access to the CloudPanel web interface via the proxy. |
80 | External | HTTP | Used for SSL certificate renewal (HTTP challenge) by Certbot. |
3306 | Internal/External | MySQL | Database connection port (must be free before installation). |
Starting, Stopping, and Updating¶
Service management is handled through the Docker Compose CLI for the proxy and standard service commands for the main application.
-
Start Proxy Container:
-
Stop Proxy Container:
-
Check Proxy Status:
-
Main Service Management: The CloudPanel service runs as a managed service. To restart the Nginx service if required: