Install cPanel on Ubuntu

Install cPanel on Ubuntu: Are you looking for a reliable control panel solution to manage your websites and web applications on an Ubuntu server? Look no further! cPanel & WHM is one of the most popular control panel solutions in the industry, known for its user-friendly interface and powerful management features. In this comprehensive guide, we will walk you through the process of installing cPanel on Ubuntu, step by step.

Introduction to cPanel & WHM

cPanel & WHM is a powerful control panel solution that allows you to manage various aspects of your server in a user-friendly environment. With cPanel, you can easily publish websites, create emails and calendars, transfer and manage files, manage domains, launch databases, and much more. WHM (Web Host Manager) provides administrative control over your dedicated server or VPS, allowing hosting providers to manage customer accounts.

System Requirements for Install cPanel on Ubuntu

Before installing cPanel on your Ubuntu server, it is important to ensure that your system meets the minimum requirements. Here are the recommended system requirements for cPanel installation:

  • Operating System: Ubuntu 20.04 LTS
  • Processor: Minimum 1.1 GHz, Recommended 2 GHz
  • RAM: Minimum 1 GB, Recommended 4 GB
  • Disk Space: Minimum 20 GB, Recommended 40 GB
  • Architecture: 64-bit
  • Static IP address
  • Standard hostname (FQDN)

It is worth noting that these are the minimum requirements, and it is recommended to allocate additional resources for optimal performance, especially if you plan to host a large number of websites or high-volume applications.

Setting Up the Ubuntu Server

To begin the installation process, you need to set up an Ubuntu server. You can create a virtual machine on a cloud platform such as Google Cloud, AWS, or DigitalOcean, or you can set up a physical server. Make sure to choose Ubuntu 20.04 LTS as the operating system for your server.

Once the server is set up, you need to configure the network settings, including the hostname and IP address. It is important to assign a static IP address to your server to ensure stable connectivity. Additionally, you should set a fully qualified domain name (FQDN) as the hostname for your server.

Verifying cPanel & WHM License

Before proceeding with the installation, it is essential to verify the cPanel & WHM license for your server. Visit the cPanel license verification page and enter your server’s external IP address. This will confirm whether your IP address has a valid license or not. If the IP address does not have a valid license, you may need to restart your server to obtain a new IP address.

Once your IP address is verified and has a valid license, you can proceed to reserve your IP address as a static IP. This will ensure that your license remains associated with your server even if the IP address changes in the future.

Configuring Cloud DNS

To ensure proper domain management and resolution, it is recommended to set up Cloud DNS for your domain. This will allow you to point your domain to your Ubuntu server and manage DNS records in the cloud. Follow the instructions provided by your cloud provider to set up Cloud DNS and create the necessary DNS records for your domain.

In addition to the standard DNS records, you need to create an additional A record for the cPanel subdomain. This will ensure that cPanel can be accessed using a specific subdomain, such as

Setting Up Firewall Rules

cPanel & WHM require certain ports to be open in the server’s firewall to allow access to the control panel and associated services. You need to configure firewall rules to permit incoming connections on the following ports:

  • TCP: 2077, 2078, 2082, 2083, 2086, 2087, 2096, 3306, 53
  • UDP: 53

By creating these firewall rules, you ensure that cPanel and its services can communicate properly with the outside world. This step is crucial for establishing a secure and functional cPanel installation.

Installing cPanel on Ubuntu

With the server fully prepared, you are now ready to install cPanel on Ubuntu. Access your server via SSH and navigate to the home directory. Download the latest cPanel installation script using the following command:

cd /home && curl -o latest -L && sh latest

This will initiate the installation process, which may take some time to complete. Once the installation is finished, you will be prompted to set a root password for cPanel. Choose a strong password and make sure to keep it secure.

Configuring the Hostname

To ensure proper functionality of cPanel, it is important to configure the hostname for your Ubuntu server. This involves setting up a fully qualified domain name (FQDN) that points to your server’s IP address. You can do this by editing the /etc/hosts file and add an entry for your hostname and IP address.

After updating the hostname, it is recommended to reboot your server to apply the changes. This will ensure that the hostname is properly recognized by the system.

Agreeing to Terms and Conditions

