Installing cPanel on VPS
cPanel & WHM is the industry-standard hosting control panel for managing websites, email, databases, and more. This guide covers the complete installation process on a fresh VPS.
Prerequisites
Before installing cPanel, ensure your VPS meets the following requirements:
System Requirements
- Operating System: AlmaLinux 8/9, Rocky Linux 8/9, CloudLinux 8/9, or Ubuntu 22.04 (LTS)
- RAM: Minimum 2 GB (4 GB or more recommended for production)
- Disk Space: Minimum 20 GB free (40 GB+ recommended)
- Architecture: 64-bit (x86_64)
- Network: Static IP address with proper reverse DNS
- Hostname: A valid FQDN (e.g., server.yourdomain.com) — must not be the domain you plan to host
Pre-Installation Checklist
- Fresh OS installation — cPanel must be installed on a clean server with no other control panels or web servers
- Root access via SSH
- Valid cPanel license — purchase from {{COMPANY_NAME}} or cPanel directly
- Perl installed — required by the installer
- Disable NetworkManager (on RHEL-based systems):
```
systemctl stop NetworkManager
systemctl disable NetworkManager
```
Tip: Set your hostname before installation. Use
hostnamectl set-hostname server.yourdomain.comto set a valid FQDN.
Installation Steps
Step 1: Connect to Your VPS
Connect via SSH as the root user:
ssh root@your-server-ipStep 2: Update the System
yum update -y # For AlmaLinux/Rocky
apt update && apt upgrade -y # For UbuntuStep 3: Set the Hostname
hostnamectl set-hostname server.yourdomain.comStep 4: Run the cPanel Installer
cd /home
curl -o latest -L https://securedownloads.cpanel.net/latest
sh latestThe installation process takes 30-60 minutes depending on your server's resources and network speed. Do not interrupt the process.
Step 5: Monitor the Installation
The installer outputs progress to the terminal. You can also monitor the log:
tail -f /var/log/cpanel-install.logPost-Installation Setup
Once installation completes:
1. Access WHM
Open your browser and navigate to:
https://your-server-ip:2087Log in with your root credentials.
2. Complete the Setup Wizard
- Accept the license agreement
- Enter your contact email address
- Configure nameservers (ns1.yourdomain.com, ns2.yourdomain.com)
- Select the networking configuration
- Set your main shared IP address
3. Activate Your License
If your license is IP-based, it activates automatically. To verify:
/usr/local/cpanel/cpkeyclt4. Essential Post-Install Configuration
- Update PHP versions: WHM > MultiPHP Manager — install PHP 8.1 and 8.2
- Configure backups: WHM > Backup Configuration
- Set up SSL: Install a valid SSL for the hostname via WHM > Manage Service SSL Certificates
- Enable Firewall: Install and configure CSF (ConfigServer Security & Firewall)
- Configure email: Set up DKIM and SPF for the server hostname
License Management
cPanel requires an active license tied to your server's IP address:
- Licenses are verified daily against cPanel's licensing servers
- If your IP changes, update your license or contact your license provider
- Trial licenses are available for 15 days for evaluation
Troubleshooting
Installation Fails or Hangs
- Ensure no other web server (Apache, Nginx) is pre-installed
- Check that required ports (80, 443, 2087, 2083) are open
- Review
/var/log/cpanel-install.logfor error details
Cannot Access WHM After Install
- Verify the firewall allows port 2087
- Check that the cpanel service is running:
systemctl status cpanel - Try accessing via IP if DNS has not propagated
License Not Activating
- Confirm your IP matches the licensed IP
- Run
/usr/local/cpanel/cpkeycltto force a license check - Contact your license provider if the issue persists
Related Articles
Need help with cPanel installation or licensing? Contact our support team at {{SUPPORT_EMAIL}} or open a ticket at {{SUPPORT_URL}}.