Installing CyberPanel on Ubuntu and CentOS

setup configure CyberPanel on Ubuntu Debian CentOS almalinux redhat

CyberPanel is an open-source web hosting control panel that allows you to easily manage web servers. It provides a GUI to handle domains, websites, databases, DNS zones, emails accounts and more.

CyberPanel can be installed on Ubuntu and CentOS servers. The installation process is quite straightforward but does involve a few steps. This guide will walk you through the entire installation process on both Ubuntu and CentOS.

Prerequisites

Before starting the installation, make sure your server meets the following requirements:

  • Fresh installation of Ubuntu 18.04/20.04/22.04 or CentOS 7/8. Do not install CyberPanel on an existing setup, as it can cause issues.
  • Minimum 2GB RAM, although 4GB is recommended for better performance.
  • Minimum 40GB disk space for full installation. 10GB for minimal install.
  • A dedicated IP address for your server. It should not be behind NAT.
  • OpenSSH installed and a user with root privileges.
  • All the ports required by CyberPanel open in your firewall.

Once your server is ready, you can move on to the installation steps.

Step 1 – Prepare the Server

Log in to your server via SSH as root.

For Ubuntu, run the following commands:

$ sudo apt update
$ sudo apt upgrade -y

For CentOS, run:

$ sudo yum update -y

This will update all the installed packages to their latest versions.

Next, check that SELinux is disabled on CentOS using:

$ sudo sestatus

If it shows “SELinux status: disabled”, you are good to go. If not, disable it temporarily using:

$ sudo setenforce 0

Finally, reboot your server so all changes can take effect.

$ reboot

The server will now be ready for the installation process.

Step 2 – Install Dependencies

CyberPanel requires a few additional dependencies to be installed beforehand.

On Ubuntu:

$ sudo apt install wget curl lscpu python3 git redis-server python3-pip python3-virtualenv python3-dev build-essential libssl-dev libcurl4-openssl-dev libsodium-dev libjpeg-dev libffi-dev memcached dnsutils -y

On CentOS:

$ sudo yum install wget curl lscpu python git redis MariaDB-server MariaDB-client memcached chrony libjpeg-devel libcurl-devel rpm-build python3 python3-devel python3-pip python3-virtualenv gcc policycoreutils-python -y

These commands will install all the required dependencies and packages.

Step 3 – Install CyberPanel

Now we are finally ready to install CyberPanel itself!

Run the following command to download and execute the installer script:

$ sudo su - -c "sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)"

The installer will now start asking you questions to customize your installation.

Select LiteSpeed Version

Choose whether you want to install CyberPanel with OpenLiteSpeed or LiteSpeed Enterprise. If you select Enterprise, enter your license key when prompted.

Select Options

You will be asked whether you want to install:

  • PowerDNS: Handles DNS for your websites. Say Y.
  • Postfix: Handles emails. Say Y.
  • PureFTPd: Handles FTP accounts. Say Y.
  • Memcached: Caching backend. Say Y.
  • Redis: Key-value store. Say Y.
  • Watchdog: Restarts any stalled services. Say Y.

Select Version

Pick the latest version of CyberPanel when prompted.

Set Admin Password

Create a strong password for the CyberPanel admin console.

The installer will now automatically install CyberPanel and all the chosen components. This process can take 5-10 minutes to complete.

Once done, you will see a completion message with your credentials and important details like URLs to access CyberPanel.

Your CyberPanel installation is now ready!

Step 4 – Finalize Installation

Although CyberPanel is installed, we need to take a couple more steps to finalize the setup.

Restart Server

Restart your server for all changes to take effect:

$ sudo reboot

Wait a minute or two for it to start up again before proceeding.

Add CyberPanel Firewall Rules

For CyberPanel to function properly, the following ports need to be open in your firewall:

  • TCP 8090 – CyberPanel Admin Console
  • TCP 80 and TCP 443 – Web Server Traffic
  • TCP 21 and TCP 40110-40210 – FTP Connections
  • TCP 25, 465, 587, 110, 993 – Email Services
  • TCP 53 and UDP 53 – DNS Traffic

Add rules to allow these ports if needed.

Install LetsEncrypt SSL Certificate

Access the CyberPanel Admin Console and navigate to “Let’s Encrypt Settings”. Here you can generate and install free SSL certificates for your domains.

Launch your websites with HTTPS enabled for security.

Test CyberPanel

Create a new domain, host a simple HTML website under it and test access to it. Also create some email accounts and test sending/receiving emails.

This verifies that your installation is fully working.

Congratulations! Your CyberPanel control panel is now ready to manage your web hosting server.

Accessing and Configuring CyberPanel

Once installed, you can access the CyberPanel admin dashboard using:

URL: https://serverIP:8090

Username: admin

Password: The password your set during installation

On the dashboard you can:

  • Create and manage domains
  • Add and manage websites under domains
  • Add and manage DNS zones
  • Create email accounts
  • Manage databases
  • Setup SSL certificates
  • Manage FTP accounts
  • Install PHP/Python applications like WordPress, Drupal etc.
  • Access logs and statistics
  • Manage server configurations
  • Perform backups and restores
  • Manage users and permissions
  • Configure security settings like firewall and more

Refer to the CyberPanel documentation to understand all the features in depth. They provide guides on how to use and configure every aspect of managing your server through CyberPanel.

Some important things you should do initially:

  • Install free SSL certificates from Let’s Encrypt for your domains using the built-in manager.
  • Configure Postfix for sending/receiving emails.
  • Install applications like PHPMyAdmin for database management.
  • Setup FTP accounts for users to manage files.
  • Configure security settings like firewall, fail2ban etc.

Also keep your CyberPanel updated to the latest version regularly for security updates and new features.

Troubleshooting Common Issues

Following are some common issues faced during CyberPanel installations:

Stuck on “Loading…” on Admin Dashboard

This is likely caused by SELinux being enabled on CentOS. Temporarily disable it by running:

$ sudo setenforce 0

503 Service Unavailable Error

If you get a 503 error when trying to access a domain, restart the lscpd service:

$ sudo systemctl restart lscpd

Also activate virtualenv by running:

$ source /usr/local/CyberCP/bin/activate

Firewall Blocking Access

Make sure all the required ports are open in your network firewall. Refer to the ports list given earlier in the guide.

Emails Not Being Sent/Received

Follow CyberPanel’s email configuration guide to setup and debug Postfix issues.

Websites Not Loading

Make sure DNS records are properly configured for your domains. And the actual website content is located in the correct directory configured in CyberPanel.

Feel free to ask questions on the CyberPanel Forum if you need help resolving any other issues during setup.

Conclusion

Installing CyberPanel on Ubuntu and CentOS gives you a powerful open-source hosting control panel to easily manage your web servers through a GUI.

Just follow this step-by-step guide during your installation and configuration, and you will have a smoothly running hosting environment. Keep your server and CyberPanel updated and secure.

CyberPanel enables you to host unlimited websites on your servers while minimizing management overhead. It is a great option for small to medium hosting providers, developers and businesses running their own servers.

LEAVE A COMMENT