How to Install cPanel/WHM on Linux AlmaLinux, CloudLinux & Ubuntu (2026 Guide)

How to Install cPanel/WHM on Linux (2026 Guide: AlmaLinux, CloudLinux & Ubuntu)



How to Install cPanel/WHM on CentOS 8 Guide Step by Step



cPanel/WHM remains one of the most widely used web hosting control panels, letting administrators manage servers through WHM while individual users manage their sites, email, and databases through cPanel. If you're setting up a new hosting server, this guide walks through the full installation process on today's supported operating systems.

One important note before you start: CentOS is no longer a valid option. CentOS 7 reached end-of-life in mid-2024, and cPanel doesn't support CentOS Stream at all. If you're following an older guide that references CentOS 6 or 7, that installation path no longer works — you'll need one of the currently supported distributions below.

Supported Operating Systems (2026)

cPanel & WHM currently supports:

  • AlmaLinux 8 (with cPanel & WHM 110 and later)
  • AlmaLinux 9 (with cPanel & WHM 114 and later) — the generally recommended choice for new installs
  • CloudLinux 8/9 — popular for shared hosting environments that need per-account resource isolation
  • Ubuntu 22.04 LTS — supported, though the RHEL-based options above remain more common in hosting environments and have the longest track record with cPanel

AlmaLinux has effectively become the successor to CentOS in the cPanel ecosystem — it's free, community-driven, and binary-compatible with RHEL, so cPanel runs on it the same way it historically ran on CentOS.

Before You Start: Requirements and Prerequisites

  • A fresh, clean OS installation. cPanel manages its own web/mail/database stack, so the installer expects a server with no pre-existing web server, mail server, or other control panel already configured.
  • Root access via SSH.
  • A minimum of 20 GB of storage (40 GB recommended), plus at least 5 GB of free space for the installation and upgrade process itself.
  • A minimum of 1–2 GB RAM for basic use; 4 GB or more is strongly recommended, and needed if you plan to run an antivirus scanner like ClamAV.
  • A public, static IPv4 address. Avoid DHCP-assigned addresses, since they can cause licensing and configuration issues later.
  • SELinux disabled — cPanel doesn't support running with SELinux enabled.
  • A valid cPanel license, though a 15-day free trial is available for new installations, activated automatically the first time you access WHM.

Step 1: Update Your System

Before installing anything, make sure your OS is fully patched:

On AlmaLinux / CloudLinux (RHEL-based):

bash
dnf -y update

On Ubuntu:

bash
apt update && apt -y upgrade

Reboot afterward if a new kernel was installed, so the update takes effect before you continue.

Step 2: Install Required Packages

cPanel's installer is written in Perl and needs curl to fetch the installation script:

On AlmaLinux / CloudLinux:

bash
dnf install -y perl curl

On Ubuntu:

bash
apt install -y perl curl

Step 3: Set a Fully Qualified Domain Name (FQDN)

cPanel is strict about hostnames — it requires a proper Fully Qualified Domain Name (FQDN), not just a bare hostname. Skipping this step is one of the most common installation failures, producing an error like:

(ERROR): Your hostname () is not set properly. Please
(ERROR): change your hostname to a fully qualified domain name,
(ERROR): and re-run this installer.

Set your FQDN with:

bash
hostnamectl set-hostname server.yourdomain.com

If you don't have a real domain ready yet, you can use a temporary FQDN to get through the installation — you'll be able to change it properly from within WHM's initial setup wizard afterward. Just make sure the hostname's domain doesn't match a domain you'll later host in cPanel itself, since that can cause conflicts.

Step 4: Disable SELinux and Adjust the Firewall

Disable SELinux (RHEL-based systems only):

bash
setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config

On Ubuntu, cPanel doesn't use SELinux, but you should stop and disable ufw, since cPanel installs its own firewall management tool (CSF) that will take over firewall duties:

bash
systemctl stop ufw.service
systemctl disable ufw.service

Before installing, make sure the following ports are reachable: 22 (SSH), 2086/2087 (WHM), and 2082/2083 (cPanel). cPanel's installer will handle the transition from your OS's default firewall to CSF automatically in most cases.

Step 5: Run the cPanel Installer

Once your system is prepped, installation itself is just three commands:

bash
cd /home
curl -o latest -L https://securedownloads.cpanel.net/latest
sh latest

If you specifically need a DNS-only version of cPanel (useful for dedicated DNS clustering setups rather than full hosting), use this instead:

bash
cd /home
curl -o latest-dnsonly -L https://securedownloads.cpanel.net/latest-dnsonly
sh latest-dnsonly

The installation process typically takes 20 to 60 minutes, depending on your server's CPU, RAM, and network speed — it compiles and configures a significant number of packages, so don't interrupt it once it starts. You'll see continuous log output as it progresses.

Step 6: Log In and Complete Setup

Once the installer finishes, you'll see a confirmation message along with the WHM access URL, something like:

Thank you for installing cPanel & WHM!
Visit https://your-server-ip:2087 to configure your server.

Navigate to that address in your browser (https://your-server-ip:2087 or https://yourdomain.com:2087). You'll likely see a certificate warning at this point — that's expected, since cPanel generates a self-signed certificate during installation, and can be replaced with a proper certificate (AutoSSL) later.

Log in using your server's root credentials:

Username: your_server_user
Password: your_server_password

From there, the WHM Initial Setup Wizard will walk you through contact information, nameservers, and networking settings. Once complete, you can create individual cPanel user accounts, which are accessible at https://your-server-ip:2083 or yourdomain.com/cpanel.

Common Installation Issues

  • "Hostname is not set properly" error — covered in Step 3; make sure you've set a real FQDN before running the installer.
  • Installer lock file error — if a previous install attempt was interrupted, you may see a message about /root/installer.lock. Confirm no installation is actually running, then remove the file and retry.
  • Insufficient RAM error — cPanel requires a minimum amount of RAM to even begin installing; if you're on a very small VPS, you'll need to upgrade before proceeding.
  • Installing on Ubuntu but expecting RHEL-style commands — remember that package manager commands differ (apt vs. dnf), and some third-party tools reference AlmaLinux-specific paths that won't apply on Ubuntu.

A Note on Licensing

cPanel is commercial software — there's no permanent free tier. New installations get a 15-day free trial automatically, after which you'll need an active license (available directly through cPanel's store, or often bundled through your hosting provider or VPS host). If you're just testing or learning, the trial is fully functional, so there's no feature restriction during that window.

Final Thoughts

The overall installation process hasn't changed dramatically since cPanel's CentOS days — it's still a matter of prepping a clean OS, setting a proper hostname, disabling SELinux, and running the installer script. The main shift for 2026 is simply which operating system you install it on: AlmaLinux and CloudLinux have taken over CentOS's old role, with Ubuntu now available as a supported alternative for those who prefer it. Whichever you choose, budgeting for adequate RAM and storage up front will save you from hitting avoidable errors partway through setup.


Comments