Fix "cPanel license invalid" or licence not found errors
Fix cPanel licence invalid or licence not found errors on a VPS. Check the IP on verify.cpanel.net, open outbound connections, fix DNS and time, and refresh with cpkeyclt.
- Intermediate
- Linux VPS
- 4 min read
When WHM shows "Invalid License File", "License File Expired" or a message that no licence was found, the server could not prove to cPanel that it holds a licence for its IP. The cause is almost always one of four things: the wrong IP, a blocked outbound connection, broken DNS or a wrong clock. This guide checks each one in order.
RunRacks does not sell or manage cPanel licences. If the licence itself needs changing, such as moving it to a new IP, contact the company you bought it from.
Before you start
- Root SSH access to the server. Your IP and root password are in the Dashboard. If SSH is also blocked, use the browser console in the Dashboard control panel.
- The order details for your cPanel licence, including the IP it was bought for.
Step 1: Compare the licensed IP with the server IP
Open verify.cpanel.net and enter the IP shown for the VPS in your Dashboard. Note whether it shows an active licence.
Then check which IP the server actually uses for outbound traffic:
curl -4 -s https://ifconfig.coThe result should match the licensed IP. Common mismatches:
- The licence was bought for a different IP, for example a typo or an old server. Ask the vendor or partner to move it.
- The server has several IPs and sends traffic from one that is not licensed. Make the licensed IP the main address, or have the licence moved to the IP the server uses.
- The VPS was rebuilt with a new IP. Licences do not follow servers. The licence must be reissued.
Step 2: Check the server can reach cPanel
The licence check is an outbound HTTPS connection. A strict firewall can block it. Test it:
curl -sI https://verify.cpanel.net | head -n 1You should see a line starting with HTTP/. If the command hangs or fails, look at your firewall.
With CSF, outbound ports are set in TCP_OUT in /etc/csf/csf.conf. Make sure 80 and 443 are listed, then restart:
grep '^TCP_OUT' /etc/csf/csf.conf
csf -rChange one firewall setting at a time and keep your SSH session open while you test. A mistake in CSF can block your own access.
Step 3: Check DNS resolution
If the server cannot resolve hostnames, it cannot find the licence servers either. A message such as "License server hostnames could not be resolved" points straight at this.
cat /etc/resolv.conf
dig +short verify.cpanel.netdig should return at least one IP address. If it returns nothing, set working resolvers in WHM under Home » Networking Setup » Resolver Configuration, or add public resolvers to /etc/resolv.conf and test again.
Step 4: Check the server time
A clock that is far out breaks secure connections. Check it:
timedatectlIf System clock synchronized shows no, turn on time sync and check again after a minute:
timedatectl set-ntp trueStep 5: Check the hostname
A broken hostname does not usually void the licence, but it causes confusing warnings around it. Confirm the hostname is an FQDN that resolves to the server:
hostname -f
dig +short "$(hostname -f)"If it is wrong, see change the server hostname in WHM.
Step 6: Refresh the licence
With the IP, network, DNS and time correct, ask the server to fetch its licence:
/usr/local/cpanel/cpkeycltA good result ends in Update succeeded. If it prints an error code, keep the full message. The vendor or your licence provider can look it up.
Check it works
cpkeycltreportsUpdate succeeded.verify.cpanel.netshows an active licence for the server IP.- Logging in to WHM at
https://203.0.113.10:2087shows the normal home page, not a licence error.
Troubleshooting
- verify.cpanel.net shows no licence at all: the licence is not issued or has expired. Contact your licence provider, or buy a new one for this IP.
- verify.cpanel.net is fine, cpkeyclt times out: the problem is on the server. Recheck the firewall and DNS steps.
- Error after the IP was changed: licences are bound to IPs. Have the licence moved, then run
cpkeyclt. - Trial expired: the IP has used its one trial. A paid licence is needed. See use the cPanel 15-day trial.
Next steps
- Set up a fresh licence correctly: activate a cPanel licence on your VPS.
- Review firewall rules: configure CSF open ports for cPanel.
- Still stuck on the server side? Open a ticket with the output of each step.
Was this guide helpful?
Still stuck?
Ask RunRacks AI for a quick answer, or open a ticket and our team will take a look at your server.
Related guides
Troubleshooting
Fix Nginx 413 Request Entity Too Large
Nginx returns 413 Request Entity Too Large when an upload is bigger than client_max_body_size. Raise the limit for one site or the whole server, match PHP's limits, and test.
- Beginner
- Linux VPS
- 5 min read
Troubleshooting
Is your ISP or router blocking port 12230? How to tell
Work out whether your internet provider, home router, parental controls or a proxy is blocking RDP port 12230, and collect the details support needs to help.
- Intermediate
- Windows VPS · Admin RDP
- 5 min read
Troubleshooting
Fix "Your credentials did not work" in Remote Desktop
Fix rejected RDP logins: username format, the right password, stale saved credentials, account lockout and Remote Desktop permissions.
- Beginner
- Windows VPS · Admin RDP
- 3 min read