Installing CyberPanel on Ubuntu: A Comprehensive Guide
CyberPanel is a powerful and user-friendly web hosting control panel.
CyberPanel is designed to simplify server management tasks on Linux-based systems like Ubuntu. In this article, we’ll walk you through the step-by-step process of installing CyberPanel on your Ubuntu server.
Prerequisites
Before we begin, ensure that your Ubuntu server meets the following requirements:
- Fresh installation of Ubuntu 18.04, 20.04, or 22.04
- Minimum 1GB RAM (2GB or higher recommended)
- At least 10GB of disk space
Step 1: Update System Packages
First, log in to your Ubuntu server via SSH and update the system packages to ensure you have the latest versions installed:
sudo apt update
sudo apt upgrade
Step 2: Install Dependencies
Next, install the required dependencies for CyberPanel:
sudo apt install python3 python3-dev python3-pip wget unzip rsync net-tools curl libssl-dev
Step 3: Download and Run the Installation Script
CyberPanel provides a convenient installation script that automates the entire process. Run the following command to download and execute the script:
sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)
Step 4: Select Installation Options
The installation script will guide you through several options. Follow the prompts and make your selections:
- Choose option “1” to install CyberPanel.
- Select the desired version of LiteSpeed Web Server: “OpenLiteSpeed” (free) or “LiteSpeed Enterprise” (paid)[1].
- Choose “Y” to install the full service, including PowerDNS, Postfix, and Pure-FTPd[1].
- Select “N” to skip remote MySQL setup and continue with the local MySQL server setup[1].
- Choose the latest MySQL version unless you need a specific older version[1].
- Set an admin password for CyberPanel when prompted[1].
- Decide whether to install Memcached and its PHP extension[1].
- Choose whether to install Redis and its PHP extension[1].
- Select whether to install WatchDog (currently in beta)[1].
This step may take some time depending on your internet speed.
Step 5: Allow CyberPanel Ports Through the Firewall
After the installation is complete, you’ll need to allow CyberPanel ports through the firewall.
Check if the CyberPanel ports are already open using the command line by follow these steps:
- First, list all the currently listening ports using the
netstat
command:
sudo netstat -tunlp
tunlp will show you the ports that are currently open and listening for incoming connections, along with the associated protocol (TCP or UDP) and the process ID (PID) of the program using that port.
- Look for the ports used by CyberPanel in the output. The default ports opened by CyberPanel are:
- TCP 8090 for the CyberPanel web interface
- TCP 80 and 443 for HTTP/HTTPS web traffic
- TCP 21 and TCP 40110-40210 for FTP
- TCP 25, 587, 465, 110, 143, and 993 for mail services
- TCP and UDP 53 for DNS services[2][4]
- If you see these ports listed in the
netstat
output, it means they are open and listening for connections. - Alternatively, you can use the
lsof
command to list open files, including network sockets:
sudo lsof -i -P
lsof will show you all the open network connections, including the ports and the processes using them[1].
- You can also use the
nmap
tool to scan your server for open ports:
sudo nmap -sS -O localhost
This will perform a SYN stealth scan on your local machine and list all the open ports along with some information about the operating system’
If you find the ports are not open, run the following commands to allow access to the http portal:
sudo ufw allow 8090/tcp
sudo ufw allow 8091/tcp
sudo ufw allow 53/tcp
sudo ufw allow 53/udp
If your Ubuntu server is running the firewalld
firewall, you can use the following commands to add the necessary CyberPanel ports:
- To open the CyberPanel web interface port (8090) permanently:
sudo firewall-cmd --permanent --add-port=8090/tcp
- To open the HTTP (80) and HTTPS (443) ports for web traffic:
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=443/tcp
- To open the FTP ports (21 and 40110-40210):
sudo firewall-cmd --permanent --add-port=21/tcp
sudo firewall-cmd --permanent --add-port=40110-40210/tcp
- To open the mail service ports (25, 587, 465, 110, 143, 993):
sudo firewall-cmd --permanent --add-port=25/tcp
sudo firewall-cmd --permanent --add-port=587/tcp
sudo firewall-cmd --permanent --add-port=465/tcp
sudo firewall-cmd --permanent --add-port=110/tcp
sudo firewall-cmd --permanent --add-port=143/tcp
sudo firewall-cmd --permanent --add-port=993/tcp
- To open the DNS ports (53 TCP and UDP):
sudo firewall-cmd --permanent --add-port=53/tcp
sudo firewall-cmd --permanent --add-port=53/udp
After adding the required ports, you need to reload the firewall for the changes to take effect:
sudo firewall-cmd --reload
These commands will permanently open the necessary ports for CyberPanel in the firewalld
firewall on your Ubuntu server[1][2][3][4]. Remember to open any additional custom ports required by your applications or services.
Then check if the CyberPanel ports are open in the firewall by following these steps:
- Log in to the CyberPanel web interface by navigating to
https://your-server-ip:8090
in your web browser. - From the left sidebar menu, go to “Server” > “Security” > “Firewall”[1][2].
- On the Firewall page, you will see a list of existing firewall rules. The default ports opened by CyberPanel are:
- TCP 8090 for the CyberPanel web interface
- TCP 80 and 443 for HTTP/HTTPS web traffic
- TCP 21 and TCP 40110-40210 for FTP
- TCP 25, 587, 465, 110, 143, and 993 for mail services
- TCP and UDP 53 for DNS services[5]
- Verify that these ports are listed in the firewall rules. If a port is missing, you can add a new rule by clicking the “Add” button and providing the required details (rule name, protocol, and port number)[1][3].
- If you have added any custom ports for your applications or services, ensure those ports are also listed in the firewall rules.
By following these steps, you can easily check if the necessary CyberPanel ports are open in the firewall. If a required port is not open, you can add a new firewall rule to allow traffic through that port.
Step 6: Access CyberPanel
You can now access the CyberPanel web interface by navigating to https://your-server-ip:8090
in your web browser. Use the admin username “admin” and the password you set during the installation[2].
Congratulations! You’ve successfully installed CyberPanel on your Ubuntu server. From the CyberPanel dashboard, you can manage websites, databases, email accounts, and various other server settings with ease[2].
Conclusion
CyberPanel is a powerful and user-friendly control panel that simplifies web server management on Ubuntu. By following this guide, you can streamline the installation process and start leveraging the features of CyberPanel to efficiently manage your web hosting environment[3][4][5].
Citations:
[1] https://inguide.in/install-cyberpanel-on-ubuntu-and-create-wordpress-website/
[2] https://www.inmotionhosting.com/support/edu/cyberpanel/install-cyberpanel/
[3] https://www.redswitches.com/blog/cyberpanel-on-ubuntu/
[4] https://cyberpanel.net/KnowledgeBase/home/install-cyberpanel/
[5] https://ultahost.com/knowledge-base/install-cyberpanel-on-ubuntu/