How to Install cPanel: Step-by-Step Server Guide

BalHost
10 min
68 views
How to Install cPanel: Step-by-Step Server Guide

cPanel is a commercial web hosting control panel that lets administrators manage websites, email accounts, DNS zones, databases and SSL certificates through a browser interface. Learning how to install cPanel starts with a clean, supported Linux server and root SSH access. It is distributed by cPanel, L.L.C. and runs on AlmaLinux, Rocky Linux, CloudLinux and similar enterprise Linux distributions. This article covers what cPanel is used for, the prerequisites for a clean installation, the numbered steps to install it, how to verify the result and how to fix the most common failures.

What is cPanel used for?

cPanel is used to administer a web hosting server without editing configuration files by hand. Through its web interface, an administrator creates hosting accounts, assigns disk quotas, manages domains and subdomains, issues email mailboxes, configures DNS records and installs applications such as WordPress. The end-user side of the same product is called cPanel, while the server-owner side is WHM (Web Host Manager).

A typical cPanel hosting setup serves shared hosting providers, agencies and businesses that host several sites on one machine. The panel writes the underlying Apache or LiteSpeed configuration, manages MySQL or MariaDB databases and handles mail through Exim and Dovecot. Because it automates these tasks, it reduces the manual work of running many domains on a single server.

Before you start: prerequisites for installing cPanel

Start with a freshly installed, supported operating system and no other control panel present. cPanel does not support installation on a server that already runs Plesk, DirectAdmin or a manually configured web stack, because those services occupy the same ports and configuration paths. A clean install avoids conflicts that are difficult to unwind later.

You also need a valid hostname, a licensed IP address and root SSH access. The hostname must be a fully qualified domain name such as server1.example.com, and its A record should point to the server's IP address before you begin. The checklist below summarizes what to confirm before running the installer.

  • A supported 64-bit Linux distribution, freshly installed and updated
  • Root SSH access and a valid cPanel license tied to the server IP
  • A fully qualified hostname with a matching DNS A record
  • At least 2 GB of RAM and enough free disk space for the panel and services
  • Ports 2087, 2083, 2086 and 2096 open in the firewall for panel access
  • No other control panel or manually installed web server on the machine

If you prefer to skip server administration entirely, a virtual server with root access gives you the clean environment cPanel expects, and you can install the panel yourself in about the time it takes to provision the machine.

How do I install cPanel step by step?

Step 1: Set the hostname and update the system

Set the hostname first, because cPanel configures its services around it and changing it later requires extra work. Log in as root over SSH and run the hostname command, then update the package manager so the installer works with current packages.

hostnamectl set-hostname server1.example.com
dnf update -y

Confirm the hostname resolves to the server's public IP address before continuing. If it does not resolve, cPanel's setup wizard may fail to validate the license and the panel will show a hostname warning after installation.

Step 2: Disable conflicting services

Stop and disable any web server, mail server or firewall manager that could conflict with cPanel's own stack. Common conflicts include a pre-installed Apache or Nginx package, Postfix, and firewalld if you plan to use cPanel's own firewall management. This step exists because cPanel expects to control these services itself.

systemctl stop httpd nginx postfix 2>/dev/null
systemctl disable httpd nginx postfix 2>/dev/null

If your distribution ships a minimal image, these services may not be present and the commands will simply report that the unit was not found. That is expected and safe to ignore.

Step 3: Download and run the installer

cPanel provides an official installation script that detects the operating system, installs dependencies and configures the panel. Run it as root in a terminal session that can stay open for the duration, because the process takes a while and interrupting it can leave the server in a partial state.

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

The script installs the core packages, sets up the cPanel and WHM services, and prepares the first-login configuration. Do not reboot or close the session while it runs; the installer prints progress to the terminal and reports errors at the end if any package failed.

Step 4: Complete the setup wizard

When the installer finishes, open WHM in a browser using the server's hostname or IP address on port 2087, for example https://server1.example.com:2087. Log in with the root credentials and complete the setup wizard, which asks for contact email addresses, nameservers and a few default settings. Choose the nameservers your DNS provider expects, because they are written into every new hosting account you create.

After the wizard, create your first hosting account from WHM. This produces the cPanel access credentials for that account, and the user can then reach the panel on port 2083 and webmail on port 2096. If you plan to host mail, confirm that the server's reverse DNS record matches the hostname, since many receiving mail servers reject messages from servers without matching reverse DNS.

