Installation Guides

How to Install cPanel on an Offshore VPS

Installation Guides

Read this before you start

cPanel installs in one command, but it is unusually unforgiving about the state of the machine before that command runs. It wants a completely fresh server. Not a mostly clean one.

It also cannot be uninstalled. There is no removal script. If the install goes wrong or you change your mind, the fix is reinstalling the operating system. So the checks below are not optional preamble, they are the guide.

Time1 to 2 hours, mostly waiting.
CostLicensed monthly. Not free.
ReversibleNo. OS reinstall only.

The four checks

Every failed cPanel install we have seen comes down to one of these.

1. A supported operating system. AlmaLinux 8 or 9, Rocky Linux 8 or 9, CloudLinux, or Ubuntu 22.04 LTS. Not Debian. Not a desktop image.

cat /etc/os-release

2. A fully qualified hostname. It must be a subdomain, like server.yourdomain.com, and not the domain you plan to host on this box:

hostnamectl set-hostname server.yourdomain.com

Add it to /etc/hosts too. If the hostname is not fully qualified, the installer stops and tells you so.

3. Nothing already installed. No Apache, no nginx, no MySQL, no other panel. If the provider image shipped with a web server, reinstall the OS rather than trying to remove it. cPanel wants to install and own all of it.

4. Enough resources. 2GB RAM is the documented minimum and it is genuinely tight; 4GB is the realistic floor for a server that does anything. 40GB of disk minimum. cPanel with its own services is heavy before you host a single site.

Running the installer

cd /home
curl -o latest -L https://securedownloads.cpanel.net/latest
sh latest

Run it inside screen or tmux. The install takes up to two hours, and if your SSH session drops partway through you are left with a half installed panel and no way back except an OS reinstall:

screen -S cpanel
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

Detach with Ctrl-A then D, reattach later with screen -r cpanel. This is the single most useful habit for any long running install.

First login

WHM is at https://your-server-ip:2087, logging in as root. The certificate warning on first visit is expected, since the server does not have a real certificate yet.

You will be asked for your licence key. cPanel is commercial software with a monthly fee, and the licence is tied to the server IP. If you migrate the server to a new IP later, the licence has to be moved too or the panel stops working. Check it with:

/usr/local/cpanel/cpkeyclt

The setup wizard then asks for contact email, nameservers and IP configuration. Set the nameservers properly if you plan to resell, since that is what client domains will point at.

Securing it

cPanel opens a lot of ports: 2082, 2083, 2086, 2087, 2095 and 2096, plus mail and FTP. That is a wide surface.

cPanel servers use CSF rather than UFW. Install it and do not run both:

cd /usr/src
wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz && cd csf && sh install.sh

Then restrict WHM on 2087 to your own IP in the CSF config. Leaving a root level panel open to the whole internet is the risk here, not the panel itself.

ss output showing which services are listening and on which addresses
After the install, check what is exposed. cPanel starts more services than you expect.

Then do the basics that apply to any server: key-only SSH, automatic updates, backups. Our VPS security checklist covers them, and most of it applies here with CSF in place of UFW.

How to test

  1. WHM loads on 2087 and root login works.
  2. Licence shows as active.
  3. Create a test account and confirm cPanel loads on 2083.
  4. Host a real domain on the test account and check it serves.
  5. Send a test email from the account and confirm it is not rejected.
  6. Reboot and confirm every service comes back.
  7. Confirm 2087 is not reachable from an IP other than yours.

When something breaks

What you see Why Fix
Installer refuses to start Unsupported OS or hostname not fully qualified Check /etc/os-release, set a proper hostname
Install fails partway Existing Apache, nginx or MySQL Reinstall the OS clean. There is no removal path
Session dropped mid install Not run inside screen Reinstall the OS and start again inside screen
Licence invalid Licence not bound to this IP Update the IP with your provider, then /usr/local/cpanel/cpkeyclt
WHM unreachable after CSF 2087 not allowed in the firewall Edit csf.conf from SSH and restart CSF
Server very slow after install 2GB RAM with cPanel services running Move to 4GB. This is not a tuning problem
Mail from accounts goes to spam No reverse DNS, SPF or DKIM on a fresh IP Set reverse DNS with the provider, enable DKIM in WHM

Checklist

  • Supported OS confirmed.
  • Fully qualified hostname set and in /etc/hosts.
  • Completely clean server, nothing pre-installed.
  • 4GB RAM or more.
  • Installer run inside screen.
  • Licence active and tied to this IP.
  • CSF installed, and UFW not running.
  • WHM on 2087 restricted to your own IP.
  • Backups configured before the first client account.

Want cPanel without the licence and the install?

OffshoreKaka reseller hosting comes with cPanel and WHM already licensed and configured on privacy friendly servers.

See reseller hosting

FAQ

Is cPanel free?

No. It is licensed monthly and priced per account tier, so the cost grows as you add accounts. If the licence lapses the panel stops working, though your sites and data are still on the disk. Budget for it before you build a business on it.

What is a free alternative?

aaPanel and CyberPanel are both free and cover most of the same ground for a single operator. They are less polished and have smaller ecosystems, but they cost nothing and install in ten minutes. Our aaPanel guide walks through it.

Can I remove cPanel later?

Not really. There is no supported uninstall. Plan for a full OS reinstall if you want it gone, which is why the pre-install checks matter so much.

Does cPanel help my search ranking?

No. It is an administration tool and Google never sees it. What it gives you is easier management, which indirectly means the site is more likely to stay updated and online.

Leave a Reply

Your email address will not be published. Required fields are marked *