aaPanel is an open-source web hosting control panel designed to simplify the management and control of web services on Linux servers. Install aaPanel on Linux provides an easy-to-use graphical interface and numerous features for server management, including user account management, and the installation and configuration of web applications such as Apache, Nginx, PHP, MySQL, FTP, and more.
How to install and use aaPanel to manage a Linux or Ubuntu VPS server
When it comes to VPS servers, specifically on Linux-based operating systems like Ubuntu or Debian, some of you think that it takes a lot of knowledge and experience to be able to use it.
This is also true, but let’s get rid of that thought because ItsmeIT finds that it’s really not that difficult. It is important that you decide whether you want to use VPS or not. This article ItsmeIT will guide step by step to install as well as how to use aaPanel to manage VPS server Linux or Ubuntu so you can easily manage your VPS server.
Step 1: Install aaPanel on Linux or Ubuntu VPS
aaPanel supports Linux-based operating systems such as Centos, Ubuntu versions 20.04, 22.04 or later, or Deepin and Debian 10, 11 or later.
Note: When using aaPanel you will have all the tools like Nginx/Apache/PHP and MYSQL so if you have those installed then remove them all, and make sure the system is clean.
To install aaPanel on Linux VPS you can use the following command:
yum install -y wget && wget -O install.sh http://www.aapanel.com/script/install_6.0_en.sh && bash install.sh aapanel
Command to install aaPanel on Ubuntu VPS or Deepin:
wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && sudo bash install.sh aapanel
Command to install aaPanel on Linux Debian:
wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && bash install.sh aapanel
In this article, ItsmeIT will guide you through the install aaPanel on Ubuntu 22.04. During the installation, you will be prompted to confirm certain details such as SSL permissions and directory paths. Follow the instructions displayed on the terminal and enter either “yes” or “y” when required. Refer to the screenshot below for visual guidance.
As you can see, after I successfully installed aaPanel on an Ubuntu 22.04 VPS with a time of 2 minutes, I received the URL for administration that was “https://192.168.1.141:7800/”. If you install it on the server, the result will be the same.
Step 2: Install Nginx or Apache and PHP + MYSQL
Between Nginx and Apache, you have the option to choose which server to run your website on. However, ItsmeIT finds that Nginx is easy to use and manage, and it offers better performance than Apache in heavy load environments.
As you can see, after install aaPanel on Ubuntu 22.04, you will receive the admin URL (aaPanel Internet Address:) as shown in the screenshot. Now, copy and open that URL in your browser and log in with your username and password.
The first time you log in you will get a popup showing you to choose tools like Nginx or MYSQL to install. As mentioned on how to use aaPanel to manage VPS earlier, ItsmeIT will select (LNMP Recommended) Nginx, Mariadb, PHP and phpMyadmin and click “One click” to install.
The installation process takes time, please wait patiently for it to complete. If you wait too long for an installation task then “restart” aaPanel by clicking “Home” and clicking “Restart” in the top right corner.
You can also press the (X) to close and get used to the aaPanel interface first. To install the necessary packages you can open the “App Store” from the menu. You can also easily install and change versions like PHP or change the version of MYSQL on aaPanel.
Step 3. How to install WordPress on aaPanel
To install a website on aaPanel first make sure you have successfully installed Nginx or Apache and PHP+MYSQL. On the aaPanel interface click “Website->Addsite”, here ItsmeIT will click on the 3rd tab “Wordpress deploy” to install Wordpress on aaPanel.
Enter the domain name as well as the information for your website and click “Submit” to initialize the website. For the site to work you also need to make sure that the DNS is configured to point to the IP of the VPS.
When install wordpress on aaPanel done, you can check by entering “http://youdomain.com” note that the site does not have SSL (https) so you can only run “http”. Continue reading the following steps to install SSL for wordpress on aaPanel.
Step 4. How to install SSL certificate for website on AAPanel
To install SSL certificates for websites on AAPanel and manage VPS, there are 2 simple ways to use “Let’s Encrypt” or “Cloudflare”. Both services are suitable.
With “Let’s Encrypt” you get SSL auto-renewal, just the first installation and configuration. With Cloudflare, you can sign up for a free SSL certificate with a term of up to 15 years. These are the options for using aaPanel to conveniently manage your VPS and ensure the security of your website.
Method 1: Install free SSL for website on aaPanel using Let’s Encrypt
Click Website then click on your domain name on the aaPanel interface and continue to click SSL. Select the domain name to install SSL and click “Apply”.
Wait a moment for the SSL authentication process to be installed for your website. When receiving the success message, click “Force HTTPS” to redirect “http” to “https”.
How to fix the error of fail to install SSL Let’s Encrypt on aaPanel
There are 2 common errors when you cannot install SSL for your website when install aapanel Linux.
Due to the new DNS configuration, the DNS pointing to your IP has not yet resolved the domain name, resulting in SSL authentication failure. If you get this error, skip this step, wait a few hours and check on the domain name on dnschecker.org if it points to your VPS IP correctly, you can do it again.
If you get the error “ Invalid version. The only valid version for x50 9req is 0 ” fails to install SSL Let’s Encrypt on aaPanel, the way to handle it is as follows:
Click on “Files” in the menu of aaPanel, then open the folders in turn under the path “/www/server/panel/class”. Continue to find the file named “acme_v2.py” click twice to open it.
When the file editor is displayed, press “Ctrl + F” and find the string “X509Req.set_version( 2 )” then change it to “X509Req.set_version( 0 )” and click “Save” to save it.
Click “Home” to return and click “Restart” in the top right corner to restart aaPanel (Restart aaPanel). You can now reinstall SSL for your site.
Note: For other errors you can try searching for answers or asking questions on forum.aapanel.com.
Method 2: Install SSL on aaPanel using Cloudflare
In the instructions for install and using aaPanel to manage VPS, it is also very important to install SSL, in which ItsmeIT will use Cloudflare’s DNS and SSL. Cloudflare provides a comprehensive solution for website acceleration and security, including content delivery network (CDN), web application firewall (WAF), DDoS protection, and more, which improve performance and security of your website.
Step 1: Log in to your Cloudflare account:
Go to the Cloudflare website and log in to your account.
Step 2: Add the domain to Cloudflare:
After log in, add your domain name to Cloudflare by entering the domain name in the “Add a website” box on the home page or by selecting “Add a site” from the main menu. Choose “Free” or you can buy packages according to your needs and click “Continue”.
Then Cloudflare will ask you to configure “NS” to use their DNS and you need to wait until Cloudflare confirms it successfully. Cloudflare will guide you through the process of adding a domain name.
Step 3: Select the type of security certificate “SSL/TLS”
After your website has been successfully verified and activated on Cloudflare. In the “SSL/TLS” page, you can choose the type of SSL certificate you want to use. Cloudflare offers options like “Flexible SSL”, “Full SSL”, and “Full (Strict) SSL”. These options provide different levels of security for the SSL connection, choose the third option, “Full”.
Click on “Origin Server” and then click on “Create Certificate” to create SSL.
Set the options as shown in the picture, then click on “Create” to generate the SSL certificate. Make sure to check the “Certificate Validity” box and select a validity period of 15 years.
Key Format: select “PEM” and copy and save the 2 codes in the box “Origin Certificate” and “Private Key”. Save the file for later use.
Some of Cloudflare’s recommended configurations:
- Overview: Enable SSL/TLS Recommender
- Edge Certificates: Enable Always Use HTTPS/Opportunistic Encryption/TLS 1.3/Automatic HTTPS Rewrites
- Origin Server: Enable Authenticated Origin Pulls
After having 2 codes “Origin Certificate” and “Private Key”, now open aaPanel and click on “Website” select the domain name and click on “SSL” then click on the “Other certificate” tab and enter “Origin” in turn. Certificate” and “Private Key” of Cloudflare before.
Click “Save” to save the SSL on aaPanel and also enable “Force HTTPS”. Go back to “Home” and press “Restart” (Restart server). You can simply restart Nginx alone.
Clear browser cache + Cloudflare cache if it is enabled and now your site has 15 years of free Cloudflare SSL and CDN.
Step 5: How to configure SSL for aaPanel admin page
When use aaPanel to manage VPS, in addition to installing SSL for the website, you should also set up SSL for the aaPanel admin page. To do this click on “Settings -> Security” and disable the “SSL Panel” function if it is already open.
Wait a few seconds for the URL to automatically reload and you will re-enable the “Panel SSL” function. Then an SSL setup popup is displayed, now you can choose “Let’s encrypt” or Cloudflare.
Use Cloudflare to set up SSL
In step 3 ItsmeIT prompted you to save 2 codes “Origin Certificate” and “Private Key”, now select “I have certficate ” in “Cert Type” and enter 2 corresponding SSL codes and click “Submit”. Even though Cloudflare SSL has been configured for aaPanel, the URL is still the IP so please read step 6 to continue.
Use SSL Let’s encrypt to set up SSL
- Enter your domain name in the “Domain” field.
- You can change any port, but make sure it doesn’t coincide with the ports of other applications on the server.
- Select “Let’s encrypt” under “Cert Type”, enter email to receive notification and click “Submit”.
Step 6: Configure domain alias instead of IP on aaPanel
Your aaPanel management page is currently using an IP address to run directly, not a domain name so SSL has not taken effect yet. ItsmeIT emphasizes that this step is important because if you do it wrong, you won’t be able to access the aaPanel admin page anymore.
To change IP by domain name on aaPanel, click “Settings” on aaPanel admin page:
- Domain: Enter your domain name
- Panel port: If you use Cloudflare SSL, replace it with one of the following ports 443|2053|2083|2087|2096|8443.
As you can see my admin page URL has used SSL and changed from IP to “https://itsmeit.co/2087” after configuring the domain name instead of IP on aaPanel successfully.
Step 7: How to fix error can’t access admin aaPanel
While using aaPanel to manage VPS, there will also be some errors such as when you change IP or domain name, or install SSL but get an error that you can’t access admin aaPanel anymore, how to handle the error of not accessing the control panel? access the aaPanel admin page as follows:
Use SSH to login to the server and run the command
bt 12, or run the command
bt and use option 12 from the screen displayed on the terminal.
Keep running the command
bt 14 to see aaPanel info through which you will get your exact URL.
Step 8. How to use SSL Cloudflare for phpMyadmin aaPanel
First open “App Store” find phpMyadmin in the list and do the installation. By default phpMyadmin will use “http” and run through port 888. If you use “Let’s encrypt” there should be no problem, but if you use SSL Cloudflare then you need to change another port for phpMyadmin .
The HTTPS ports allowed by Cloudflare are 443/2053/2083/2087/2096/8443. For example, if aaPanel is running port 8443, then phpMyadmin will have to use another port for the “Open SSL” configuration. Here ItsmeIT has selected port 2087 for phpMyadmin like below screenshot.
In which: Access port 888 is to use HTTP, and OpenSSL’s port is 2087 to use HTTPS. To access phpMyadmin click on “Database” and click on the “phpMyadmin” tab.
That’s 8 step guide to install and use aaPanel to manage VPS Ubuntu or Linux/Unix. Installing aaPanel on a Linux VPS is an important process to start managing your VPS effectively. If you encounter any problems in the steps above, leave a comment below.