How to Migrate cPanel Accounts Between Servers Using WHM Transfer Tool (Zero-Downtime Guide) Moving live…
How to Install aaPanel on a Linux VPS (Step-by-Step Guide)

If you want a visual, beginner-friendly way to manage websites, databases, SSL certificates, and backups on your VPS without paying monthly cPanel fees, learning how to install aaPanel is one of the fastest solutions available. aaPanel is a lightweight, free hosting control panel that runs smoothly even on entry-level 1 GB and 2 GB Linux servers.
This step-by-step guide walks you through how to install aaPanel on a fresh Ubuntu, Debian, or AlmaLinux virtual private server. We cover server prerequisites, the one-line installation command, required firewall ports, initial LNMP stack setup, and securing your login URL with SSL.

Prerequisites Before You Learn How to Install aaPanel
Before following the steps on how to install aaPanel, verify that your server meets these requirements. Always start from a completely clean operating system image with no pre-installed web servers or databases:
| Resource | Minimum Spec | Recommended Production Spec |
|---|---|---|
| Operating System | Ubuntu 20.04 / 22.04 / 24.04 LTS, Debian 11 / 12, or AlmaLinux 8 / 9 (64-bit) | Ubuntu 24.04 LTS or Debian 12 (64-bit) |
| RAM (Memory) | 768 MB – 1 GB | 2 GB to 4 GB+ (Recommended for WordPress & MySQL) |
| Storage Space | 10 GB free disk space | 25 GB to 50 GB+ NVMe SSD |
| CPU | 1 vCPU (x86_64 or ARM64) | 2+ vCPUs |
| Server Access | Root SSH access | Root SSH with SSH key authentication |
Tip: If you are deploying on a 1 GB RAM VPS, add a 2 GB swap file before installing MySQL/MariaDB so memory spikes do not interrupt compilation—one of the key takeaways from our common VPS mistakes guide.
How to Install aaPanel Step-by-Step
Follow these five straightforward steps for how to install aaPanel cleanly from the command line.
Step 1: Connect via SSH and Update System Packages
Open your terminal and log in to your VPS as root:
ssh root@YOUR_SERVER_IP
If your server uses a non-root sudo account, switch to an interactive root shell first:
sudo su -
Next, update your package index and install curl, wget, and screen:
On Ubuntu or Debian:
apt update && apt upgrade -y
apt install -y curl wget screen
On AlmaLinux or Rocky Linux:
dnf update -y
dnf install -y curl wget screen
If your VPS has 1 GB or 2 GB of RAM, create a 2 GB swap file now:
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab
Step 2: Start a Screen Session
The installation script takes about 3 to 5 minutes to configure the panel core. Starting a screen session ensures the setup continues uninterrupted even if your local internet connection drops:
screen -S aapanel-install
Step 3: Run the Official aaPanel Installer Script
Execute the official installation command from the aaPanel download portal. This single command handles how to install aaPanel automatically across supported Linux distributions:
URL=https://www.aapanel.com/script/install_7.0_en.sh && if [ -f /usr/bin/curl ];then curl -ksSO "$URL" ;else wget --no-check-certificate -O install_7.0_en.sh "$URL";fi;bash install_7.0_en.sh aapanel
The script will ask two quick confirmation prompts in your terminal:
Do you want to install aaPanel to the /www directory now? (y/n):Typeyand press Enter.Do you need to enable the panel SSL? (yes/n):Typeyesand press Enter so your panel login traffic is encrypted over HTTPS immediately.