Upon accessing cPanel for the first time, you will be presented with the Terms and Conditions. It is important to carefully read and understand these terms before proceeding. Once you have reviewed the terms, you can agree to them and proceed with the initial setup.

During the setup process, you will be prompted to create an account and provide your email address. This information will be used for administrative purposes and to notify you of any important updates or issues related to your cPanel installation.

Setting Up Email in WHM

cPanel & WHM provides built-in email capabilities, allowing you to create and manage email accounts for your domains. To set up an email in WHM, navigate to the Email section and follow the instructions provided. You can create email accounts, set up email forwarding, configure spam filters, and manage other email-related settings.

Properly configuring email in WHM ensures that you can send and receive emails from your domains using the cPanel interface. This is an essential feature for hosting providers and website owners who rely on email communication.

Activating cPanel License

To fully activate your cPanel license, you need to purchase a license from cPanel or your preferred hosting provider. Once you have obtained a valid license, you can enter the license details in the WHM interface to activate your cPanel installation. This step is crucial for gaining access to all the features and functionalities of cPanel & WHM.

By activating your license, you ensure that your cPanel installation is legitimate and supported by the official cPanel team. This provides peace of mind and access to regular updates and support.


Congratulations! You have successfully installed cPanel on Ubuntu using this comprehensive step-by-step guide. With cPanel & WHM, you now have a powerful control panel solution at your fingertips, allowing you to easily manage your websites, emails, files, and more. Take some time to explore the various features and customization options available in cPanel, and make the most of your hosting experience.

Remember to regularly update your cPanel installation and keep an eye out for new features and security enhancements. With cPanel & WHM, you can streamline your server management tasks and focus on what matters most: delivering a seamless web hosting experience to your user.

FAQ About Installing cPanel on Ubuntu

1. What is the minimum operating system requirement for installing cPanel on Ubuntu?

Answer: The minimum operating system requirement for installing cPanel on Ubuntu is Ubuntu 20.04 LTS.

2. What are the minimum and recommended processor speeds for installing cPanel?

Answer: The minimum processor speed required is 1.1 GHz, while a 2 GHz processor is recommended for optimal performance.

3. How much RAM is required for a basic installation of cPanel? What is the recommended amount?

Answer: A minimum of 1 GB RAM is required for a basic installation. However, 4 GB is recommended for better performance, especially if you plan to run multiple services or host multiple websites.

4. What is the minimum disk space required for installing cPanel? What is the recommended disk space?

Answer: The minimum disk space required is 20 GB. For better performance and to host more accounts, a disk space of 40 GB is recommended.

5. Is a license required to install cPanel on Ubuntu? Where can I obtain one?

Answer: Yes, a license is required for each cPanel & WHM server. Licenses can be obtained from the cPanel Store.

6. What are the networking requirements for installing cPanel? Do I need a fully qualified domain name?

Answer: Yes, you need a registered and fully qualified domain name as your hostname. Additionally, your system must have a valid IP address.

7. Should I disable my firewall before installing cPanel? Why or why not?

Answer: It is recommended to disable your OS firewall before installation to allow the installer to open the necessary ports. You can configure a firewall after the installation is complete.

8. Is Perl a prerequisite for installing cPanel? How do I install it?

Answer: Yes, Perl must be installed on your server before running the cPanel installation script. You can install Perl using the command apt -y install perl perl-base.

9. Which filesystems are recommended for installing cPanel on Ubuntu?

Answer: XFS or ext4 filesystems are recommended for optimal performance and compatibility.

10. Is it possible to install cPanel on a virtual machine? If so, which virtual environments are supported?

Answer: Yes, cPanel supports various virtual environments like KVM, Linux Containers, and VMware.

11. Which database versions are supported by cPanel on Ubuntu 20.04 LTS?

Answer: Only MySQL 8.0 is supported on Ubuntu 20.04 LTS.

12. Are there any nameservers that are specifically supported or recommended for cPanel installations on Ubuntu?

Answer: PowerDNS is the only nameserver that is supported on Ubuntu 20.04 LTS for cPanel installations.

13. Is SELinux compatible with cPanel installations on Ubuntu? What about AppArmor?

Answer: SELinux is not compatible with cPanel & WHM. However, AppArmor, which runs by default on Ubuntu, is compatible and does not need to be disabled.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *