cPanel & WHM is the most widely deployed control panel for Linux hosting. This guide walks through every step needed to take a freshly provisioned VPS from empty to a logged-in WHM, ready to issue cPanel accounts to your customers.
The whole process takes about 30 minutes of clock time, most of which is the installer running unattended.
Before you start
You will need:
- A VPS or dedicated server with at least 2 vCPU and 4 GB RAM (cPanel's published minimum is 1 GB, but anything below 4 GB will swap heavily under real load).
- One of the supported operating systems, freshly installed with no other software:
- AlmaLinux 8 or 9
- Rocky Linux 8 or 9
- CloudLinux 7, 8, or 9
- Ubuntu 20.04 or 22.04 LTS
- Root SSH access to the server (
rootuser with a working SSH key or password). - A valid cPanel license bound to the server's primary public IP. If you don't have one, you can activate a license here and the key will be issued in under 60 seconds.
- A fully-qualified hostname like
server1.example.comresolving to the server's public IP. cPanel refuses to install on a hostname that doesn't resolve.
Step 1 — Set the hostname
cPanel uses the hostname for license validation, certificate provisioning, and outbound mail. SSH into the server as root and set it:
hostnamectl set-hostname server1.example.com
echo "203.0.113.10 server1.example.com server1" >> /etc/hosts
Verify it resolves both ways:
hostname -f # should print server1.example.com
ping -c1 server1 # should resolve to your public IP
Step 2 — Update the system and reboot
A current kernel and current glibc will save you debugging time later.
# AlmaLinux / Rocky / CloudLinux
dnf update -y && reboot
# Ubuntu
apt update && apt full-upgrade -y && reboot
Wait for the server to come back up, then reconnect over SSH.
Step 3 — Run the cPanel installer
cPanel ships a single install script that handles everything: dependencies, services, MySQL, Exim, Dovecot, the WHM web interface, and the licensing client.
cd /home
curl -o latest -L https://securedownloads.cpanel.net/latest
sh latest
The installer will run for 15–25 minutes. It prints progress to the terminal and writes
a detailed log to /var/log/cpanel-install.log. You can safely follow that log in another
SSH session:
tail -f /var/log/cpanel-install.log
When it finishes you will see:
Thank you for installing cPanel & WHM 11.122!
You can now navigate to https://server1.example.com:2087 and log in as root.
Step 4 — Activate the license
Once the installer reports success, run the license update tool to bind the license to the server's IP:
/usr/local/cpanel/cpkeyclt
You should see Update succeeded. If you see License File Invalid, the license is not yet
issued to this IP — check your Panellicense dashboard and confirm the IP matches.
Step 5 — First WHM login
In your browser, go to:
https://server1.example.com:2087
Log in as root with the server's root password. The first time you log in, WHM will walk
you through:
- Setup wizard — accept the agreement and set your contact email
- Nameservers — point your domain's nameservers at this server (e.g.
ns1.example.com,ns2.example.com) - Service offering — pick a default mail and DNS configuration (BIND is fine to start)
- Resolvers — accept the defaults (Google + Cloudflare)
After the wizard, you land on the WHM home screen.
Step 6 — Post-install hardening
cPanel ships a sane default, but there are five things every operator should do before issuing customer accounts:
1. Tweak Settings
WHM Home → Server Configuration → Tweak Settings. The defaults that catch people out:
- Brute force protection (cPHulk): enable it under Security Center → cPHulk Brute Force Protection. Set the login interval to 5 minutes and lock duration to 30.
- SSH port: keep the default 22 for now — changing it requires updating the firewall and cPHulk simultaneously.
2. Install ConfigServer Firewall (CSF)
CSF replaces the default firewall with something easier to manage and adds a log-analysing intrusion-detection layer:
cd /usr/src
wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh
Then edit /etc/csf/csf.conf and set TESTING = "0" once you've confirmed you can still
SSH in.
3. Configure cPanel & WHM updates
WHM Home → Server Configuration → Update Preferences. Set:
- cPanel & WHM Updates → Release tier (stable)
- Operating System Package Updates → Automatic
- Apache SpamAssassin Rules Updates → Automatic
4. Set the cPanel Nameserver IPs
If you plan to run authoritative DNS for your customers, set the nameserver IPs in WHM Home → Server Configuration → Basic WebHost Manager Setup.
5. Create your first reseller (don't use root)
WHM Home → Account Functions → Create a New Account then promote it to reseller via
Resellers → Reseller Center. Use this reseller account for day-to-day operations and
keep root for true administrator work only.
FAQ
How long does cPanel installation take?+
Is AlmaLinux 9 officially supported by cPanel?+
Do I need a license before installing?+
Can I run cPanel inside a container?+
What if the installer fails?+
Next steps
- Read Tuning CloudLinux LVE limits without angry customers if you're running cPanel on CloudLinux
- Set up LiteSpeed as a drop-in Apache replacement for a real performance lift
- If you're migrating from Plesk, the Plesk → cPanel migration playbook walks through the WHM transfer tool