Step 4: Save Your Panel Login URL and Credentials
After roughly 3 to 5 minutes, the installer displays a green confirmation box containing your unique login details:
==================================================================
Congratulations! Installed successfully!
==================================================================
aaPanel Internet Address: https://YOUR_SERVER_IP:7800/a1b2c3d4
aaPanel Internal Address: https://10.0.0.2:7800/a1b2c3d4
username: your_random_user
password: your_random_password
==================================================================
Important: Copy the full aaPanel Internet Address—including the randomized port (commonly 7800 or an assigned random port) and the 8-character security path at the end—into your password manager. Without that exact URL path, aaPanel blocks direct IP access for security.
Step 5: Open Required Firewall Ports
If your VPS uses an active firewall, blocked ports are the top reason the login screen fails to load after you finish how to install aaPanel. Open SSH, web traffic, your panel port, phpMyAdmin (888), and passive FTP ports (39000:40000):
On Ubuntu / Debian (UFW):
sudo ufw allow 22/tcp comment 'SSH'
sudo ufw allow 80/tcp comment 'HTTP'
sudo ufw allow 443/tcp comment 'HTTPS'
sudo ufw allow 443/udp comment 'HTTP3 QUIC'
sudo ufw allow 7800/tcp comment 'aaPanel Admin'
sudo ufw allow 888/tcp comment 'phpMyAdmin'
sudo ufw allow 20:21/tcp comment 'FTP'
sudo ufw allow 39000:40000/tcp comment 'Passive FTP'
sudo ufw --force enable
On AlmaLinux / Rocky Linux (firewalld):
sudo firewall-cmd --permanent --add-port=7800/tcp
sudo firewall-cmd --permanent --add-port=888/tcp
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --add-port=443/udp
sudo firewall-cmd --permanent --add-port=20-21/tcp
sudo firewall-cmd --permanent --add-port=39000-40000/tcp
sudo firewall-cmd --reload
Note: If the installer assigned a different random port instead of 7800, replace 7800 in the command above with your exact port number. Also open that port in your cloud provider’s external firewall if applicable.
Essential Post-Installation Tasks
Completing the CLI script is only the first part of learning how to install aaPanel properly. Open your saved aaPanel Internet Address in a browser, bypass the initial self-signed SSL prompt, sign in, and finish these four setup steps.
1. Install the One-Click LNMP Web Stack
On your very first login, aaPanel launches a setup popup offering two software bundles:
- LNMP (Recommended): Installs Nginx, MySQL / MariaDB, PHP, Pure-FTPd, and phpMyAdmin. Choose Fast installation mode (uses pre-compiled binaries and finishes in 5–10 minutes) rather than Compiled mode (which builds from source and takes 30+ minutes).
- LAMP: Installs Apache instead of Nginx—only needed if your application relies heavily on custom
.htaccessrules.
2. Bind a Custom Domain and Free SSL Certificate to the Panel
To replace the raw IP address and browser certificate warning with a clean domain and trusted Let’s Encrypt padlock:
- Point an A Record in your DNS settings (for example,
panel.yourdomain.com) to your VPS IPv4 address. - Inside aaPanel, go to Settings in the left sidebar.
- Enter
panel.yourdomain.comin the Domain field and click Save. - Toggle Panel SSL ON, choose Let’s Encrypt, enter your email address, and submit to issue a valid certificate automatically.

3. Create Your First Website and Deploy WordPress
Once the LNMP background tasks finish installing:
- Click Website in the left navigation menu and select Add site.
- Enter your domain name (
yourdomain.com), select Create Database (MySQL), choose your PHP version (PHP 8.2 or 8.3), and click Submit. - Click the Not Set link under the SSL column next to your domain, select the Let’s Encrypt tab, check your domain, and click Apply (also toggle Force HTTPS ON).
- For WordPress sites, use aaPanel’s built-in One-Click Deployment plugin from the App Store tab to deploy WordPress in seconds.
4. Manage aaPanel from the Terminal with the bt CLI
aaPanel includes a built-in command-line management menu called bt. If you ever forget your login URL, need to reset your password, or accidentally lock yourself out, run:
sudo bt
Useful shortcuts inside the bt menu include option 14 (view current login URL, username, and password), option 5 (reset panel password), option 8 (change panel port), and option 11 (temporarily disable the security entrance path). For deeper server protection, pair aaPanel with our Linux server hardening checklist.
Frequently Asked Questions About How to Install aaPanel
Can I follow this guide on how to install aaPanel on a 1 GB RAM VPS?
Yes. Unlike heavier panels, how to install aaPanel works smoothly on a 1 GB RAM VPS because the core panel uses under 60 MB of RAM. Just make sure you add a 2 GB swap file before running the LNMP installer, and select MariaDB 10.6 / 10.11 or MySQL 5.7 instead of MySQL 8.0 (which requires at least 2 GB of RAM).
Is aaPanel free to use on a VPS?
Yes. The core edition available on the aaPanel official website is completely free for unlimited websites and domains. An optional aaPanel Pro upgrade exists for commercial add-ons like the Nginx WAF module and priority support, though the free edition includes everything needed to host production websites.
Should I choose aaPanel or CyberPanel for my VPS?
Both are great free alternatives to cPanel. Choose aaPanel if you want ultra-low RAM usage (great for 1 GB VPS plans), support for Debian, and an intuitive App Store for Nginx, Redis, Docker, and Node.js. Choose CyberPanel if you specifically want native OpenLiteSpeed and LSCache for WordPress—see our guide on how to install CyberPanel to compare the setup steps.
How do I check if aaPanel services are running properly?
You can check the panel daemon status anytime over SSH with sudo bt status or restart the panel cleanly using sudo bt restart. If your websites feel sluggish under traffic, check RAM and disk metrics using our Linux server troubleshooting guide.
Conclusion
Mastering how to install aaPanel gives you an intuitive, lightweight control panel to manage websites, databases, SSL certificates, and backups without recurring licensing fees. By starting from a clean Ubuntu or Debian image, opening the required firewall ports, and installing the LNMP stack in Fast mode, you can go from a fresh VPS to a live HTTPS website in under fifteen minutes.
Bookmark this guide on how to install aaPanel for your next server deployment, configure scheduled off-site backups inside the panel’s Cron tab, and enjoy streamlined VPS management.
