How to Install cPanel on a VPS
On a fresh AlmaLinux 8 or 9 VPS with root SSH, set a hostname that resolves to the server IP, install curl, then run curl -o latest -L https://securedownloads.cpanel.net/latest and sh latest from /home. Wait 15 to 45 minutes, then open https://server-ip:2087 and activate the licence.
For Indian developers and resellers provisioning their own cPanel and WHM server on an unmanaged VPS.
knowledge
- Read time
- 5 min
- Sections
- 8
- Updated
- 14 Nov 2026
- Written by
- WebJi® team
Last editorial update: 15 November 2026.
What does cPanel need before the installer runs?
cPanel & WHM installs only on a freshly installed, supported 64-bit OS with root access, a static IP and a fully qualified hostname — official requirements list 2 GB RAM minimum (4 GB recommended) and 20 GB disk minimum (40 GB recommended). It takes over Apache, PHP, MySQL, DNS and mail on the machine, which is exactly why it refuses anything but a clean system, and it has no uninstaller: removal means reformatting the server.
| Requirement | What it means in practice |
|---|---|
| Operating system | Clean AlmaLinux 8, 9 or 10, Rocky Linux, or Ubuntu LTS; SELinux disabled |
| RAM | 2 GB minimum, 4 GB recommended (3 GB+ if you add ClamAV) |
| Disk | 20 GB minimum, 40 GB recommended, plus room for backups, mail and logs |
| Processor | 1.1 GHz minimum, 64-bit; ARM is not supported |
| Access | Root over SSH — sudo is not enough for the installer |
| Network | Static public IP, and a hostname like server1.yourdomain.com that resolves to it |
| Licence | Paid per server; the install finishes without one but WHM stays locked until it activates |
A VPS that already runs a website is the wrong host for this: cPanel wants to configure every service itself, and pre-installed web servers or databases make the install fail or conflict later.
How do you prepare the VPS operating system?
Log in as root and do the boring parts first — OS update, resolvable hostname, local hosts entry, and a network setup the installer expects — because each step prevents a specific later failure.
- Update the OS:
yum update -y, then reboot if the kernel changed. - Set the hostname:
hostnamectl set-hostname server1.yourdomain.com - Add the server IP and that hostname to
/etc/hosts, so the name resolves locally before public DNS exists. - Create the public A record for the hostname at your DNS provider, pointing at the server IP — the licence check uses it.
- Stop and disable NetworkManager (
systemctl stop NetworkManager && systemctl disable NetworkManager); cPanel's network configuration on AlmaLinux expects it off. - Check that
/tmpis not mountednoexec; if it is, remount it without that flag or the installer cannot run its scripts.
You are ready when hostname -f prints the full name and a ping of that name answers from the server itself. A wrong hostname is the most common reason a licence later shows as invalid.
How do you run the cPanel installer?
One official command does the work — run it as root from /home, inside a screen or tmux session so a dropped SSH line cannot interrupt it. A half-interrupted install usually means rebuilding the server, because there is no uninstaller.
yum install curl -y
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
- Install curl if it is missing (first line above).
- Run the installer (second line) and leave the session open.
- Expect 15 to 45 minutes of package downloads and service configuration, depending on disk and network speed.
It worked when the output ends with a completion message and prints the WHM address; confirm later with cat /usr/local/cpanel/version. If the script stops with an error, read the log path it prints instead of running it again — a repeat run on a partial install makes the mess worse.
How do you finish the setup in WHM?
WHM is the server-side panel on port 2087 (cPanel, what customers see, is 2083), and both greet you with a self-signed certificate warning on first visit — that is expected, not a failure.
- Open
https://server-ip:2087and accept the certificate warning. - Log in as root and accept the licence agreement; a licence already tied to this IP activates here.
- Set the contact email to a mailbox you actually read — service alerts and security notices land there.
- Confirm the networking details WHM detected, then set nameservers such as ns1 and ns2 on your own domain.
- At the registrar, create those nameserver records pointing at the server IP, or hosted domains will not resolve.
The server is usable when WHM loads without a licence warning and the header hostname matches your FQDN. Create a test account and open its cPanel on 2083 before you host anything real.
How do you secure the server before the first website?
A default cPanel install is functional, not hardened — four settings take about an hour and remove most of the risk.
- Updates: in WHM's Update Preferences, set the release tier to RELEASE and enable automatic updates.
- Brute force: enable cPHulk Brute Force Protection to block IPs that keep guessing passwords.
- Firewall: install CSF (see the ConfigServer firewall guide) and open only the ports you use — 22, 80, 443, 2083, 2087 and mail.
- SSH: move off port 22, switch to key authentication, then disable password logins in
sshd_config. - Backups: turn them on in the same session, with the destination on remote storage — a backup beside the site it protects disappears with the disk.
How do you create the first package and account?
WHM will not create a hosting account without a package, because the package carries the limits — so make the package first, then the account.
- Packages → Add a Package: name it, set the disk quota and bandwidth, save.
- Account Functions → Create a New Account: enter the domain, username and a strong password, pick the package.
- Open the account's cPanel at
https://server-ip:2083with those credentials. - Upload an index file and load the domain; a default page means DNS has not reached this server yet.
Avoid "unlimited" quotas on a VPS you use for other things — one runaway backup can fill the disk and take every account down with it.
What are the five usual install failures?
Almost every failed cPanel install matches one of five symptoms — identify yours before changing anything.
| Symptom | Cause and fix |
|---|---|
| Installer refuses the OS | Debian, Windows, an end-of-life CentOS or a custom image. Reinstall with a clean supported AlmaLinux or Rocky Linux. |
| WHM shows an invalid licence | The hostname does not resolve to this IP, or the licence belongs to another IP. Fix DNS, then run /usr/local/cpanel/cpkeyclt. |
| Install stops partway | Usually RAM exhaustion or a full disk. Check free -m and df -h, then rebuild rather than resume. |
| Installer fails on /tmp | /tmp is mounted noexec. Remount without that flag and re-run. |
| WHM unreachable after install | The provider's firewall blocks 2087. Open it in the provider panel, not only in CSF. |
What does the licence cost — and when should you skip all this?
cPanel is commercial software licensed per server with pricing tied to account count, so the install script is free to run but WHM stays locked until a licence activates for that IP. If the goal is one or two websites rather than a hosting business, a managed plan is cheaper than a licence plus the hours.
To be clear about the products: cPanel hosting at WebJi® is a separate product listing at ₹297 a month before 18% GST (20 GB disk, 200 GB bandwidth, 10 email IDs, 1 domain), while WebJi®'s Linux shared plans use the ControlPanel.Systems panel instead. If you want the VPS route with root, VPS hosting starts from ₹499 a month (quoted per configuration); the panel licence on top is yours to arrange or ask about. Support answers by email at support@webji.services, 24/7 in Hindi and English, published average first reply under 60 minutes, and can quote licence and server together.
Frequently asked questions
Can I install cPanel on my own VPS?
Yes, if you have root SSH on a freshly installed supported OS (AlmaLinux, Rocky Linux or Ubuntu LTS). Install curl, run the official installer from /home, then finish the licence and nameservers in WHM on port 2087. WHM stays locked until a paid licence activates for that IP.
How much RAM does cPanel need?
The official requirements list 2 GB minimum and 4 GB recommended, with at least 3 GB if you install ClamAV. Below the minimum the installer can fail mid-run and services get killed under load, so treat 2 GB as the floor and 4 GB as the working size.
Which OS should I use for cPanel?
AlmaLinux 8, 9 or 10 is the default choice, with Rocky Linux and Ubuntu LTS also supported. Debian, Windows and end-of-life CentOS releases are not. SELinux must be disabled before the installer runs.
How long does the cPanel installation take?
Fifteen to forty-five minutes on a normal VPS, depending on disk speed and network. Run it inside screen or tmux and do not reboot partway through — there is no uninstaller, so an interrupted install usually means rebuilding the server from a fresh image.
Can cPanel be uninstalled?
No. The official documentation states that removing cPanel & WHM requires reformatting the server. That is why the installer demands a freshly installed OS and why you never run it on a VPS that already hosts sites you care about.
Last editorial update: 15 November 2026. Prices follow the dated sources on this page; checkout confirms current charges.
Ready to get started with WebJi®?
Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.