How to Install cPanel on AlmaLinux (8, 9, 10): Step-by-Step Guide

Sunucun 4 min read

Short answer: cPanel & WHM is installed on a freshly installed AlmaLinux server, as root, with a single official command: cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest. Before running it, set the hostname to a fully qualified domain name (FQDN), disable SELinux and stop the firewall. When the installation finishes, you log in to WHM at https://server-ip:2087.

Illustration: cPanel

Supported AlmaLinux Versions and Requirements

According to cPanel’s official AlmaLinux requirements page:

AlmaLinuxSupported cPanel & WHM
10132 or later
9114 or later
8110 or later
ResourceMinimumRecommended
Processor1.1 GHz, 64-bit (ARM is not supported)—
RAM2 GB4 GB (at least 3 GB if you’ll use ClamAV)
Disk20 GB40 GB
IP addressAt least one static IPv4 (no DHCP-assigned IP)—

If you’re building a new server, choose AlmaLinux 9 or 10; 8 is still supported but is the older release. CentOS is no longer among the operating systems cPanel supports (the supported ones are AlmaLinux, CloudLinux, Rocky Linux and Ubuntu). For background on CentOS, see our what is CentOS article.

What to Know Before You Install

  • Clean operating system: install cPanel only on a freshly installed operating system. Don’t install it on a server that already has Apache, MySQL or another panel.
  • No uninstaller: cPanel has no uninstaller; to remove it you have to reinstall the server.
  • Hostname: it must be a fully qualified name under a registered domain (e.g. server.yourdomain.com), must not match any of the sites on the server, must be at most 60 characters and must resolve to the server’s IP address.
  • SELinux must be disabled: cPanel doesn’t support SELinux enforcing mode, and permissive mode isn’t recommended.
  • Licence: cPanel is paid; a 15-day free trial is offered for new installations. After that you need a licence.

Installing cPanel on AlmaLinux Step by Step

1. Connect as root and update the system:

ssh root@server-ip
dnf -y update

2. Set the hostname and create an A record for it in your domain’s DNS pointing to the server IP:

hostnamectl set-hostname server.yourdomain.com
hostname -f

3. Disable SELinux. Check the status with getenforce; if it isn’t “Disabled”, change the configuration and reboot:

getenforce
sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
reboot

4. Stop the firewall during installation. cPanel recommends disabling the operating system’s firewall before installing:

systemctl stop firewalld
systemctl disable firewalld

5. Start the installation in a tmux session. Installation can take a while; use tmux so it isn’t interrupted if your SSH connection drops. Then run cPanel’s official install command:

dnf -y install tmux
tmux new -s cpanel
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

If the connection drops, reconnect and return to the installation with tmux attach -t cpanel. The script installs the required packages (including Perl) itself, and on AlmaLinux 8 it also disables NetworkManager. When it finishes, the WHM login address is shown on screen.

First Login to WHM and Basic Settings

  1. Open https://server-ip:2087 in your browser. A self-signed certificate warning on first login is normal.
  2. Log in with root and your root password.
  3. In the initial setup wizard, accept the licence agreement and enter your contact email address and nameservers (ns1/ns2).
  4. Create your first hosting account in WHM with Create a New Account; that account’s user logs in to cPanel at https://domain:2083.

In short: WHM is the server administrator’s panel (creating accounts, packages, server settings), while cPanel is each hosting account’s own panel (files, email, databases, domains).

Security After Installation

  • Re-enable the firewall: configure the firewall you turned off for the installation to allow the ports cPanel uses (2083, 2087, 2096, web and mail ports) and turn it back on.
  • Enable cPHulk: cPHulk Brute Force Protection in WHM blocks repeated failed logins.
  • Harden SSH: switch to key-based login and disable root login with a password. More: preventing SSH brute-force attacks with Fail2ban.
  • Set up updates and backups: configure automatic updates and off-server backups in WHM.

Common Installation Problems

SymptomLikely causeFix
Installation stops with a hostname errorThe hostname isn’t an FQDN or matches a site’s domainUse a separate name such as server.yourdomain.com
SELinux warningSELinux is enforcing or permissiveSet it to disabled in /etc/selinux/config and reboot
WHM port 2087 won’t openFirewall or the provider’s network filterAllow 2087; check the security group in your provider’s panel
Installation was interruptedThe SSH connection droppedRun the installation inside tmux; if needed, start again on a clean system

Frequently Asked Questions

Is cPanel free?

No. cPanel offers a 15-day free trial; after that you need a monthly licence priced by the number of accounts. If you’re looking for a free panel, consider the alternatives.

Can cPanel be installed on Windows?

No. cPanel runs only on supported Linux distributions (AlmaLinux, CloudLinux, Rocky Linux, Ubuntu). Windows servers use panels such as Plesk.

Can I use a ready-made cPanel instead of installing it myself?

Yes. If you only host websites, a hosting plan that comes with cPanel is the easiest route. If you want full control, get a VDS server and install it yourself with this guide.

If you’re looking for hosting with cPanel ready to use, see Sunucun’s cPanel hosting plans; for a cPanel licence for your own server, see our license services page.

Categories

Latest guides