If you’re running a VPS on Ubuntu 24.04 and need a reliable way to manage websites, email, and server resources, cPanel & WHM is one of the most popular solutions. This guide walks you through a terminal-only cPanel installation — no graphical tools required. By the end, you’ll have a working Ubuntu VPS cPanel setup ready for production or staging environments.
Prerequisites for Installing cPanel on Ubuntu 24.04
Before starting the installation, confirm that your VPS meets the official cPanel installation requirements. Running cPanel on a system with insufficient resources can lead to failed installs or poor performance.
Minimum VPS Specifications
- Operating System: Ubuntu 24.04 (clean installation recommended).
- Processor: 1.1 GHz (dual-core or higher preferred).
- Memory (RAM): 2 GB minimum, 4 GB or more recommended.
- Disk Space: at least 20 GB available, 40 GB+ for production servers.
- Network: stable internet connection with a static public IP address.
Additional Prerequisites
- Root Access: you’ll need full root privileges via SSH.
- Hostname: a valid Fully Qualified Domain Name (FQDN) is required.
- Clean Environment: avoid preinstalled web services (Apache, Nginx, MySQL) that may conflict with cPanel.
Meeting these Ubuntu VPS requirements ensures a smooth installation process and reduces troubleshooting later. With the right VPS cPanel prerequisites in place, you’ll be ready to proceed with the setup.
Installing cPanel on on Ubuntu VPS: Step-by-Step Guide
This guide walks you through the full process of setting up cPanel on Ubuntu using only terminal commands. From preparing your server to completing the WHM wizard, each step ensures your VPS is ready for reliable hosting in a production or staging environment.
Step 1: Update and Prepare the System
Before installing cPanel, you need to make sure your Ubuntu 24.04 VPS is up to date and free of conflicting software. Start with a full package refresh to pull in the latest security patches and bug fixes:
This command ensures your VPS is running the newest stable versions of core components. Next, remove any services that might conflict with cPanel, such as Apache or Nginx:
Taking the time to prepare your VPS for cPanel reduces the chance of dependency issues during installation. With a clean, patched system, you’ll have a secure and reliable foundation for the upcoming setup.
Step 2: Set the Correct Hostname and Network Configuration
cPanel requires your VPS to use a fully qualified domain name (FQDN) as its hostname. Without it, installation or licensing may fail. To configure the hostname on Ubuntu 24.04, run (replace the ‘yourdomain.com’):
Next, update /etc/hosts so the VPS’s static IP maps correctly to your chosen hostname:
Add a line (replace the IP):
Most VPS plans provide one. If your IP changes between reboots, set a static address in your provider panel; cPanel licensing requires a stable IP. This completes the Ubuntu network config for cPanel and ensures smooth licensing.
Step 3: Download and Run the cPanel Auto-Installer Script
With your Ubuntu VPS prepared, the next step is to use the official cPanel install script. This script handles most of the heavy lifting — checking dependencies, configuring services, and deploying both cPanel and WHM. Here’s how to run it safely:
Step 4: Complete Initial Setup via WHM (Post-Installation)
When the installer finishes, your server is ready to be managed through WHM (WebHost Manager). Open a browser and connect to:
Log in with your root username and password. The first time you access WHM, the initial setup wizard will launch. Follow the prompts step by step:
- Provide a contact email for important server alerts.
- Configure DNS resolvers and set default nameservers.
- (Optional) Create a reseller account if you plan to host multiple clients.
- Accept the license agreement and terms.
- Enable SSL to secure logins and traffic.
- Set time zone and locale to match your region.
Completing this WHM configuration ensures your server is fully integrated with cPanel. At this stage, you can start creating accounts, adding domains, and hosting sites.
Managing Your Server with cPanel & WHM
By installing cPanel on Ubuntu, you’ve laid the groundwork for efficient server administration. With WHM, it’s easy to create hosting accounts, configure DNS, allocate resources, and monitor performance — all from a user-friendly control panel VPS environment. The main advantage of this setup is balance: cPanel simplifies day-to-day management without taking away the flexibility of a self-managed server. Keep in mind, though, that regular updates, security patches, and backups are vital to protect your infrastructure. With this foundation in place, you can confidently manage your cPanel VPS and scale it to support multiple websites or clients. It’s a robust solution for developers and businesses alike.