Server Management

How to Set Up aaPanel on a VPS — Step by Step

aaPanel is a free, powerful web hosting control panel for Linux VPS servers. This step-by-step guide covers installation, creating websites, setting up PHP, MySQL, SSL, and backups.

April 5, 2025 13 min read NextCode Solutions

aaPanel is one of the best free web hosting control panels available for Linux VPS servers. It gives you a clean graphical interface to manage websites, PHP versions, MySQL databases, SSL certificates, file manager, and backups — without needing to type every command manually. It is particularly popular in the Sri Lankan and Asian hosting community for its simplicity and power.

This guide walks you through a clean installation on an Ubuntu VPS from scratch.

Server Requirements

  • Ubuntu 20.04 or 22.04 LTS (recommended) or CentOS 7/8
  • Minimum 1GB RAM (2GB recommended for production)
  • Fresh server — aaPanel should be installed on a clean OS
  • Root SSH access

Step 1: Connect to Your VPS

SSH into your server as root:

ssh root@your-server-ip

Step 2: Update the Server

apt update && apt upgrade -y

Step 3: Install aaPanel

Run the official aaPanel installation script for Ubuntu:

URL=https://www.aapanel.com/script/install_6.0_en.sh && if [ -f /usr/bin/curl ];then curl -ksSO "$URL" ;else wget -nv -O install_6.0_en.sh "$URL";fi;bash install_6.0_en.sh aapanel

The installation takes 5-15 minutes. At the end it will display your aaPanel login URL, username, and password — save these immediately.

Step 4: Open the Firewall Port

aaPanel runs on port 7800 by default. Open it in your VPS firewall:

ufw allow 7800/tcp && ufw allow 80/tcp && ufw allow 443/tcp && ufw allow 22/tcp && ufw enable

Step 5: First Login and LNMP Setup

Log into your aaPanel URL (e.g. http://your-ip:7800/xxxxxx). On first login it prompts you to install a stack. Choose LNMP (Linux + Nginx + MySQL + PHP) — this is the recommended stack for WordPress and PHP sites.

Step 6: Create Your First Website

1

Website → Add Site

Enter your domain name, select PHP version (8.1 recommended), and click Submit. aaPanel creates the site directory and Nginx config automatically.

2

Set up the Database

Go to Database → Add. Create a database name, username, and password. Tick "Bind site" to link it to your website automatically.

3

Upload Your Site Files

Use aaPanel File Manager or SFTP (FileZilla) to upload your WordPress or PHP files to /www/wwwroot/yourdomain.com/

4

Install Free SSL

In Website → your domain → SSL → Let's Encrypt → tick your domain → Apply. Enable "Force HTTPS" once certificate is issued.

5

Set Up Automated Backups

Go to Cron → Add Task → Backup Site. Set frequency to Daily, retention to 7 days, and add a cloud storage destination (Google Drive or FTP).

Essential Post-Installation Settings

Performance tip: After setting up, install the aaPanel Redis and Memcached extensions (App Store → one-click install) and enable OPcache in PHP settings. These three changes alone can double your site speed on a fresh server.

Related Reading

Need a VPS Set Up Professionally?

NextCode Solutions handles full VPS provisioning, aaPanel installation, site migration, and server hardening. Ready for production within one business day.

Get Server Setup Help