Control panels

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.

IntermediateLinux server5 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.

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.com and 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:

Bash
ssh root@203.0.113.10

Update the base system and reboot if a new kernel was installed:

Bash
dnf -y update
reboot

Set 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.

Bash
hostnamectl set-hostname server.example.com
hostname -f

At your DNS provider, create an A record for server.example.com pointing to the VPS IP. Check it resolves:

Bash
dig +short server.example.com

The 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.

Bash
systemctl disable --now firewalld
getenforce

If 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.

Bash
dnf -y install screen
screen -S cpanel

Then run the official installer:

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

The 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:

Bash
screen -r cpanel

Watch the installation log

The installer writes everything to a log file. From a second SSH session, follow it:

Bash
tail -f /var/log/cpanel-install.log

When 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:2087

Log 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:

Bash
/usr/local/cpanel/cpanel -V
systemctl status cpanel --no-pager
whmapi1 version

cpanel -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-hostname again 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 inside screen.
  • 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:2087 on the server.
  • Licence error on first login: the IP has used a trial before. Check the IP at verify.cpanel.net and buy a licence if the trial is not available.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.