Install aaPanel on Linux Ubuntu 24.04 or Debian 12 VPS

What is aaPanel and Why Use It on Your VPS
Managing a web server entirely through SSH works fine for seasoned sysadmins, but when you need to deploy multiple sites, handle SSL renewals, edit PHP configurations, or check server resource usage, a visual panel saves hours. aaPanel is a free, lightweight, open-source control panel for Linux. It provides a clean web interface to manage Nginx, Apache, MySQL, MariaDB, PHP (multiple versions), FTP, firewalls, and scheduled tasks.
Unlike cPanel or Plesk, aaPanel runs on minimal resources, a Linux VPS with 1 GB of RAM is enough for a few sites. It installs in a single command and works on both Ubuntu 24.04 and Debian 12. This guide walks you through the installation, basic configuration, and what to do after the panel goes live.
For this tutorial, you need a fresh VPS running Ubuntu 24.04 LTS or Debian 12 (bookworm), with full root access. If you do not have one yet, you can rent a VPS in Vietnam from thueVPS, every plan comes with a dedicated IPv4 and NVMe SSD storage.
Prerequisites
- A VPS running Ubuntu 24.04 LTS or Debian 12 (fresh install recommended, do not install aaPanel on a server that already runs Nginx, Apache, or MySQL manually).
- Root access (or a sudo user with passwordless sudo).
- Port 8888 (aaPanel web UI) must be reachable from your IP, configure your firewall accordingly.
- A domain or subdomain pointing to the server IP (optional, but recommended for HTTPS access to the panel).
Step 1, Connect to Your VPS and Update the System
Log in as root or a sudo user via SSH. If this is your first time connecting, see our guide on how to connect to a linux vps for the first time via ssh.
ssh root@your_server_ipUpdate the package index and upgrade existing packages to the latest versions. A fresh OS image from a provider is often a few weeks behind.
apt update && apt upgrade -yReboot the server if the kernel or systemd was updated:
rebootVerify: After the reboot, confirm the system is up-to-date:
uname -r && cat /etc/os-releaseThe output shows the kernel version and OS name (Ubuntu 24.04 or Debian 12).
Step 2, Open the Panel Port in the Firewall
aaPanel's web interface listens on TCP port 8888 by default. If your VPS uses ufw (Ubuntu's default firewall) or nftables (Debian 12), you must allow this port before running the installer. Otherwise, the installation will succeed but you will not be able to reach the panel from your browser.
For Ubuntu (ufw):
ufw allow 8888/tcpFor Debian 12 (nftables): Check whether the firewall is active:
nft list rulesetIf the command shows a ruleset that blocks incoming traffic, add a rule for port 8888:
nft add rule inet filter input tcp dport 8888 acceptVerify: Confirm that the firewall rule is present:
ufw status verbose | grep 8888Expected output (for ufw):
8888/tcp ALLOW IN Anywhere
Step 3, Run the aaPanel Installer
aaPanel provides a single-line installation script. Download and execute it with root privileges:
curl -sSO http://www.aapanel.com/script/install_7.0_en.sh && bash install_7.0_en.shThe installation process takes 3 to 8 minutes depending on your server's CPU and internet speed. The script will:
- Detect your OS version and architecture.
- Install Nginx (or Apache, depending on the option you choose during install, the default is Nginx).
- Install MySQL 5.7 or MariaDB 10.11 (you can choose later from the panel).
- Install PHP 7.4 through PHP 8.3 (multiple versions, selectable per site).
- Set up Pure-FTPd, phpMyAdmin, and the built-in firewall.
At the end of the script, the terminal displays the panel URL, username, and password. Copy these credentials immediately, they do not appear again.
Example output:
====================================================
Congratulations! Installed successfully!
External panel address: http://your_server_ip:8888/aapanel
Internal panel address: http://localhost:8888/aapanel
Username: aapanel
Password: xxxxxxxx
====================================================Verify: Open a web browser and navigate to http://your_server_ip:8888/aapanel. If the login page loads, the installation succeeded.
Troubleshooting: If the page does not load, check whether the aaPanel service is running:
systemctl status btThe service name is bt (short for Baota, the upstream project). If it shows "inactive (dead)", start it:
systemctl start bt
Step 4, Log In and Secure the Panel
Log in with the credentials provided at the end of the installation. aaPanel will immediately prompt you to bind a domain or an IP address for the panel. At minimum, enter your VPS IP address. For production use, bind a domain and set up HTTPS.
The first screen also asks you to agree to the terms of use and to optionally enter a phone number for registration, registration is not mandatory. You can skip the phone number by clicking the "I do not have a phone number" link at the bottom.
Once inside the panel, do these three tasks immediately:
- Change the default username and password: Go to Panel Settings → Security. Set a strong password (mix of letters, numbers, and symbols).
- Enable HTTPS for the panel: Under Panel Settings → SSL, you can either upload a Let's Encrypt certificate or use a self-signed certificate. If you bound a domain, use Let's Encrypt (free, auto-renewed).
- Change the default panel port (optional but recommended): In Panel Settings → Security, change port 8888 to a non-standard port (e.g., 18888). Update your firewall accordingly afterward.
Verify: Reload the panel page using the new port or HTTPS scheme. The lock icon in the browser address bar must show a valid certificate.
Step 5, Configure the LAMP/LEMP Stack via aaPanel
aaPanel runs a software store for installing and switching between web-server components. Click the App Store icon in the left sidebar (or navigate to App Store from the main menu).
By default, the installer has already set up Nginx, MySQL/MariaDB, and PHP. To confirm the installed versions:
- Nginx: Go to Web Server → the version is listed (e.g., Nginx 1.24).
- MySQL/MariaDB: Go to Database → the database management page shows the active database server.
- PHP: Go to PHP → you can install additional PHP versions (5.6 through 8.3) and switch the default version per website.
To install a different PHP version (e.g., PHP 8.3), click Install next to the desired version in the App Store. Each PHP version runs as a separate process and does not conflict with others.
Verify: Create a simple PHP info file to test the default PHP:
echo "<?php phpinfo(); ?>" > /www/wwwroot/default/info.phpOpen http://your_server_ip/info.php in a browser. The page displays the current PHP version and configuration. After verifying, delete the file to avoid exposing server details:
rm /www/wwwroot/default/info.php
Step 6, Add Your First Website
In the aaPanel sidebar, click Website → Add site. Fill in:
- Domain: yoursite.com (add both
example.comandwww.example.com). - FTP: optionally create an FTP account for the site.
- Database: choose MySQL or MariaDB and set a database name and password. aaPanel creates both the database and the database user for you.
- PHP version: select the PHP version you want for this site (e.g., 8.3).
Click Submit. aaPanel creates the document root at /www/wwwroot/yoursite.com and the corresponding Nginx virtual host configuration.
Verify: Upload an index.html file to the site root and visit the domain. If the page loads, the web server and DNS are working together. You can also check the site error log under Website → Logs for any issues.
Spec Table: Default aaPanel Ports and Paths
The following table lists the most common ports and paths used by aaPanel after a standard installation. Use this as a quick reference when configuring firewalls or debugging services.
| Component | Port | Default Path | Notes |
|---|---|---|---|
| aaPanel web UI | 8888 | /www/server/panel | Change after first login for security |
| Nginx | 80 / 443 | /www/server/nginx | Web server |
| Apache (optional) | 88 / 443 | /www/server/apache | Alternative web server |
| MySQL / MariaDB | 3306 | /www/server/data | Database server |
| Pure-FTPd | 21 (passive: 39000-40000) | /www/server/pure-ftpd | FTP server |
| phpMyAdmin | , | /www/server/phpmyadmin | Access via panel link |
Common Troubleshooting After Installation
aaPanel login page doesn't load
Run systemctl status bt to see if the panel service is running. If it is inactive, start it with systemctl start bt. If it starts but still does not respond, check the firewall is not blocking port 8888 (or whichever port you set). Also confirm that ss -tlnp | grep 8888 shows a listening socket.
PHP files download instead of executing
This usually means Nginx does not pass PHP requests to the PHP-FPM socket. Reinstall or reconfigure PHP from App Store. Make sure the chosen PHP version is properly compiled, if the installation failed, remove and reinstall it.
MySQL refuses connection
Check whether MySQL is running: systemctl status mysql. If it fails to start, check the error log at /www/server/data/error.log. A common cause is insufficient RAM, on a VPS with 512 MB of RAM, MySQL may crash during high load. Configure swap and optimize memory on a low ram vps to provide more breathing room.
Can't log in to aaPanel with the default credentials
If you misplaced the initial credentials, reset them via the command-line tool:
cd /www/server/panel && python3 tools.pyc panel your_new_passwordThen log in with username: aapanel and the new password.
FAQ
Is aaPanel completely free to use?
Yes, aaPanel is open-source and free. There are no hidden fees for the panel itself. Some third-party plugins in the App Store (e.g., advanced firewall rules, malware scanning) may require payment to the plugin developer, but the core control panel functionality is free for unlimited websites and databases.
Can I install aaPanel on a VPS that already runs a web server?
Not recommended. aaPanel's installer will attempt to overwrite existing Nginx, Apache, MySQL, and PHP installations. Always start with a fresh OS image to avoid conflicts.
Which Linux distributions does aaPanel support?
The official supported distributions are Ubuntu (18.04 through 24.04 LTS) and Debian (10, 11, 12). CentOS/RHEL-based distributions are no longer officially supported by the aaPanel installer.
Does aaPanel support automatic SSL via Let's Encrypt?
Yes. For each website, go to Website → Settings → SSL. Select Let's Encrypt, enter your domain, and click Apply. aaPanel automatically handles the renewal of the certificate.
How much RAM does aaPanel consume after a fresh install?
With Nginx, MySQL (MariaDB), PHP-FPM, and the panel service running, aaPanel typically consumes about 400-600 MB of RAM on an idle server. For production use with multiple sites, a minimum of 2 GB RAM VPS is recommended.
Can I migrate an existing website from cPanel to aaPanel?
aaPanel does not provide a direct one-click migration tool from cPanel. However, you can manually transfer files via FTP or rsync, export/import the database via phpMyAdmin, and recreate the Nginx virtual host configuration manually within aaPanel.
Related articles
- Reverse proxy with automatic HTTPS using Caddy
- Self-hosting n8n for workflow automation on a VPS
- Making WordPress fast with LiteSpeed and LSCache on a VPS
- Hardening SSH on a new VPS: keys, ports, fail2ban, and CrowdSec


