On a fresh AlmaLinux 9 or 10 server, set a hostname, disable SELinux and firewalld, then run cPanel's installer as root and finish the setup in WHM.
Which systems cPanel supports
| Operating system | Status for new installs |
|---|---|
| AlmaLinux 9 and 10 | Supported, recommended by cPanel (AlmaLinux 10 needs cPanel & WHM 132 or later) |
| AlmaLinux 8 | Supported |
| CloudLinux 8, 9 and 10 | Supported (CloudLinux 10 needs cPanel & WHM 134 or later) |
| Ubuntu 24.04 LTS | Supported (the same installer command works) |
| Rocky Linux | No longer supported: cPanel recommends AlmaLinux instead |
| Ubuntu 22.04, CentOS 7, CloudLinux 7 | No longer supported for new installs |
The server needs at least 2 GB of RAM (4 GB recommended), 20 GB of disk space (40 GB recommended), a 64-bit Intel or AMD processor (ARM isn't supported) and a static public IPv4 address. If the server's IP has an active CloudLinux licence, the installer converts the server to CloudLinux automatically.
A new installation runs on a free 15-day trial. After that the server needs a paid cPanel licence for its IP address. Each server needs its own licence.
On Ubuntu 24.04 the steps are the same with three differences: update with apt update && apt -y upgrade, skip step 3 (Ubuntu uses AppArmor, which works with cPanel), and in step 4 stop UFW instead of firewalld with systemctl stop ufw.service and systemctl disable ufw.service.
1. Connect as root and update the system
Log in as root (see Connect to your server with SSH) and bring the system up to date:
dnf -y update
If a new kernel was installed, reboot with reboot and log in again.
2. Set the hostname
The hostname must be a fully qualified domain name under a domain you own, such as server.example.com. It must not be the same as a website you'll host (so not example.com itself), must be 60 characters or shorter and needs an A record that points to the server's IP address.
hostnamectl set-hostname server.example.com
hostname
The second command should print the new name. Create the A record for server.example.com at your DNS provider now, so the server can get a free SSL certificate for its hostname later.
3. Disable SELinux
cPanel & WHM doesn't work with SELinux in enforcing mode, and AlmaLinux turns it on by default. Check its state:
sestatus
If it says enabled, set it to disabled and reboot:
sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
grep ^SELINUX= /etc/selinux/config
reboot
The grep line should show SELINUX=disabled. After the reboot, sestatus should report disabled.
4. Stop the firewall
cPanel recommends turning off the system firewall before the installation. You can add a firewall again afterwards (see Install or remove the CSF firewall on a cPanel server).
systemctl stop firewalld.service
systemctl disable firewalld.service
If these say the unit doesn't exist, firewalld isn't installed and there's nothing to do.
Do I need to disable NetworkManager?
No. Older guides for CentOS 7 tell you to stop NetworkManager because the old installer refused to run with it. On AlmaLinux 9 and later the installer works with NetworkManager, so leave it on. On AlmaLinux 8 the installer switches it off by itself.
5. Run the installer
The installation takes a while and must not be interrupted. Start a tmux session first, so it keeps running if your SSH connection drops:
dnf -y install tmux
tmux new -s cpanel
On Ubuntu, tmux is usually installed already. Then start the official installer. This changes to /home, downloads the latest installer from cPanel and runs it:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
If your connection drops, log in again and reattach with tmux attach -t cpanel. The installer is done when it prints a message that the installation is complete, together with a link to WHM.
6. Finish the setup in WHM
Open
https://your-server-ip:2087in your browser (for examplehttps://203.0.113.10:2087). The browser warns about the certificate the first time, because the server still uses a self-signed one. Continue to the page.Log in with the user name
rootand the root password.Accept the licence agreement and go through the setup steps: contact email address, nameservers and the other basic settings.
Check the installed version from SSH:
/usr/local/cpanel/cpanel -V
WHM also shows the version at the top of every page.
Common problems
The installer stops straight away
Read the last lines of its output. Common reasons: the server has too little memory, it isn't a fresh installation, the operating system isn't supported (see the table above) or SELinux is still enabled.
WHM doesn't open on port 2087
A firewall in front of the server may block it. The ports cPanel needs include 2083 (cPanel), 2087 (WHM), 2096 (Webmail), 80, 443 and the mail ports. Also check that you used https://.
Your server runs CloudLinux and you want to go back to AlmaLinux
Old guides describe a manual removal of CloudLinux on CentOS 7. Those steps don't apply to current systems. Use the conversion steps in CloudLinux's own documentation for your version, or reinstall the server with AlmaLinux and move your accounts across with WHM's Transfer Tool. If you're not sure, open a ticket and ask us first.
Your server runs Rocky Linux
cPanel no longer supports Rocky Linux and blocks updates to newer cPanel versions on it. cPanel recommends moving to AlmaLinux 9 or 10. On a server with websites, plan this carefully and take a full backup first.
If you'd rather not manage the server yourself, ElySpace also offers fully managed cPanel servers.
Related articles
- Update cPanel & WHM from the command line
- Free SSL for the server hostname and sites in WHM (AutoSSL)
- Install or remove the CSF firewall on a cPanel server
- Change the hostname of a Linux server
Still stuck? Open a support ticket and we'll help.