cPanel & WHM is a commercial hosting control panel. WHM gives the server administrator tools for accounts, DNS, mail, security, and services, while each hosting account gets the cPanel interface for its websites and email.
This guide explains how to install cPanel & WHM on AlmaLinux 9. The old version of this page used CentOS 7, which is end-of-life. For a new server in 2026, use an operating system listed in cPanel’s current system requirements. cPanel’s deprecation plan recommends moving away from Rocky Linux to AlmaLinux, so AlmaLinux is used here.
Important: cPanel Changes the Whole Server
Install cPanel only on a fresh server dedicated to cPanel. The official installer adds and configures the web, database, mail, DNS, and other hosting services it needs. cPanel does not provide an uninstaller. To remove it properly, you must reformat or rebuild the server.
- Take a provider snapshot or backup before installation.
- Do not run the installer on a server that already hosts websites.
- Do not preinstall Apache, PHP, MySQL, mail, or DNS services.
- Use a public static IPv4 address with working DNS.
- Obtain a separate cPanel license for the server IP, or qualify for the current trial.
cPanel Requirements for AlmaLinux 9
At the time this article was reviewed, cPanel lists these minimums for AlmaLinux 9:
| Item | Minimum | Practical note |
|---|---|---|
| Architecture | 64-bit x86 | ARM is not supported |
| CPU | 1.1 GHz | Use more cores for many busy accounts |
| RAM | 2 GB | 4 GB is cPanel’s recommendation; ClamAV needs more |
| Disk | 20 GB | 40 GB is recommended, plus space for sites, mail, logs, and backups |
| Network | Static public IPv4 | An IPv6-only server is not supported |
| Access | root | sudo-only access is not enough for installation |
A production hosting server normally needs much more than the minimum. Estimate website files, databases, email, logs, temporary update space, local backup space, traffic, and inode use before ordering the machine.
Set a Valid cPanel Hostname
The hostname must be a fully qualified domain name, should resolve in DNS, and must not be a domain that you plan to host as a cPanel account. A name such as server.example.com is suitable when you control example.com.
hostnamectl set-hostname server.example.com hostname -f getent hosts server.example.com
Create the DNS A record before installation and replace the example hostname with your own. Our Linux hostname guide explains the checks in more detail.
Check the Fresh Server
cat /etc/almalinux-release uname -m free -h df -h / ip address
Confirm that the IP is static and that forward and reverse DNS are sensible for a mail-hosting server. Check your provider’s outbound SMTP policy too; many cloud providers restrict port 25.
Prepare AlmaLinux 9
Log in directly as root, update the fresh operating system, and reboot if the kernel changed:
dnf update -y reboot
Reconnect as root. cPanel’s current AlmaLinux 9 documentation says NetworkManager does not need to be disabled. Do not copy old CentOS instructions that turn it off.
The official installation guide currently recommends disabling the operating-system firewall before installation because the installer must configure services and ports. Save the existing rules first:
iptables-save > /root/firewall.rules systemctl stop firewalld.service systemctl disable firewalld.service
After cPanel works, install and configure a supported hosting firewall following cPanel’s current firewall documentation. Do not leave a production server without a firewall, and do not blindly open every cPanel port to every source.
Install cPanel & WHM on AlmaLinux 9
Run the official installer from a persistent SSH session such as screen so a network interruption does not close your terminal. If screen is available:
dnf install -y perl curl screen screen -S cpanel-install
Then use cPanel’s official installation command:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
Let the installer finish. Do not start a second installer or add server software while it runs. If the server IP has a CloudLinux license but you intend to keep AlmaLinux, cPanel documents the --skip-cloudlinux option; review the current vendor instructions before using any installer option.
Open WHM Securely
After installation, open the encrypted WHM port:
https://server.example.com:2087
You can temporarily use https://SERVER_IP:2087, but the hostname is the proper target after DNS and the service certificate work. Log in as root. Never send the root password through plain HTTP or use the unencrypted WHM port 2086 over the internet.
Complete the Initial WHM Setup
- Accept the license agreement only after reviewing it.
- Sign in to the cPanel Store account and activate the server license or eligible trial.
- Add a monitored administrator email address.
- Confirm the shared IPv4 address, resolvers, and network details.
- Configure two valid nameservers, or plan the external DNS service you will use.
- Set the server contact and notification preferences.
- Run the security advisor and address applicable warnings.
Secure the New cPanel Server
- Enable two-factor authentication for WHM administrators.
- Use SSH keys, restrict root SSH access as appropriate, and keep an emergency access path.
- Configure a firewall using cPanel’s current port list and your actual services.
- Enable automatic updates on a suitable cPanel release tier.
- Configure AutoSSL and verify certificates for the hostname and hosted domains.
- Set up off-server backups and perform a test restore.
- Configure rDNS, SPF, DKIM, and DMARC before sending mail.
- Disable services you do not offer and monitor login, mail, disk, and update alerts.
Use our Linux server hardening checklist as a general review, but prefer cPanel’s own tools and documentation when cPanel manages a setting.
Create the First cPanel Account
In WHM, open Account Functions → Create a New Account. Enter the domain, username, strong password, and an email address. Choose a package with sensible limits. Select the mail routing based on where the domain actually receives mail; external email services normally require remote mail routing and correct MX records.
Do not make every customer a reseller. Grant reseller privileges only when the account truly needs to create or manage other hosting accounts.
Backups Are Part of Installation
A cPanel backup stored only on the same server can disappear with the server. Configure WHM backups to a separate destination, encrypt access credentials, define retention, watch job notifications, and restore a sample account. Provider snapshots are helpful, but they should not be the only recovery method.
Troubleshooting
The Installer Refuses the Operating System
Do not force an unsupported platform. Confirm the exact AlmaLinux release, architecture, cPanel requirements, and whether the server image was modified by the provider.
WHM Port 2087 Does Not Open
Check the installation log, service status, provider firewall, local firewall, and DNS. Restrict administration access where practical, but ensure your current IP is allowed.
License Error Appears
Confirm the public static IPv4 address, outbound connectivity, license assignment, and verified cPanel Store account. NAT installations must meet cPanel’s documented 1:1 NAT and loopback requirements.
Frequently Asked Questions
Can I install cPanel on an existing web server?
No. cPanel says to use a freshly installed operating system. It installs and controls its required hosting services.
Is cPanel free?
No. Each cPanel & WHM server requires a license. An eligible new installation may have a limited trial under the current vendor terms.
Can cPanel be uninstalled?
cPanel does not provide an uninstaller. Rebuild the server from a clean operating-system image if you need to remove it.
Conclusion
You have prepared a fresh AlmaLinux 9 server, installed cPanel & WHM using the official installer, and reviewed the first security and backup tasks. Before hosting customers, finish DNS, mail reputation, firewall, monitoring, update, and restore testing.
Reviewed and updated: August 2026. Requirements and commands were checked against cPanel’s official AlmaLinux system requirements, installation guide, and deprecation plan. Check those pages again before installation because supported versions change.











Comments