To install cPanel on a VPS, you need a clean Linux server (AlmaLinux 8/9 or CloudLinux recommended), root SSH access, and one command that downloads and runs the official cPanel installer. The full process takes between 30 and 60 minutes with no manual intervention.
cPanel is the world's most widely used hosting control panel. If you've just set up an unmanaged VPS and want to manage websites, email, and databases without memorizing Linux commands, cPanel is the most straightforward solution available.
Requirements Before Installing cPanel
cPanel has specific system requirements. Ignoring them is the most common cause of failed installations.
System Requirements
| Resource | Minimum recommended |
|---|---|
| RAM | 2 GB (4 GB for production) |
| Storage | 20 GB free (40 GB+ for production) |
| CPU | 1 vCPU (2+ recommended) |
| Operating system | AlmaLinux 8/9, CloudLinux 8/9, Rocky Linux 8 |
| Architecture | x86_64 (64-bit) |
Important: cPanel is not compatible with Ubuntu, Debian, or CentOS 7 (end of life). Use AlmaLinux 8 or 9 as your first choice — it's the most widely supported community successor to CentOS.
Other Prerequisites
- SSH access as root.
- A fully qualified domain name (FQDN) pointing to your server.
- A static IP address assigned to the VPS.
- Ports 2083 (cPanel), 2087 (WHM), 2086 (cPanel HTTP), and 2082 open in your firewall.
- An active cPanel license (you get a free 15-day trial when you install).
Step 1: Prepare the Server
Connect to your VPS via SSH as root:
ssh root@YOUR_VPS_IP
Update the system before you begin:
# AlmaLinux / Rocky Linux / CentOS
dnf update -y
Set your server's hostname (replace with your actual domain):
hostnamectl set-hostname server.yourdomain.com
Verify the hostname is set correctly:
hostname -f
# Should return: server.yourdomain.com
Disable NetworkManager if it's running, as it can interfere with cPanel's networking:
systemctl stop NetworkManager
systemctl disable NetworkManager
Step 2: Run the cPanel Installer
The official cPanel/WHM installer downloads and runs with a single command:
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
This script downloads cPanel, checks requirements, and installs all components (Apache, PHP, MySQL/MariaDB, Exim, Dovecot, and more). Do not close the SSH session during the process. Use screen or tmux to prevent the installation from being interrupted if your connection drops:
yum install screen -y
screen
# Then run the installation command inside the screen session
If your connection drops, reconnect and recover the session with screen -r.
The installer prints its progress to the terminal. When it finishes you'll see:
cPanel installation complete!
Step 3: Initial Setup in WHM
Once installed, access WHM (Web Host Manager) from your browser:
https://YOUR_VPS_IP:2087
Accept the self-signed certificate warning (you can configure a valid certificate afterward). Log in with username root and your server's root password.
The Initial Setup Wizard
WHM will guide you through several required steps:
- Accept the cPanel license agreement.
- Configure nameservers. If you don't have your own, you can use your hosting provider's nameservers for now.
- Set the IP address and hostname (should be pre-filled from your earlier setup).
- Choose a mail server (Exim is the default).
- Enable the firewall — cPanel offers CSF (ConfigServer Security & Firewall); highly recommended.
Complete the wizard and you'll land on the WHM main dashboard.
Step 4: Create Your First cPanel Account
WHM manages the server; cPanel is the interface for each individual website. To create your first account:
- In WHM, go to Account Functions → Create a New Account.
- Enter the domain, username, password, and contact email.
- Select a package (resource plan: disk space, bandwidth, email accounts, etc.). You can create a custom package under Packages → Add a Package.
- Click Create.
The account is ready. Access that account's cPanel at:
https://YOUR_VPS_IP:2083
Or from WHM → List Accounts → the cPanel icon next to the domain.
For professional hosting management with cPanel and related services, visit elenlace.com for expert server and web guidance tailored to the Mexican market.
Post-Installation Tips
- Install a valid SSL certificate in WHM (SSL/TLS → Manage AutoSSL) so panel access uses HTTPS with a trusted certificate.
- Keep cPanel updated: WHM → cPanel → Upgrade to Latest Version.
- Set up backups: WHM → Backup → Backup Configuration. Automated backups are your most important safety net.
- Change the SSH port from 22 to something custom and restrict it in CSF to reduce brute-force attacks.
- Understand the licensing costs: cPanel charges per active account above a certain threshold. Check the official cPanel site for current pricing — it has changed several times in recent years.
Also check the VPS servers section of our blog for free panel alternatives like Webmin or Hestia if cPanel's licensing cost doesn't fit your budget.
Key Takeaways
- cPanel requires AlmaLinux 8/9 or CloudLinux 8/9 — it does not work on Ubuntu or Debian.
- The official installer runs with a single command and completes in 30–60 minutes.
- WHM manages the server; cPanel manages each individual website account.
- Set your FQDN before running the installer to avoid mail and SSL issues later.
- Enable CSF firewall and AutoSSL immediately after installation.
- cPanel has a monthly licensing fee; for small or test projects, consider free alternatives like Hestia or Webmin.
Need a VPS already set up with cPanel, or guidance on choosing the right plan? Visit elenlace.com and our team will help you get started with no commitment required.
FAQ
Does cPanel work on Ubuntu or Debian?
No. cPanel is not compatible with Debian-based distributions. The installation will fail if you attempt it on Ubuntu or Debian. Use AlmaLinux 8/9, which is the most recommended operating system for VPS with cPanel today.
How much does a cPanel license cost?
cPanel includes a free 15-day trial. After that, pricing depends on the number of active accounts: starting around $16 USD/month for up to 5 accounts (solo-admin plan), up to ~$45 USD/month for unlimited accounts on some plans. cPanel LLC sets and changes these prices directly, so check their official website for current figures.
Can I install cPanel on a VPS with 1 GB of RAM?
Technically the installer may run, but cPanel recommends at least 2 GB of RAM. With only 1 GB, the server will be under constant memory pressure and you'll experience stability and performance issues. The practical minimum for production is 4 GB.
How do I access cPanel if I lost my root password?
Access the emergency console (KVM/VNC) provided by your VPS hosting provider and reset the root password using passwd. Most providers also let you reset the root password directly from their control panel dashboard without needing to log into the server first.
Compare providers
Other providers and guides worth comparing: