Skip to content

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, and python3-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:

  1. System Preparation: The installer ensures all package locks (apt or dpkg) are released to prevent conflicts during installation.

  2. Installer Download: The official aaPanel installation script is downloaded from the developer's repository:

    https://www.aapanel.com/script/install_7.0_en.sh
    

  3. Execution: The installer is executed with the aapanel flag to perform a non-interactive installation. All logs are captured in /root/aapanel_install.log.

  4. Service Initialization: Once installed, the bt service is enabled and started via systemd.

  5. Post-Installation Configuration: The application is automatically configured with the following default credentials:

  6. Username: aaPanel

  7. Password: aaPanel123

  8. Port: 3000

Access Rights and Security

  • Firewall: Ensure ports 80, 443, and 3000 are 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 systemctl or the bt command-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 bt utility to programmatically change the default port to 3000, 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 certbot in standalone mode to obtain certificates.

  • Copies the resulting fullchain.pem and privkey.pem into 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
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×