How to install cPanel & WHM on AlmaLinux 9 or 10
Install cPanel & WHM on a fresh AlmaLinux 9 or 10 VPS. Set an FQDN hostname, run the official installer, follow the log and log in to WHM on port 2087.
- Intermediate
- Linux VPS
- 5 min read
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.
RunRacks does not sell cPanel licences. 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 RunRacks 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 the Dashboard.
- A domain you control, so you can create a hostname such as
server.example.comand point it at the VPS.
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 the Dashboard control panel first. The Dashboard shows the reinstall option for each service.
Prepare the server
Log in as root:
ssh [email protected]Update 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.
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 the Dashboard 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.
- Need a bigger server for more accounts? Compare Linux VPS plans.
Was this guide helpful?
Still stuck?
Ask RunRacks AI for a quick answer, or open a ticket and our team will take a look at your server.
Related guides
Control panels
How to install Plesk on a Linux VPS (AlmaLinux and Ubuntu)
Install Plesk on a fresh Linux VPS with the official one-click installer, apply your licence key and log in to the panel for the first time on port 8443.
- Beginner
- Linux VPS
- 8 min read
Control panels
CyberPanel: back up and restore a website
Create on-demand and scheduled website backups in CyberPanel, download the archives off the server, and restore a site from a backup when something breaks.
- Intermediate
- Linux VPS
- 6 min read
Control panels
Plesk Backup Manager: schedule backups and restore a site
Set up scheduled backups in Plesk Backup Manager, keep a copy off the server, and restore a single domain or subscription when something goes wrong.
- Intermediate
- Linux VPS
- 7 min read