cPanel & WHM (Web Host Manager) is the industry-standard hosting control panel used by web hosts and system administrators worldwide. WHM is the server-level admin interface â you use it to create hosting accounts, manage services, and configure the server. cPanel is what each website owner logs into to manage their domain, email, databases, and files.
This guide covers the real, verified steps using the official cPanel installer script. No guesswork, no outdated CentOS-era instructions. We cover both AlmaLinux (the recommended OS) and Ubuntu LTS (now officially supported).
Fresh server only. Never install cPanel on a server that already has Apache, Nginx, MySQL, or any other web stack running. cPanel deploys and manages its own versions of these services. Installing on an existing stack causes conflicts that are nearly impossible to untangle.
1 Choosing Your Operating System
AlmaLinux 9 is the top recommendation for new cPanel deployments. It is free, binary-compatible with RHEL 9, community-maintained, and supported until 2032. cPanel v114 and later support AlmaLinux 9 in full production status. AlmaLinux 8 is supported through 2029.
Ubuntu LTS is fully supported â not experimental. cPanel supports Ubuntu 22.04 LTS and Ubuntu 24.04 LTS. Ubuntu 24.04 LTS is recommended for new installs, as cPanel v136 has deprecated Ubuntu 22.04 upgrade paths. If you are already on Ubuntu as a platform and prefer Debian-based tooling, Ubuntu 24.04 is a valid production choice.
CentOS Stream is not supported. cPanel explicitly does not support CentOS Stream. Do not attempt to install cPanel on a CentOS Stream server.
2 System Requirements
Important: Once cPanel is installed, it cannot be uninstalled cleanly. If you ever need to remove it, you must reinstall the operating system from scratch. Test on a disposable VPS or snapshot first if you are evaluating it.
3 Pre-Installation Setup
Step 3.1 â SSH in as root
You must be logged in as the root user. cPanel requires root-level access throughout the installation and ongoing operation.
# Connect to your server as root
ssh root@YOUR_SERVER_IP
# Or if you logged in as a sudo user, switch to root
sudo -i
Step 3.2 â Update the system
Bring all packages up to date before installation. This prevents conflicts with outdated package versions and ensures you have the latest security patches applied to the base OS.
dnf update -y && dnf upgrade -y
reboot
apt update && apt upgrade -y
reboot
Step 3.3 â Install Perl and core dependencies
cPanel is written in Perl, so Perl must be present on the system before the installer runs. The installer script will fail immediately without it.
dnf install -y perl curl wget tar screen
apt install -y perl curl wget tar screen
Step 3.4 â Set a fully qualified hostname (FQDN)
cPanel requires a valid FQDN as the server hostname â something like server1.yourdomain.com. It must not match any of your hosted domain names, must be registered and resolvable, and must be 60 characters or fewer. This hostname should have a DNS A record pointing to your server's static IP address before you install.
# Set your FQDN â replace with your actual hostname
hostnamectl set-hostname server1.yourdomain.com
# Add it to /etc/hosts as well
echo "YOUR.SERVER.IP server1.yourdomain.com server1" >> /etc/hosts
# Confirm it's set correctly
hostname -f
Step 3.5 â Disable SELinux (AlmaLinux only)
cPanel does not support SELinux. It must be disabled before installation. On AlmaLinux, if SELinux is enforcing, the cPanel installer will fail or produce unexpected errors.
# Disable SELinux immediately (no reboot needed for this)
setenforce 0
# Make it permanent across reboots
sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
# Verify
getenforce
# Should output: Disabled
Step 3.6 â Disable the firewall temporarily
Disable any active OS firewall before running the installer. The cPanel installer sets up its own firewall rules (via CSF/LFD) during installation. An active firewall can interfere with the installer's network calls and service binding. You'll re-enable protection via cPanel's built-in tools afterward.
# Save current rules, then disable firewalld for the install
iptables-save > ~/firewall.rules
systemctl stop firewalld
systemctl disable firewalld
iptables-save > ~/firewall.rules
systemctl stop ufw
systemctl disable ufw
# Ubuntu also requires disabling NetworkManager before installing
systemctl stop NetworkManager
systemctl disable NetworkManager
4 Running the cPanel Installer
Use screen or tmux to run the installer inside a persistent terminal session. If your SSH connection drops mid-install, the installation will continue in the background and you can reattach to monitor it.
# Start a screen session so the install survives SSH disconnects
screen -S cpanel-install
# Move to /home, download the official installer, and run it
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
If you disconnect from SSH: Reattach to your screen session with screen -r cpanel-install. The install log is always available at /var/log/cpanel-install.log â you can tail it with tail -f /var/log/cpanel-install.log.
The installer will display progress messages in real time. A successful install ends with output similar to:
( INFO): Thank you for installing cPanel & WHM!
( INFO): Visit https://your-server-ip:2087 to configure your server.
Optional: Skip CloudLinux auto-conversion
If your server's IP address has an active CloudLinux license, cPanel will automatically convert your AlmaLinux install to CloudLinux. If you want to keep AlmaLinux, add the skip flag:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest --skip-cloudlinux
5 Initial WHM Configuration
Step 5.1 â Access WHM
Open your browser and navigate to WHM using any of these URLs (replace YOUR_SERVER_IP with your actual IP or FQDN):
https://YOUR_SERVER_IP:2087
https://YOUR_SERVER_IP/whm
https://server1.yourdomain.com:2087
https://server1.yourdomain.com/whm
You will see a browser SSL certificate warning on first access. This is expected â cPanel generates a self-signed certificate during install. Click "Advanced" â "Proceed" to continue. You will install a proper SSL certificate in the next step.
Log in with the username root and your server's root password.
Step 5.2 â Activate your license
On first login, you will see a trial license banner. Click "Purchase a License" or "Continue with Trial" for the 15-day free trial. cPanel licenses are tied to your server's IP address and are managed through the cPanel Store. If you already purchased a license, it activates automatically when the installer detects your IP.
Step 5.3 â Run the Setup Wizard
The Setup Wizard walks through the following configuration screens:
- âļ Networking: Confirm your server's hostname and primary IP. Set your DNS resolver â use a reliable resolver such as Cloudflare's 1.1.1.1 or Google's 8.8.8.8.
- âļ Nameservers: Configure your nameserver entries (see Section 5.4 below).
- âļ Services: Enable or disable FTP, mail, and other services based on your hosting needs.
- âļ Update Preferences: Set the cPanel update tier. The Stable tier is recommended for production â it receives tested updates rather than bleeding-edge releases.
Step 5.4 â Configure nameservers
If you plan to host DNS for your clients' domains, you need at least two nameservers. You can use your own nameservers (which requires creating DNS A records for them at your domain registrar) or use an external DNS provider. A typical self-hosted setup looks like this:
Nameserver 1: ns1.yourdomain.com â YOUR.SERVER.IP
Nameserver 2: ns2.yourdomain.com â YOUR.SERVER.IP
At your domain registrar, add A records pointing ns1.yourdomain.com and ns2.yourdomain.com to your server's IP. Some registrars require you to register "glue records" for nameservers within the same domain.
Step 5.5 â Install AutoSSL (Let's Encrypt)
After completing the wizard, immediately configure AutoSSL so WHM, cPanel, webmail, and all hosted domains get valid SSL certificates automatically.
Go to WHM â SSL/TLS â Manage AutoSSL and select Let's Encrypt as the provider. Click "Save" and then run AutoSSL for all users. This replaces the self-signed certificate on WHM/cPanel access URLs with a trusted certificate.
6 Security Hardening
Required open ports
cPanel uses a wide range of ports. Ensure these are accessible through your cloud provider's network firewall (not the OS firewall â cPanel's CSF manages the OS firewall):
| Port(s) | Service | Required? |
|---|---|---|
| 22 | SSH | Required |
| 21 | FTP | Required for FTP |
| 80 / 443 | HTTP / HTTPS | Required |
| 2082 / 2083 | cPanel (HTTP / HTTPS) | Required |
| 2086 / 2087 | WHM (HTTP / HTTPS) | Required |
| 2095 / 2096 | Webmail (HTTP / HTTPS) | Required for email |
| 25 / 465 / 587 | SMTP / Submission | Required for mail |
| 110 / 995 | POP3 / POP3S | For email clients |
| 143 / 993 | IMAP / IMAPS | For email clients |
| 53 TCP/UDP | DNS | Required for nameservers |
| 30000â35000 | Passive FTP | Required for FTP |
Enable cPHulk brute-force protection
cPHulk is WHM's built-in brute-force protection system. Navigate to WHM â Security Center â cPHulk Brute Force Protection and enable it. It monitors failed login attempts and automatically blocks attacking IPs.
Disable unused services
Every running service is an attack surface. If you don't need FTP or certain mail protocols, disable them in WHM â Service Manager. Disabling services you don't use reduces both attack surface and server resource usage.
Configure automatic updates
In WHM â Update Preferences, ensure automatic updates are enabled on the Stable tier. You can also run manual updates at any time with:
# Manually update cPanel to the latest version
/usr/local/cpanel/scripts/upcp
# Also keep the OS updated
dnf update -y # AlmaLinux
apt upgrade -y # Ubuntu
# Check current cPanel version
/usr/local/cpanel/cpanel -V
7 Create Your First cPanel Account
Step 7.1 â Create a hosting package (optional but recommended)
Packages define resource limits for accounts â disk space, bandwidth, email account limits, database limits, etc. Creating a package first makes it easier to apply consistent limits across multiple accounts. Go to WHM â Add a Package and define your resources.
Step 7.2 â Create the cPanel account
Navigate to WHM â Create a New Account and fill in:
- âļ Domain: The primary domain for this account (e.g.,
myclientsite.com) - âļ Username: A username (max 16 chars, alphanumeric, lowercase)
- âļ Password: A strong password for the cPanel login
- âļ Email: The account owner's contact email address
- âļ Package: Select the package you created, or set custom resource limits
Click "Create". WHM will provision the account, create the home directory, set up DNS zone files, and configure the web server virtual host â all automatically.
Step 7.3 â Access cPanel for the new account
You can access cPanel for any account you created in two ways:
# Via browser URL
https://YOUR_SERVER_IP/cpanel
https://YOUR_SERVER_IP:2083
# Or via WHM (no password needed) â List Accounts â cPanel icon
Step 7.4 â Set up a website
Once inside cPanel, a typical website deployment looks like this:
- â Upload files via File Manager or FTP to
/home/username/public_html/ - â Create a MySQL database via MySQL Databases (for WordPress, etc.)
- â Use Softaculous (in cPanel) to auto-install WordPress, Joomla, or 400+ other apps in one click
- â Create email accounts under Email Accounts
- â SSL will be applied automatically by AutoSSL â check SSL/TLS Status to verify
8 Ubuntu-Specific Notes
Ubuntu is no longer experimental. cPanel officially supports Ubuntu 22.04 LTS and 24.04 LTS. Ubuntu 24.04 LTS is the recommended version for new installs as of cPanel v136+, because cPanel has deprecated upgrade paths on Ubuntu 22.04.
Key differences from AlmaLinux on Ubuntu:
- âļ No SELinux to disable â Ubuntu uses AppArmor instead, and cPanel handles AppArmor compatibility automatically.
- âļ NetworkManager must be disabled before installation and re-enabled after (Ubuntu only).
- âļ UFW (uncomplicated firewall) should be disabled before the install â use the commands in Section 3.6 above.
- âļ Package manager differences â cPanel on Ubuntu uses
aptfor OS-level packages. The cPanel installer script detects the OS and uses the correct package manager automatically. - âļ Ubuntu 22.04 upgrade block â You cannot upgrade to cPanel v136 on Ubuntu 22.04. Plan a migration to Ubuntu 24.04 if you are on 22.04 and want future cPanel version support.
The cPanel installer command is identical on Ubuntu â the same curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest command shown in Section 4 works on Ubuntu as well. The script detects your OS and adapts automatically.
9 Common Issues & Fixes
/usr/local/cpanel/cpkeyclt. If you're starting a trial, click "Purchase a License" inside WHM and create a cPanel Store account. Your trial starts immediately.
securedownloads.cpanel.net is reachable from your server (curl -I https://securedownloads.cpanel.net). Also confirm your server has working DNS resolution (nslookup google.com). Some cloud providers block outbound connections by default â check your cloud firewall/security group rules. Review /var/log/cpanel-install.log for the specific error line.
whmapi1 servicestatus service=cpsrvd.
systemctl start NetworkManager && chkconfig NetworkManager on.
10 Quick Reference: Key Paths & Commands
# cPanel installation directory
/usr/local/cpanel/
# Per-account home directories
/home/USERNAME/
# Website files (public web root)
/home/USERNAME/public_html/
# Apache configuration (managed by cPanel)
/usr/local/apache2/conf/
# PHP configuration (EasyApache managed)
/usr/local/lib/php.ini
# Mail logs
/var/log/exim_mainlog
# cPanel install log
/var/log/cpanel-install.log
# cPanel error log
/usr/local/cpanel/logs/error_log
# Check cPanel version
/usr/local/cpanel/cpanel -V
# Update cPanel manually
/usr/local/cpanel/scripts/upcp
# Restart all cPanel services
/scripts/restartsrv_apache
/scripts/restartsrv_mysql
/scripts/restartsrv_exim
# Force license re-check
/usr/local/cpanel/cpkeyclt
# Rebuild Apache configuration
/scripts/rebuildhttpdconf && service httpd restart
đ¨ Frequently Asked Questions
Discover fitservers Dedicated Server Locations
fitservers servers are available around the world, providing diverse options for hosting websites. Each region offers unique advantages, making it easier to choose a location that best suits your specific hosting needs.