Deployment Overview of aaPanel on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the following requirements must be met by the server environment:
-
Operating System: Ubuntu (latest stable version).
-
Privileges: Root or sudo access is required for all installation steps.
-
Network Ports:
-
3000: Default panel port (configured via setup script). -
443: HTTPS traffic (via Nginx reverse proxy if configured). -
80: HTTP traffic (for ACME challenges and redirection). -
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 application 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 deployment utilizes several specific directories for configuration and data persistence:
-
/root/nginx: Contains the Nginx Docker Compose configuration. -
/data/nginx/user_conf.d/: Stores custom Nginx configuration files for domain routing. -
/data/nginx/nginx-certbot.env: Environment variables for the Certbot container. -
/www/server/panel/: The primary installation directory for aaPanel data and SSL certificates.
Application Installation Process¶
The application is installed using a combination of an official installer script and system configuration steps:
-
System Preparation: The installer ensures all package locks (
apt,dpkg) are released to prevent conflicts during dependency installation. -
Installer Execution: An official installation script is downloaded from the developer's repository:
https://www.aapanel.com/script/install_7.0_en.sh. -
Service Initialization: The
btservice (aaPanel) is enabled and started viasystemd. -
Security Configuration:
-
The panel port is set to
3000. -
Default credentials are updated to:
-
Username:
aaPanel -
Password:
aaPanel123
Access Rights and Security¶
-
Firewall: Ensure ports
80,443, and3000are open in the system firewall. -
SSL/TLS: If a custom domain is used, SSL certificates are issued via Certbot and applied to the panel's internal service to ensure secure communication between the proxy and the application.
Docker Containers and Their Deployment¶
The deployment utilizes a Docker container to manage Nginx and automated SSL certificate renewals through a reverse proxy setup.
| Container Name | Image | Ports/Network | Volumes | Environment Variables | Restart Policy |
|---|---|---|---|---|---|
nginx-nginx-1 | jonasal/nginx-certbot:latest | host mode | nginx_secrets:/etc/letsencrypt, /data/nginx/user_conf.d:/etc/nginx/user_conf.d | [email protected] | unless-stopped |
Custom Scripts and Additional Setup¶
The deployment performs several automated configuration steps beyond the standard installation:
-
Panel Port & Credential Reset: A script executes the
btcommand-line utility to programmatically change the default port, username, and password for immediate security. -
SSL Certificate Management:
-
If a custom domain is present, the system uses Certbot in standalone mode to obtain certificates.
-
The obtained certificates are automatically moved from
/etc/letsencrypt/to the aaPanel SSL directory (/www/server/panel/ssl/) to enable native HTTPS support for the panel interface. -
Nginx Reverse Proxy Configuration: A configuration is generated to proxy traffic from port 443 (HTTPS) to the internal application running on port
3000.
Application Update Instructions¶
To update the main application, follow these steps:
-
Log in to the server via SSH.
-
Use the built-in panel management tool by running the command:
-
Follow the on-screen prompts to select the update option provided by the aaPanel interface.
Location of Configuration Files and Data¶
-
Main Application Data:
/www/server/panel/ -
Nginx User Configurations:
/data/nginx/user_conf.d/ -
Docker Compose File:
/root/nginx/compose.yml
Available Ports for Connection¶
| Port | Usage |
|---|---|
3000 | Direct access to aaPanel (Internal/Unencrypted) |
443 | Secure HTTPS access via Nginx Proxy (Custom Domains) |
80 | HTTP redirection and ACME challenges |
Starting and Stopping the Application¶
The application service can be managed using the following commands:
-
Start aaPanel:
systemctl start bt -
Stop aaPanel:
systemctl stop bt -
Restart aaPanel:
systemctl restart bt