Deployment Overview of aaPanel on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the following requirements must be met:
-
Operating System: Ubuntu.
-
Privileges: Root or sudo access is required for all installation steps.
-
Network/Ports:
-
Port
80(HTTP) for SSL certificate validation via Certbot. -
Port
443(HTTPS) for secure web access. -
Port
3000(Internal Panel Port). -
Dependencies:
curl,wget, andpython3-pexpectmust be installed on the system.
FQDN of the final panel on the hostkey.in domain¶
If a custom domain is not provided, the application uses a default subdomain based on the server ID.
| Parameter | Value |
|---|---|
| Prefix | aaPanel |
| Domain | hostkey.in |
| Full template | aaPanel{Server_ID_from_Invapi}.hostkey.in |
File and Directory Structure¶
The following directories are used for configuration, certificates, and proxy management:
-
/root/nginx: Contains the Docker Compose file for the Nginx reverse proxy. -
/data/nginx/user_conf.d/: Stores Nginx configuration files for custom domains and the default panel access. -
/www/server/panel/: The primary application directory for aaPanel, including SSL certificates (/ssl/). -
/etc/letsencrypt/live/: Standard location for Let's Encrypt SSL certificates managed via Certbot.
Application installation process¶
The installation of aaPanel follows these steps:
-
System Preparation: The system updates the package lists and ensures all existing
aptlocks are released to prevent conflicts during installation. -
Dependency Installation: Necessary tools such as
curl,wget, andpython3-pexpectare installed via theaptpackage manager. -
Installer Execution: The official aaPanel installation script is downloaded from
https://www.aapanel.com/script/install_7.0_en.shto/root/install_7.0_en.sh. The installer is then executed using the following command: -
Service Initialization: Once installed, the
btservice (aaPanel) is enabled and started viasystemd. -
Security Configuration: The application undergoes an automated security setup to set the default port to
3000, change the username toaaPanel, and update the password toaaPanel123.
Access Rights and Security¶
-
Firewall: Ensure that ports
80,443, and3000are open in your system firewall. -
User Management: The default administrative user is set to
aaPanel. -
SSL/TLS: If a custom domain is configured, the application utilizes Let's Encrypt certificates for secure HTTPS communication.
Databases¶
The database configuration and storage locations are managed internally by aaPanel once the panel is accessed via the web interface. No external database connection parameters are defined in the initial deployment scripts.
Docker Containers and Their Deployment¶
The deployment includes a Nginx reverse proxy container to handle SSL termination and traffic routing.
Nginx Reverse Proxy Container
-
Image:
jonasal/nginx-certbot:latest -
Ports: Uses
network_mode: hostto bind directly to the host's network interface. -
Volumes:
-
nginx_secrets:/etc/letsencrypt: Mounts the shared SSL certificate volume. -
/data/nginx/user_conf.d:/etc/nginx/user_conf.d: Mounts custom Nginx configuration files. -
Environment Variables:
-
Restart Policy:
unless-stopped
Custom Scripts and Additional Setup¶
Several actions are performed to finalize the environment:
-
Port Redirection: The application is configured to redirect all traffic from the standard HTTP/HTTPS ports (80/443) to the internal panel port (
3000) via an Nginx reverse proxy. -
SSL Certificate Replacement: If SSL certificates are required for the main panel, Certbot issues a standalone certificate, and the resulting files are copied to
/www/server/panel/ssl/to ensure the panel itself runs over HTTPS. -
Nginx Configuration Generation: Custom configuration files are generated in
/data/nginx/user_conf.d/to handle ACME challenges for Let's Encrypt and proxy requests to the backend service.
Application Update Instructions¶
To update the aaPanel application, use the built-in management tool:
-
Access the terminal of your server.
-
Run the
btcommand to enter the interactive menu. -
Follow the prompts provided by the panel's internal updater (if available via the web interface or CLI).
Location of configuration files and data¶
-
Panel Data:
/www/server/panel/data/ -
Nginx User Configs:
/data/nginx/user_conf.d/ -
SSL Certificates (System):
/etc/letsencrypt/live/ -
SSL Certificates (aaPanel):
/www/server/panel/ssl/
Available ports for connection¶
| Service | Port | Protocol |
|---|---|---|
| aaPanel Management (Internal) | 3000 | TCP |
| HTTP (Web/ACME) | 80 | TCP |
| HTTPS (Secure Web) | 443 | TCP |
Starting and Stopping the application¶
The primary service can be managed using the following commands:
-
Start aaPanel:
systemctl start bt -
Stop aaPanel:
systemctl stop bt -
Restart aaPanel:
systemctl restart bt