How do I verify that cPanel is installed correctly?

Verification has three parts: the services must be running, the panel must be reachable over HTTPS and the license must be valid. Start by checking the service status from the command line, which tells you whether the core daemons started after installation.

systemctl status cpanel
/usr/local/cpanel/cpanel -V

The version command prints the installed cPanel version. Then open WHM on port 2087 and confirm the license status in the server information area; an expired or unlicensed server shows a warning banner and blocks some features. Finally, log in to a hosting account's cPanel on port 2083 to confirm that the user-level interface loads and that email, database and file tools are present.

Common problems when installing cPanel

One frequent problem is a failed license check caused by a hostname that does not resolve or an IP address that does not match the license. The fix is to correct the DNS A record, wait for propagation and re-run the license update from WHM. This is the most common mistake during first-time installations.

Another common issue is a port conflict from a previously installed web or mail server. If the installer reports that a service could not start, check which process is listening on the relevant port with ss -tulpn and remove the conflicting package. Firewall rules are a third source of trouble: if WHM does not load in the browser but the service is running, the panel ports are usually blocked.

A practical example: on a server with 2 GB of RAM, the installer may complete but MySQL can be killed by the out-of-memory handler when several sites are active. Adding swap space before installation prevents this. If you would rather not manage the operating system layer yourself, a dedicated server gives you predictable resources and full root access for a panel installation.

How do I log in and change the cPanel password?

End users reach cPanel at https://example.com:2083 and webmail at https://example.com:2096, using the username and password created with the hosting account. Administrators reach WHM at https://server1.example.com:2087 with root credentials. Bookmarking these URLs avoids confusion, because cPanel access is tied to the port rather than to a path.

To change a cPanel password, log in to cPanel, open the user menu and choose the password option, then enter the current password and the new one twice. To reset a forgotten password, an administrator can change it from WHM under the account's password settings, or the user can use the reset link on the login page if the server has that feature enabled. After a password change, update any mail clients or FTP tools that stored the old credentials.

FAQ

What is cPanel used for?

cPanel is used to manage websites, email accounts, databases, DNS records and SSL certificates from a browser interface on a hosting server. Administrators use the WHM side to create and configure hosting accounts, while end users use the cPanel side to manage their own files, mailboxes and domains without touching the command line.

How do I change my cPanel password?

Log in to cPanel, open the user menu and select the password option, then enter the current password followed by the new password twice. If you cannot log in, an administrator can reset the password from WHM, or you can use the password reset link on the cPanel login page when the server enables that feature.

What is cPanel access and which port does it use?

cPanel access is the browser login used to manage a single hosting account, and it normally runs on port 2083 over HTTPS. Webmail uses port 2096, while the administrator interface, WHM, uses port 2087. All three require valid credentials and, on most servers, an open firewall rule for those ports.

What is cPanel support and who provides it?

cPanel support is provided by the panel vendor for licensing, installation and software issues, while the hosting provider handles server-level problems such as hardware, network and operating system failures. For installation errors, license warnings or panel bugs, contacting the vendor is usually the faster path than troubleshooting alone.

Are there cPanel alternatives worth considering?

Yes. Plesk, DirectAdmin, CyberPanel and aaPanel are common cPanel alternatives, and each targets a different mix of budget, operating system support and automation. Choose DirectAdmin when license cost matters most, Plesk when you need broad Windows and Linux support, and open-source panels when you are comfortable managing updates and security yourself.

Conclusion

Installing cPanel comes down to preparing a clean supported server, setting a resolvable hostname, running the official installer as root and completing the WHM setup wizard. Verification is straightforward: check the services, confirm the license and log in to both the administrator and user interfaces. Once those steps pass, you have a working cPanel hosting environment ready for accounts.

Your next step is to provision a server that matches the workload you plan to host, then repeat the steps above on that machine. If you need full root access and predictable resources for a panel installation, review the virtual server options and check the service page for current pricing before you begin. For single-core workloads such as a busy database-backed site, compare the Ryzen server plans as well, and if you want a machine that is not shared with other tenants, look at colocation or a bare metal option before you commit.

Looking for a service on this topic?

The infrastructure described in this article is available on BalHost servers.