To install aaPanel on Ubuntu or Debian you run one script as root, open the panel port in your firewall, and complete the setup in a browser. The whole process takes about ten minutes of typing plus the time the script spends building its web stack. This guide uses Ubuntu 22.04/24.04 and Debian 12, but the same steps work on any recent release.
aaPanel is a web hosting control panel that manages Nginx or Apache, PHP, databases, FTP and cron jobs from a browser. You install aaPanel yourself on your Linux VPS — which is exactly what this guide does.
Before you start
- A Linux VPS running Ubuntu 22.04/24.04 or Debian 12, with root access. Linux VPS plans give you root by default.
- An SSH client. If this is your first connection, see Connect to your Linux VPS with SSH.
- Ports 22 (SSH), 80 and 443 (web) and 8888 (panel) reachable from your network.
- Enough memory for the stack aaPanel installs. Check the vendor's current system requirements; on a small VPS, add swap before you start if memory is tight.
Tip: If you prefer not to work as root all day, create a normal admin account first with Create a sudo user on Linux. The aaPanel installer itself must run as root.
Step 1: Update the server
Connect and bring the package lists up to date.
ssh root@203.0.113.10
apt update && apt upgrade -y
apt install -y curl wgetIf the kernel or libc is upgraded, reboot before continuing so the installer builds against the running kernel.
rebootReconnect after a minute. Then confirm the release:
cat /etc/os-releaseInstall aaPanel on Ubuntu or Debian
The official installer is a shell script. Download and run it as root:
URL=https://www.aapanel.com/script/install_6.0_en.sh && curl -ksSO "$URL" && bash install_6.0_en.sh aapanelThe script asks you to confirm, then compiles and installs its components. Expect several minutes of scrolling output. When it finishes, it prints something like this — copy it somewhere safe:
aaPanel Internet Address: http://203.0.113.10:8888/8f3c1a2b
aaPanel Internal Address: http://10.0.0.5:8888/8f3c1a2b
username: xxxxxxxx
password: xxxxxxxxxxxxThe random string after the port is the security entrance, a secret path that replaces the plain / login URL. Anyone hitting http://203.0.113.10:8888/ without it gets nothing useful.
Note: Script URLs and filenames change over time. If the download fails, check the current install command in aaPanel's own documentation rather than guessing a new path.
Step 2: Open the panel port
The panel listens on TCP 8888. Open it, plus the web ports, in UFW.
Warning: Allow SSH before you enable UFW, or you will lock yourself out of the server.
ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 8888/tcp
ufw enable
ufw status verboseIf your provider also has a cloud firewall or security group, open the same ports there. Full details are in Set up a UFW firewall on Ubuntu and Debian.
Tip: Once you have finished setting up, restrict 8888 to your own IP with ufw delete allow 8888/tcp followed by ufw allow from 198.51.100.7 to any port 8888 proto tcp.
Step 3: Complete the web setup
Open the security entrance URL from the install output in your browser:
http://203.0.113.10:8888/8f3c1a2bLog in with the printed username and password. On first login aaPanel asks you to bind an account — you can skip this and stay local. It then offers a web server stack:
- LNMP — Nginx, MySQL/MariaDB, PHP. The usual choice for WordPress and most PHP sites.
- LAMP — Apache instead of Nginx. Pick this if you rely on
.htaccessfiles.
Choose one and let the panel install the components. This is the longest part of the process; leave the browser tab open. When it finishes you land on the dashboard, where you can create sites, databases, FTP accounts and cron jobs.
Step 4: Secure the panel
A fresh panel on port 8888 is a known target. Do these four things before you host anything real:
- Change the panel port and the security entrance from the panel's Settings page.
- Enable SSL for the panel so the login is not sent in clear text.
- Turn on the built-in firewall and Fail2ban rules in the panel's Security section.
- Set a strong panel password and store it in your password manager.
The bt command gives you a menu for panel management, including changing the port and resetting the password:
btTo print the panel address, username and password again at any time:
bt defaultCheck it works
Confirm the panel is listening and reachable:
ss -tlnp | grep 8888
curl -I http://127.0.0.1:8888The first command should show a process listening on 8888, and the second should return an HTTP response. Then, from your browser, log in through the security entrance URL and create a test site. Point a domain at the server, add it in the panel, and load the default page over HTTP. If that page appears, the web server, PHP and the panel are all working together.
Troubleshooting
- The panel URL times out in the browser — the port is blocked. Check
ufw statuson the server and the firewall rules in your VPS provider's control panel, then confirm you are usinghttp://and the correct port. - You lost the security entrance path — run
bt defaultas root. It prints the current panel address, username and password. - The installer stops with
curl: command not foundorwget: command not found— the image is minimal. Runapt install -y curl wgetand start the script again. - Database installation fails or the script is killed — usually low memory. Add a swap file, then re-run the installer.
- Port 8888 is already in use — another service holds it. Use the
btmenu to change the panel port, then open the new port in UFW. - Login says the password is wrong — reset it from the
btmenu rather than reinstalling the panel.
Next steps
- Install CyberPanel on Ubuntu or AlmaLinux if you want to compare panels before committing.
- Install and secure MariaDB or MySQL to harden the database aaPanel installed.
- Install multiple PHP versions on Ubuntu and Debian so each site can run its own PHP release.
