Deployment Overview of aaPanel on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the server must meet the following requirements:
-
Operating System: Ubuntu (latest stable version recommended).
-
Privileges: Root or sudo access is required for all installation steps.
-
Network/Ports:
-
80(HTTP) - Required for SSL certificate validation via Certbot. -
443(HTTPS) - Standard web traffic. -
3000(TCP) - Default aaPanel management port. -
Dependencies: The installation process requires
curl,wget, andpython3-pexpect.
FQDN of the final panel on hostkey.in domain¶
If a custom domain is not provided, the system uses a default subdomain template based on the server ID.
| Parameter | Value |
|---|---|
| Prefix | aaPanel |
| Domain | hostkey.in |
| Full template | aaPanel{Server_ID}.hostkey.in |
File and Directory Structure¶
The following directories are used for configuration, SSL 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. -
/www/server/panel/: The primary installation directory for aaPanel data and SSL certificates. -
/etc/letsencrypt/live/: Standard location for Let's Encrypt SSL certificates (if managed via Certbot).
Application Installation Process¶
The application is installed using a combination of a dedicated shell script and system configuration:
-
System Preparation: The installer ensures all package locks (
aptordpkg) are released to prevent conflicts during installation. -
Installer Download: The official aaPanel installation script is downloaded from the developer's repository:
-
Execution: The installer is executed with the
aapanelflag to perform a non-interactive installation. All logs are captured in/root/aapanel_install.log. -
Service Initialization: Once installed, the
btservice is enabled and started viasystemd. -
Post-Installation Configuration: The application is automatically configured with the following default credentials:
-
Username:
aaPanel -
Password:
aaPanel123 -
Port:
3000
Access Rights and Security¶
-
Firewall: Ensure ports
80,443, and3000are open in the system firewall. -
SSL/TLS: The application supports SSL via Certbot. If a custom domain is used, an Nginx reverse proxy handles HTTPS termination to secure the connection between the client and the panel.
-
Service Management: The core service is managed through
systemctlor thebtcommand-line utility.
Docker Containers and Their Deployment¶
The deployment utilizes a Docker container to manage SSL certificates and Nginx reverse proxying via Docker Compose.
Nginx Reverse Proxy Container
-
Image:
jonasal/nginx-certbot:latest -
Network Mode:
host -
Environment Variables:
-
CERTBOT_EMAIL: Set to the administrative contact email. -
Volumes:
-
nginx_secrets:/etc/letsencrypt: Persistent storage for SSL certificates. -
/data/nginx/user_conf.d:/etc/nginx/user_conf.d: Mapping of custom Nginx configurations. -
Restart Policy:
unless-stopped
Custom Scripts and Additional Setup¶
Several automated actions are performed to finalize the environment:
-
Port and Credential Reset: The installation script uses the
btutility to programmatically change the default port to3000, set a standard username, and update the password. -
SSL Certificate Provisioning: If SSL is required for a custom domain, the system performs the following:
-
Stops the aaPanel service temporarily.
-
Releases port 80 from any existing processes.
-
Uses
certbotin standalone mode to obtain certificates. -
Copies the resulting
fullchain.pemandprivkey.peminto the aaPanel SSL directory (/www/server/panel/ssl/). -
Nginx Configuration Generation: Nginx configuration files are generated to act as a reverse proxy, forwarding traffic from port 80/443 to the internal aaPanel port (3000) while handling ACME challenges for certificate renewal.
Application Update Instructions¶
To update the main application:
- Since this is a direct installation via script, updates should be performed through the aaPanel web interface or by re-running the official installation script if required by the developer.
Location of Configuration Files and Data¶
-
Main Panel Data:
/www/server/panel/ -
Nginx User Configs:
/data/nginx/user_conf.d/ -
SSL Certificates (Panel):
/www/server/panel/ssl/
Available Ports for Connection¶
| Service | Port | Protocol |
|---|---|---|
| aaPanel Management | 3000 | TCP |
| HTTP (Web) | 80 | TCP |
| HTTPS (Secure Web) | 443 | TCP |