Table of Contents
Introduction
In today’s article, will show you how to change the aaPanel port to help increase the security of aaPanel or depending on certain needs, you need to change the default port.
When installing aaPanel, the default port to use is 8888. However, the developers of control panels recommend that users change and use a different port instead of the default port. To improve security as well as limit brute force attacks on your server, the developer of aaPanel has always warned about the potential danger with the default port when you have just installed the content.
The current panel uses the default port [8888], which has security risks. Please modify the panel port in the panel settings
So how to change the aaPanel port, please follow the below guide.
2 Different methods you can change the aaPanel port:
Method 1: Change the port with aaPanel CLI
To change the aaPanel port, you need to SSH into your server with the highest privilege as root.
After SSH into the VPS, type bt
to enter the aaPanel CLI menu. Next, press the number 8
corresponding to the Change panel port function and fill in the information as below.
If you receive a message like the above, you have changed the port completely.
Method 2: Change the port from the aaPanel admin page
This way, you just need to log in to the aaPanel admin page under the default path http://
server-ip:8888/
to login.
After logging in to aaPanel, you can change the port by going to
Settings => Modify => Port => Confirm
Open the port with Firewall
By default, aaPanel will be using the CSF firewall, so after you change the port, you need to open this new port on CSF to access aaPanel. For example, I change the new port to 2021, the steps to open the port are as follows:
Command annotation:
- Command 1: Open the CSF configuration file
- Command 2: Press
i
to edit the file content. - Command 3: Press
:x
to save the content after editing. - Command 4: Reload CSF to receive configuration.
Check aaPanel with the new port
After successfully changing and opening the port with CSF, you can access aaPanel with the new port to see if it works well. After changing, I was able to access the new port 2021 as shown below:
http://
server-ip:2021/
Conclusion
So, in this article, showed you how to change the default port of aaPanel with just a few simple steps. Changing the port seems like a simple job, but it gives you more safety and peace of mind in the process of using and operating VPS. If you find this helpful article, please share it widely.