How to install cPanel/WHM on a VPS
cPanel is the most recognized hosting control panel. This guide walks through the requirements and the official installer to get WHM running on a fresh VPS.
cPanel/WHM is the most widely used hosting control panel in the world. WHM handles server administration; cPanel is the per-site interface your users log into. Installing it is mostly a matter of starting from the right OS and running the official script — here's the full path.
Before you start: requirements
cPanel is strict about its environment. You need:
- A fresh VPS with a supported OS: AlmaLinux 8/9, Rocky 8/9, or CloudLinux. cPanel does not run on Ubuntu or Debian.
- At least 2 GB of RAM (4 GB+ recommended for real workloads).
- 20 GB+ of disk — NVMe strongly preferred for the database-heavy workload.
- A valid cPanel license (trial or purchased).
- A fully qualified hostname.
Critically, install cPanel on a clean image only. It expects to configure Apache, MySQL, mail and DNS itself; installing over an existing web stack will fail.
Step 1: Deploy a fresh AlmaLinux or Rocky VPS
On Nxeon, pick the AlmaLinux 9 or Rocky 9 one-click image and deploy. You get full root, which cPanel requires. Log in as root:
ssh root@YOUR_SERVER_IP
Step 2: Update the system
dnf upgrade -y
Step 3: Set a fully qualified hostname
cPanel refuses a bare hostname — it must look like a real subdomain:
hostnamectl set-hostname server.yourdomain.com
Step 4: Disable conflicting services
The installer prefers a bare system. If NetworkManager or firewalld interfere, cPanel's script generally handles them, but ensure nothing else is bound to web ports. A truly fresh image needs no action here.
Step 5: Run the official installer
cPanel provides a single installation script. As root:
cd /home
curl -o latest -L https://securedownloads.cpanel.net/latest
sh latest
This is a long install — typically 30 to 60 minutes. It downloads and compiles the full stack (Apache/EasyApache, MySQL or MariaDB, Exim, BIND, PHP and more). Let it run to completion without interrupting.
Step 6: First login to WHM
When it finishes, open WHM in your browser:
https://YOUR_SERVER_IP:2087
Log in as root with your server password. On first login you'll:
- Enter and validate your license.
- Accept the license agreement.
- Set a contact email for alerts.
- Configure nameservers if you'll run DNS.
- Set up basic FTP and mail preferences.
Step 7: Create your first account
In WHM, go to Account Functions → Create a New Account. Enter the domain, a username and password, and choose a package (resource limits). This provisions a cPanel account your user reaches at:
https://YOUR_SERVER_IP:2083
From there they manage websites, email, databases and SSL through the familiar cPanel interface.
Step 8: Secure the panel
A few essentials right after install:
- Point your domain's DNS at the server and secure WHM/cPanel with a real Let's Encrypt certificate (WHM → SSL/TLS).
- Enable cPHulk brute-force protection.
- Keep automatic updates on under WHM → Update Preferences.
- Restrict access to ports 2087/2083 with your firewall if only you administer the box.
Troubleshooting
- "Hostname is invalid" — set a fully qualified domain as in Step 3.
- Install fails on a used server — you must start from a clean OS; reinstall the image and try again. On Nxeon, reinstalling a fresh AlmaLinux image takes about a minute from the dashboard.
- Out of memory during install — bump the plan; the compile step is memory-hungry.
That's it. With WHM up, you've turned a raw VPS into a full hosting platform you can manage entirely through the browser.