Installing cPanel on a VPS takes one command on a brand-new AlmaLinux, Rocky Linux or Ubuntu LTS server: run the official installer as root, wait 30 to 60 minutes, then finish setup in WHM on port 2087.
The command is the easy part. The parts that catch people are the rules around it: the server must be fresh, the hostname must be a real fully qualified name, and the licence is a monthly bill that never goes away. This guide covers all of it in the order you will hit it, then tells you honestly when a control panel is the wrong tool.
Table of contents
- What cPanel and WHM actually are on a VPS
- Requirements: operating system, memory and the fresh-server rule
- Set the hostname and run the installer
- Licensing: how the per-account tiers work
- First steps in WHM after the install
- The tradeoffs: cPanel on a VPS versus a managed platform
- How this fits the rest of the stack
- FAQ
What cPanel and WHM actually are on a VPS
cPanel is really two products sharing one installer. WHM (Web Host Manager) is the server-level console you use as root: it creates accounts, sets packages and quotas, manages DNS, runs backups and configures Apache, PHP and mail. cPanel is the per-account dashboard that each website owner logs into to manage files, email, databases and domains. If you want the longer version of that split, the post on the difference between cPanel and WHM covers it.
On a VPS you are both the hosting company and the customer. That is the part shared hosting hides. Every patch, every Exim queue, every full disk and every expired certificate is now yours. cPanel automates a lot of it, but it automates it on a server you still own.
The reason people install it anyway is familiarity. Clients know the interface, agencies have migration habits built around it, and a lot of WordPress workflows assume it exists. If you host many small sites for other people and want each of them to have their own login, cPanel is a sensible answer. If you are hosting one application for yourself, it is usually the heaviest possible way to do it.
Requirements: operating system, memory and the fresh-server rule
cPanel supports a short list of Linux distributions: AlmaLinux, Rocky Linux, Red Hat Enterprise Linux and CloudLinux from the RHEL family, and recent Ubuntu LTS releases. CentOS is gone as a target, so old tutorials that start with a CentOS image are describing a server you cannot license today. Always check the current supported operating system list on the cPanel documentation before you pick an image, because the supported versions move every year or two.
Plan for at least 2 GB of RAM to install and 4 GB if you intend to run more than a handful of sites, with mail and antivirus scanning on. Disk should be fast SSD or NVMe and much larger than the sites themselves, because backups, mail and logs live on the same box. A 1 GB VPS will install and then swap itself to death.
Now the rule that costs people a weekend: cPanel must go on a fresh server. That means a freshly provisioned minimal OS image with no web server, no MySQL or MariaDB, no PHP stack, no mail server and no other control panel already on it. The installer takes over Apache, PHP, DNS, mail and the database, and it will refuse to run, or leave you with a broken box, if something else got there first. Do not try to install it over a working LAMP server. Build a new VPS and migrate the sites instead.
- Minimal AlmaLinux, Rocky or Ubuntu LTS image, nothing pre-installed
- Root access and a static public IPv4 address
- A fully qualified hostname such as server.example.com that resolves to that IP
- SELinux, firewalld and NetworkManager left alone unless the docs say otherwise
- Ports 2082, 2083, 2086, 2087, 80 and 443 open at the provider firewall
Set the hostname and run the installer
Set the hostname before you run anything. cPanel uses it for the WHM certificate, for mail, and for the licence check, so a bare name like localhost or a hostname with no matching DNS record causes strange failures later. Create an A record for server.example.com pointing at the VPS, then set the hostname on the machine and update the packages.
hostnamectl set-hostname server.example.com
dnf -y update # AlmaLinux or Rocky
# apt update && apt -y upgrade # on Ubuntu
reboot
After the reboot, log in as root and run the official installer. The command downloads the latest installer script into /home and executes it. Use screen or tmux, because the install takes long enough that a dropped SSH session is a real risk, and a half-finished install is annoying to recover from.
yum -y install perl curl screen # dnf on newer releases
screen -S cpanel
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
Expect anything from 20 minutes to an hour depending on CPU and network. When it finishes it prints the WHM address, normally https://your-server-ip:2087. The installer starts a trial licence automatically, provided the server has never had one before. If the licence check fails, the fix is usually DNS, the hostname, or a firewall blocking outbound traffic, not the installer itself.
Licensing: how the per-account tiers work
cPanel is licensed per server, and the price depends on how many accounts the server hosts. The tiers are structured around account counts: a single-account tier for one site, small tiers for a handful of accounts, and larger tiers for dozens or hundreds. Each server needs its own licence, and it is billed monthly. You can buy it from cPanel directly or through a VPS provider that resells it, and the reseller version is often bundled into the monthly server price. I am deliberately not quoting numbers here, because cPanel has changed its pricing more than once and any figure printed in a blog post is wrong by the time you read it. Check the current cPanel price list before you plan.
The licence is tied to the IP address of the server. If you move a server to a new IP, the licence stops validating until you update it. Sites do not go offline, but WHM starts warning you and updates stop.
The thing to model is the bill at your realistic account count, not the entry tier. A server that starts with three sites and grows to forty will cross tiers, and the panel licence can end up costing more than the VPS underneath it. That is not a scandal, it is the deal. But it means the honest comparison is always VPS plus licence plus your time against a platform that includes none of them.
First steps in WHM after the install
Log in at https://your-server-ip:2087 as root. The browser will warn about a self-signed certificate on first use; that is expected until you issue a proper one for the hostname. The first-time setup wizard asks for a contact email, the server hostname, and nameservers, and it is worth doing carefully because those values feed into mail delivery and DNS.
- Finish the setup wizard: contact email, hostname, at least two nameservers, and resolvers.
- Run Issue a Hostname Certificate (AutoSSL) so the panel itself stops throwing browser warnings.
- Enable automatic backups under Backup Configuration, and point them at a different disk or remote destination, not the same volume.
- Set Tweak Settings and MultiPHP Manager defaults: pick a current PHP version and keep the old ones off.
- Turn on the built-in firewall tooling or ConfigServer-style rules, and restrict WHM to your own IP if you can.
- Create a package (disk, bandwidth, email limits), then create your first account from that package.
Notice how much of this is server administration and not hosting. Backups, firewalls, PHP versions and certificate issuance are exactly the checklist in the VPS configuration guide. cPanel gives you a nice form for each item, but it does not remove the item. If you skip the backup step because the form exists, the form will not save you when the disk dies.
The tradeoffs: cPanel on a VPS versus a managed platform
cPanel is at its best when you sell or manage many small PHP and WordPress sites for people who want a familiar login. It is not designed for deploying a Node API from a Git repository, running a Docker container, or attaching a managed Postgres instance. You can force it, but you end up running the app outside the panel and using the panel only for email. That is a lot of licence for a mail server.
Running it also raises the operational floor. Security releases arrive on a schedule you must follow, mail reputation needs care, and if the server misbehaves the on-call person is you. Our post on cPanel not working lists the failures that show up most often, and nearly all of them come from the server underneath rather than the panel.
The short version I give people: choose cPanel on a VPS if you are reselling hosting or migrating clients who expect it. Skip it if you are shipping your own site or app, because you would be paying a monthly licence to administer a server that a platform administers for you.
How this fits the rest of the stack
If your real job is putting one WordPress site or one app online, price the whole stack before you install anything: the VPS, the panel licence, backups, and the hours. The RunxBuild hosting calculator puts those line items side by side. When the answer is that you would rather not run the server at all, managed WordPress on RunxBuild starts at $3 a month with a file manager and a database browser in the dashboard instead of a panel you patch yourself, and web services deploy straight from a GitHub repository. Read the WordPress docs or open the dashboard to try it.
Useful related references:
- cPanel setup, step by step
- The difference between cPanel and WHM
- VPS configuration: the first-hour checklist
- Managed WordPress on RunxBuild
FAQ
Can I install cPanel on Ubuntu?
Yes, on the Ubuntu LTS releases cPanel currently lists as supported, installed on a fresh minimal server. The AlmaLinux and Rocky Linux route is still the most common and the best documented. Check the supported operating system list in the cPanel documentation before you pick the image, because supported versions change.
How much RAM does cPanel need on a VPS?
Plan for at least 2 GB just to install and run the panel, and 4 GB or more for a server hosting several active sites with mail and antivirus scanning enabled. A 1 GB VPS can complete the installation but tends to run out of memory under any real traffic.
Can I install cPanel on a server that already runs websites?
No. cPanel requires a fresh operating system install with no web server, database, mail server or other control panel already present. The installer replaces Apache, PHP, DNS and mail configuration wholesale. Provision a new VPS, install cPanel there, then migrate the existing sites across.
Is cPanel free on a VPS?
No. cPanel is licensed per server with monthly pricing that depends on the number of accounts. A trial licence is issued automatically on a server that has never held one, but you need a paid licence to keep it running beyond the trial period.
How long does the cPanel install take?
Typically 20 to 60 minutes, depending on CPU speed and network. Run it inside screen or tmux so a dropped SSH connection does not kill it halfway. When it finishes, the installer prints the WHM address on port 2087.