How To Install Cpanel

Install cPanel on a VPS or Dedicated Server

Introduction

Managing a web server through the command line can be challenging, especially for beginners. Tasks like creating websites, managing email accounts, configuring databases, and handling backups often require technical expertise. This is where cPanel simplifies server management.

cPanel is one of the world’s most popular web hosting control panels, offering a user-friendly interface that makes managing websites and servers much easier. Whether you’re launching a personal blog, hosting multiple business websites, or managing client accounts, cPanel provides powerful tools to streamline server administration.

In this guide, you’ll learn how to install cPanel on a VPS or dedicated server, configure the initial settings, and prepare your server for hosting websites.


What Is cPanel?

cPanel is a Linux-based web hosting control panel that allows users to manage websites, domains, email accounts, databases, DNS records, SSL certificates, and server settings through an intuitive graphical interface.

When paired with WHM (Web Host Manager), cPanel becomes a complete hosting management solution. WHM allows server administrators to create hosting accounts, manage server resources, configure security settings, and oversee multiple cPanel accounts from a single dashboard.

Because of its ease of use and extensive features, cPanel is trusted by hosting providers, web developers, and businesses around the world.


Why Choose cPanel?

Before installing cPanel, it’s helpful to understand why it has become the industry standard for web hosting management.

Some of its key advantages include:

  • Easy-to-use graphical interface
  • Comprehensive website management tools
  • Integrated email management
  • One-click SSL certificate installation
  • Advanced DNS management
  • Automated backups
  • Multi-account hosting with WHM
  • Extensive documentation and community support

These features make cPanel suitable for beginners and experienced server administrators alike.

Get Hosting Only $1/Month


System Requirements

Before starting the installation, ensure your server meets the following requirements:

  • A freshly installed VPS or dedicated server
  • AlmaLinux, Rocky Linux, or CloudLinux (recommended)
  • Root access to the server
  • Minimum 2 GB RAM (4 GB or more recommended)
  • At least 20 GB of available disk space
  • A valid hostname configured on the server
  • Stable internet connection

Important: cPanel should be installed only on a clean operating system. Installing it on a server already running Apache, Nginx, MySQL, or other hosting software may cause conflicts.


Step 1: Connect to Your Server

Use SSH to log in as the root user.

ssh root@your_server_ip

Replace your_server_ip with your server’s public IP address.

Once connected, verify that you have root privileges before continuing.


Step 2: Update Your Server

Updating your operating system ensures you have the latest security patches and software packages.

For AlmaLinux or Rocky Linux:

dnf update -y

After the update completes, reboot the server if required.

reboot

Reconnect to the server once it has restarted.


Step 3: Set the Server Hostname

cPanel requires a fully qualified domain name (FQDN) as the server hostname.

Example:

server.example.com

Set the hostname using:

hostnamectl set-hostname server.example.com

Replace the example with your actual hostname.

Verify the hostname:

hostname

A properly configured hostname helps prevent installation and email delivery issues later.


Step 4: Disable NetworkManager (If Required)

On some operating systems, cPanel recommends disabling NetworkManager.

systemctl stop NetworkManager
systemctl disable NetworkManager

Your server documentation will indicate whether this step is necessary for your operating system.


Step 5: Download the cPanel Installer

Navigate to the home directory.

cd /home

Download the official installation script.

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

The installer is always updated automatically, ensuring you receive the latest stable version.


Step 6: Run the Installation Script

Start the installation.

sh latest

The installation process may take between 30 and 90 minutes, depending on your server specifications and internet connection.

During installation, cPanel automatically installs and configures essential services, including:

  • Apache Web Server
  • PHP
  • MariaDB
  • Exim Mail Server
  • Dovecot
  • FTP services
  • DNS server
  • WHM

Allow the installation to complete without interruption.


Step 7: Access WHM

After installation finishes, open your web browser and visit:

https://your_server_ip:2087

Or use your server hostname:

https://server.example.com:2087

Log in using:

  • Username: root
  • Password: Your root password

The WHM setup wizard will guide you through the initial server configuration.


Step 8: Complete the Initial Configuration

The setup wizard allows you to configure essential settings, including:

  • Contact email address
  • Nameservers
  • Networking preferences
  • Service configuration
  • Security settings
  • License activation

Take time to review each option carefully before proceeding.


Step 9: Create Your First cPanel Account

Inside WHM:

  1. Navigate to Account Functions.
  2. Select Create a New Account.
  3. Enter your domain name.
  4. Create a username and password.
  5. Choose a hosting package.
  6. Click Create.

Once complete, you can log in to the cPanel interface for that hosting account.


Step 10: Secure Your Server

After installation, improving server security should be a priority.

Nivohost offer managed cpanel services or cpanel setup service at just $10 with best security setups

Recommended tasks include:

  • Configure the firewall
  • Enable automatic updates
  • Install an SSL certificate
  • Enable two-factor authentication
  • Configure backups
  • Restrict SSH access
  • Change the default SSH port
  • Disable unused services

A properly secured server reduces the risk of unauthorized access and cyberattacks.


Verify Your Installation

Before hosting websites, verify that all essential services are functioning correctly.

Check:

  • WHM accessibility
  • cPanel login
  • Apache status
  • PHP version
  • MariaDB service
  • DNS functionality
  • Email services

Testing everything early helps identify configuration issues before your server goes into production.


Common Installation Issues

Installer Stops Unexpectedly

Ensure your server meets the minimum hardware requirements and has sufficient disk space.

License Errors

Verify that your server has a valid cPanel license associated with its IP address.

Unable to Access WHM

Check that port 2087 is open in your firewall settings.

Hostname Warnings

Always configure a valid fully qualified domain name before installation.


Best Practices After Installing cPanel

To maintain a secure and high-performing server:

  • Keep cPanel updated regularly.
  • Enable automatic backups.
  • Monitor server resource usage.
  • Install a firewall such as ConfigServer Security & Firewall (CSF).
  • Use strong passwords for all accounts.
  • Remove unused accounts and services.
  • Monitor server logs for suspicious activity.
  • Regularly update PHP versions and installed software.

Following these practices helps keep your hosting environment secure, stable, and efficient.


Conclusion

Installing cPanel transforms server management into a straightforward and efficient experience. With its intuitive interface, powerful automation tools, and seamless integration with WHM, cPanel makes it easy to manage websites, email accounts, databases, DNS records, and security settings from a single dashboard.

By following the steps in this guide, you’ll have a fully functional cPanel server ready to host websites and applications. Combined with regular maintenance, security updates, and reliable backups, cPanel provides a dependable foundation for personal projects, business websites, and professional hosting environments.

Previous Article

How to Secure Wordpress Website 2026 - Best Settings

Subscribe to our Newsletter

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