How to Install cPanel on Ubuntu Server 24.04

Installing cPanel on Ubuntu Server 24.04 LTS, Complete guide with system requirements and best practices for efficiently managing websites on Ubuntu VPS
5 min read
Beginner
Install cPanel on Ubuntu Server 24.04

For a long time, it was not officially possible to install cPanel/WHM on Ubuntu, and many of the tutorials available on the Internet were written based on non-standard methods.

However, with the release of new versions of cPanel & WHM (v132 onwards), official support for Ubuntu 24.04 LTS has been added, as announced by the official cPanel documentation, and now this popular control panel can be installed on Ubuntu 24 in a completely legal, stable, and supportable manner.

In this article, we will review the official, step-by-step tutorial for installing cPanel on Ubuntu 24, which has been tested by the VPSMakers team on a real server.

System Requirements for installing cPanel on Ubuntu

Before starting the installation, be sure to check the following (According to the official cPanel site):

ResourcesMinimumRecommended
CPU1 core2 core or more
RAM1 GB4-6 GB
Disk space20 GB40 GB o more
OSUbuntu 20.04/22.04Ubuntu 24.04 LTS
Accessrootroot

Software tips:

  1. The system must be freshly installed (Clean OS)
  2. There must be no web services, databases or mail servers installed before
  3. Root access is required
  4. A valid and fixed IP is required for license activation

You can choose your server resources and order your Ubuntu VPS server now.

Install cPanel on Ubuntu 24.04 LTS

After deployed Ubuntu Server 24.04, you first need to set up the server Hostname and make sure that the system is ready to install cPanel. After this step, you can begin the official cPanel installation process.

Setting the server hostname

First, set a valid hostname:

BASH
hostnamectl set-hostname server.your hostname.com

Check ubuntu server hostname:

BASH
hostname

Ubuntu operating system update

Update the system completely:

BASH
apt update && apt upgrade -y

After the update is complete, it is recommended to reboot the server:

BASH
reboot

During the cPanel & WHM installation process, the installation script will automatically attempt to open the required ports on the server. For this reason, it is recommended to temporarily disable any active firewalls at the operating system level before starting the installation so that the installation process can proceed without interruption.

Important note:

In Ubuntu distributions, it is possible to disable the operating system firewall from the very early stages of the installation. It is highly recommended to use this method to avoid possible problems during the cPanel installation.

To disable the firewall in Ubuntu, you can use the following commands (in this example, the path ~/firewall.rules indicates the firewall rules file):

BASH
iptables-save > ~/firewall.rules
systemctl stop ufw.service
systemctl disable ufw.service

After the installation is complete and you are sure that cPanel is running properly, you can set up and configure a powerful and manageable firewall such as CSF or APF on the server again.

Download the official cPanel installation script

After logging back into the server, enter the following command:

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

This file is the official cPanel & WHM installation script that automatically checks operating system compatibility.

Installing cPanel on Ubuntu 24

Use the following command to start the installation process:

BASH
sh latest

Important points during installation:

Installation time: 30-60 minutes
Do not disconnect SSH
All dependencies are installed automatically

Reboot the server after the installation is complete.

Error EA4 in cPanel installation process

The EA4 error in the cPanel installation process usually occurs when the EasyApache 4 installation fails due to an operating system incompatibility, a problem with the software repositories, or incomplete dependencies.

Since EA4 is a core part of the web server and PHP setup, this error prevents the complete installation of cPanel and WHM.

Failed to install EA4

In many cases, if you reboot the server, you will be able to connect to WHM. You can also restart the EasyApache 4 installation process by deleting the EA4 related files and running the following command to fix the problem:
remove EA4 related files command:

BASH
rm -rf /etc/cpanel/ea4
rm -rf /var/cpanel/easyapache
rm -rf /usr/local/cpanel/3rdparty

Command to install EA4 related files manually:

BASH
/usr/local/cpanel/scripts/check_cpanel_pkgs --fix
/usr/local/cpanel/scripts/easyapache --build

Logging into WHM

Once the installation is complete, you can log in to WHM at the following address:

URL: https://SERVER-IP:2087
Username: root
Password: Server password

WHM Login Page

cPanel License Activation

If the server IP is valid, the Trial license will be automatically activated for 1 month or you can buy cPanel license from the official cPanel website and add it in WHM.

You can also check the current WHM license status with the following command:

BASH
/usr/local/cpanel/cpkeyclt

Note:
If the cPanel trial license is not activated and your server IP address has not been previously used to obtain a trial license, you can activate the one-month trial period for free by registering on the official cPanel website.

Important steps after installing cPanel

Now that WHM has been successfully installed on your Ubuntu server, there are a few initial steps that need to be taken before you can start using it and running services.

Performing these basic settings will help to ensure that WHM security is at the right level and that the server is ready for stable and secure operation.

To increase security and stability, you can take the following steps:

  1. Install and configure a firewall (CSF or Firewalld)
  2. Check essential WHM and cPanel ports and block unnecessary ports
  3. Enable automatic backups
  4. Complete testing before providing service to customers

For better control over checking and opening Linux server ports, you can read the “How to open port on Linux VPS” article.

conclusion

With the addition of official cPanel support to Ubuntu 24.04, you can now safely install this popular control panel on Ubuntu without any non-standard methods.

If you are looking for a stable, legal and commercial solution, this method will be the best choice for you as it has been tested by the VPSMakers team and Ubuntu VPS hosting are ready to run cPanel.

Share:

Was this article helpful?

Your feedback helps us improve our technical guides.

Related Posts

You May Also Like

Explore more tutorials, guides, or documentations, from VPSMakers.

Dropbox can be installed and uninstalled on Ubuntu using two methods: the Terminal and (GUI). In this guide, you'll learn both methods.
Robert Smith
October 31, 2026
Follow this guide to set up an FTP server using FileZilla Server on Windows. Learn how to install it and configure the essential settings.
Jacob Rafet
October 27, 2026
Chrome RDP provides you a simple remote desktop envionrmnet through browser, in this guide you learn to install and use it on Windows VPS.
Robert Smith
October 13, 2026
Learn how to check open ports in Linux using netstat, ss, lsof, Nmap, and Netcat with practical commands and examples.
Richard Mourar
October 12, 2026