cPanel & WHM installs from a single script, but it is fussy about what it starts on. A clean AlmaLinux server, a proper hostname and a static IP make the difference between a quiet 30–60 minute install and a broken one. This guide walks through the preparation, the install itself and your first WHM login.
Note: A new install starts a free trial, and you buy a licence from cPanel or one of its partners when you are ready. See how to activate a cPanel licence.
Before you start
- A Linux VPS with a freshly installed AlmaLinux 9 or 10. cPanel states that AlmaLinux 10 needs cPanel & WHM version 132 or later, and AlmaLinux 9 needs 114 or later. The installer always fetches a current release, so a new install meets this.
- At least the minimum hardware cPanel lists for AlmaLinux (2 GB RAM and 20 GB disk at the time of writing, with 4 GB RAM and 40 GB disk recommended). Check the current requirements in the cPanel documentation before you order.
- Root access over SSH. Your IP address and root password are in your VPS provider's control panel.
- A domain you control, so you can create a hostname such as
server.example.comand point it at the VPS.
Warning: cPanel has no uninstaller. The only way to remove it is to reinstall the operating system. Do not install it on a server that already hosts sites or databases you care about.
If the VPS has been used for anything else, reinstall AlmaLinux from your VPS provider's control panel first. Your VPS provider's control panel shows the reinstall option for each service.
Prepare the server
Log in as root:
ssh root@203.0.113.10Update the base system and reboot if a new kernel was installed:
dnf -y update
rebootSet a fully qualified hostname
cPanel needs a hostname that is a real, resolvable FQDN, no longer than 60 characters, and not the same as any website domain you will host. A subdomain like server.example.com is the usual choice.
hostnamectl set-hostname server.example.com
hostname -fAt your DNS provider, create an A record for server.example.com pointing to the VPS IP. Check it resolves:
dig +short server.example.comThe output should be your server IP, for example 203.0.113.10.
Disable the OS firewall and check SELinux
cPanel recommends turning off the default firewall before installing and adding a cPanel-aware firewall afterwards. It also requires SELinux to be disabled.
systemctl disable --now firewalld
getenforceIf getenforce prints Enforcing or Permissive, edit /etc/selinux/config, set SELINUX=disabled, save and reboot.
Warning: With firewalld off, the server is open until you set up a new firewall. Plan to install CSF straight after cPanel finishes.
Run the cPanel installer
The install takes a while, so run it inside screen or tmux. That way a dropped SSH connection does not kill it.
dnf -y install screen
screen -S cpanelThen run the official installer:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latestThe script downloads the current release, checks the system and installs Apache, MariaDB or MySQL, Exim, Dovecot, PowerDNS and the cPanel services. Do not install other software while it runs.
If your SSH session drops, log back in and reattach:
screen -r cpanelWatch the installation log
The installer writes everything to a log file. From a second SSH session, follow it:
tail -f /var/log/cpanel-install.logWhen the install finishes, the console shows a message that cPanel & WHM is installed, along with the WHM address. Typical install times are 30 to 60 minutes, depending on disk and network speed.
Log in to WHM
Open WHM in your browser on port 2087:
https://203.0.113.10:2087Log in as root with the root password. The first visit shows a certificate warning, because WHM uses a self-signed certificate until AutoSSL secures the hostname. Accept it for now.
You then see the setup screens: accept the licence agreement, then enter a contact email and nameservers. The WHM initial setup wizard guide explains each choice.
Check it works
Confirm the main services are running:
/usr/local/cpanel/cpanel -V
systemctl status cpanel --no-pager
whmapi1 versioncpanel -V prints the installed version. In WHM, open Home » Server Status » Service Status and check that the core services show as up. A fresh install is on the 15-day trial licence, which you can confirm at verify.cpanel.net by entering the server IP.
Troubleshooting
- Installer stops with a hostname error: the hostname is not an FQDN or does not resolve. Fix the A record, run
hostnamectl set-hostnameagain and rerun the installer. - Installer complains about existing software: the OS is not clean, for example a web server or MySQL is already installed. Reinstall AlmaLinux from your VPS provider's control panel and start again.
- Install stopped when SSH disconnected: you did not use
screen. Check the end of/var/log/cpanel-install.log, then reinstall the OS and rerun insidescreen. - WHM on port 2087 times out: a firewall is blocking it, or the install has not finished. Check the log, then test with
curl -k https://127.0.0.1:2087on the server. - Licence error on first login: the IP has used a trial before. Check the IP at
verify.cpanel.netand buy a licence if the trial is not available.
Next steps
- Finish first-time setup: WHM initial setup wizard.
- Protect the server: install CSF firewall on cPanel.
- Remove the browser warning: secure the WHM hostname with free SSL.
