cPanel & WHM is the most widely used control panel in the web hosting industry. If you have a dedicated server or VPS with Webzi (or any other provider), this guide shows you how to install cPanel from scratch on the currently supported operating systems.
⚠️ Important: cPanel must be installed on a clean (minimal) operating system, without Apache, Nginx, MySQL, or any other pre-installed control panel. cPanel installs and manages its own services during the process.
As of today, cPanel & WHM is compatible with the following Linux distributions for new installations:
| Operating System | cPanel Version | Supported until | Recommendation |
|---|---|---|---|
| AlmaLinux 8 | v110+ | March 2029 | ✅ Stable and proven |
| AlmaLinux 9 | v114+ | May 2032 | ⭐ Recommended |
| Rocky Linux 8 | v110+ | May 2029 | ✅ Stable |
| Rocky Linux 9 | v114+ | May 2032 | ✅ Stable |
| CloudLinux 8/9 | v110+/v114+ | Same as Alma/Rocky | ⭐ Ideal for shared hosting |
| Ubuntu 22.04 LTS | v114+ | Verify with cPanel | ⚠️ Verify compatibility |
⚠️ CentOS 7 is no longer supported for new cPanel installations. If your server still uses CentOS 7, you will need to migrate to AlmaLinux or Rocky Linux. cPanel offers the ELevate tool to facilitate this process.
server.yourdomain.com), which resolves to the server's IP and does not match any domain you plan to host.Connect to your server using Terminal (Linux/macOS) or PuTTY (Windows):
ssh root@your-server-ip
Set a valid FQDN hostname. This name should be a subdomain that resolves to your server's IP (for example: server.yourdomain.com):
hostnamectl set-hostname server.yourdomain.com
Before installing cPanel, make sure all packages are up to date:
dnf update -y
apt update && apt upgrade -y
cPanel is not compatible with SELinux. You must disable it before installation. This step does not apply to Ubuntu.
Disable it temporarily:
setenforce 0
Disable it permanently:
sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
Network Manager handling varies depending on the operating system version:
On version 8, the cPanel installer automatically disables Network Manager and enables network.service. However, to avoid issues during installation, it is recommended to do it manually:
systemctl stop NetworkManager.service && systemctl disable NetworkManager.service
On version 9, Network Manager remains enabled and is the default network manager. Do not disable it, as cPanel requires it on these versions.
Ubuntu uses netplan as its network manager. No changes are needed.
During installation, cPanel needs unrestricted network access. Temporarily disable the firewall:
systemctl stop firewalld && systemctl disable firewalld
ufw disable
ℹ️ Note: After installation, it is recommended to install a firewall such as CSF (ConfigServer Security & Firewall) instead of reactivating the native system firewall, as CSF is designed to work alongside cPanel.
By default, cPanel installs MySQL 8.0. If you want the installation to use MySQL 8.4 from the start, you must create a configuration profile before running the installer:
mkdir /root/cpanel_profile
echo "mysql-version=8.4" > /root/cpanel_profile/cpanel.config
You can also specify other versions according to your needs:
| Engine | Value in cpanel.config |
|---|---|
| MySQL 8.0 | mysql-version=8.0 |
| MySQL 8.4 (recommended) | mysql-version=8.4 |
| MariaDB 10.6 | mysql-version=10.6 |
| MariaDB 10.11 | mysql-version=10.11 |
⚠️ Important: This step must be performed before running the cPanel installer. If you already installed cPanel with a different MySQL version, the change will need to be made afterwards from WHM. More information in the official cPanel documentation.
Install the basic required tools and use screen or tmux so the installation continues even if the SSH connection is lost:
dnf install -y perl curl wget screen
screen
apt install -y perl curl wget screen
screen
ℹ️ Tip: If you lose your SSH connection during installation, reconnect and run screen -r to return to the session where the installer is running.
This command is the same for all supported distributions:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
The installation may take between 20 and 60 minutes depending on server resources and connection speed. Progress is logged to /var/log/cpanel-install.log.
ℹ️ Note about CloudLinux: If your IP has an active CloudLinux license, the cPanel installer will automatically convert the operating system to CloudLinux. If you want to prevent this conversion and keep AlmaLinux or Rocky Linux, use the --skip-cloudlinux flag when running the installer.
If after installation you experience a license error, update it with the following command:
/usr/local/cpanel/cpkeyclt
Once the installation is complete, access WHM from your browser:
Log in with the server's root credentials. WHM will guide you through the initial setup wizard where you can:
If you use an external firewall or security rules at your cloud provider, make sure the following ports are open:
| Service | Port(s) |
|---|---|
| WHM (SSL) | 2087 |
| cPanel (SSL) | 2083 |
| HTTP / HTTPS | 80, 443 |
| SSH | 22 |
| FTP / Passive FTP | 21, 49152-65534 |
| Mail (SMTP, POP3, IMAP + SSL) | 25, 465, 587, 110, 995, 143, 993 |
| DNS | 53 (TCP/UDP) |
| Webmail (SSL) | 2096 |
For a complete installation on AlmaLinux 9 with MySQL 8.4, run the following commands in order:
# Set hostname
hostnamectl set-hostname server.yourdomain.com
# Update system
dnf update -y
# Disable SELinux
setenforce 0
sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
# Pre-configure MySQL 8.4
mkdir /root/cpanel_profile
echo "mysql-version=8.4" > /root/cpanel_profile/cpanel.config
# Install tools and start screen
dnf install -y perl curl wget screen
screen
# Install cPanel
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
If you have a VPS or dedicated server with Webzi and need assistance with cPanel installation or configuration, our support team can help: