cPanel License Troubleshooting
How to Fix cPanel License Errors After an IP Address Change
If your server IP recently changed and cPanel or WHM now shows an invalid license error, the license likely needs to be refreshed or reassigned to the new public IP address. This guide explains what causes the issue and how to fix it safely from SSH.
Why Does cPanel Show a License Error After an IP Change?
cPanel licenses are tied to the server’s public IP address. When the server starts using a different main IP, cPanel may no longer match the license file on the server with the license record held by cPanel/WebPros.
This can happen after a VPS migration, dedicated server replacement, network change, IP renumbering, NAT or routing issue, or after assigning a new primary IP to the server.
Common cPanel license errors include:
- Invalid License File
- Cannot Read License File
- Your IP address has changed, and your license is invalid
- The cPanel license server said that a license could not be issued for your server
In most cases, the fix is simple: confirm the server’s public IP, refresh the cPanel license file, and verify that the license is active for the correct IP.
Before You Start
You will need root SSH access to the server. If this is an UnderHost managed server, our team can check and correct the license for you through a support ticket.
Access Needed
Root SSH access or WHM terminal access.
Main Requirement
The license must match the server’s public IP.
Support Path
If the license was purchased through UnderHost, open a ticket and we can correct it.
Step-by-Step Guide to Fix cPanel License Errors
Step 1: Verify Your Server’s Current Public IP Address
First, confirm which public IP cPanel sees from your server. Run:
curl -s http://checkip.cpanel.net
You can also check the IPs configured locally on the server:
hostname -I
The public IP returned by checkip.cpanel.net is the most important value for licensing. If that IP is not the one assigned to your cPanel license, the license refresh may fail.
Step 2: Refresh the cPanel License File
Run the cPanel license update command:
/usr/local/cpanel/cpkeyclt
This forces cPanel to contact the license servers and refresh the local license file. If the license exists for the server’s current public IP, this is usually enough to fix the problem.
Step 3: Check the License Status
You can verify whether the license is active for the server IP by checking cPanel’s public license verification endpoint:
curl -s https://verify.cpanel.net | grep $(curl -s http://checkip.cpanel.net)
If the command returns your IP and active license information, the license is valid. If it returns nothing or the license still shows invalid, continue with the next step.
Step 4: Update the License IP If Needed
If the license is still assigned to the old IP address, it must be updated to the new public IP.
- If your cPanel license was purchased through UnderHost, open a support ticket from CustomerPanel and include the server IP.
- If you purchased the license directly from cPanel, log in to the cPanel Store.
- Go to your licenses or orders section.
- Select the affected license and update the assigned IP address.
- Return to SSH and run
/usr/local/cpanel/cpkeycltagain.
Important: Do not keep changing the server’s main IP repeatedly while troubleshooting. Confirm the correct public IP first, then update the license once.
Step 5: Restart cPanel Services
After the license refresh completes successfully, restart cPanel services:
service cpanel restart
Or restart only the cPanel web service:
/scripts/restartsrv_cpsrvd
Once restarted, open WHM again using:
https://your-server-ip:2087
Common Issues and Fixes
License still shows invalid after running cpkeyclt
Wait 5 to 10 minutes and run /usr/local/cpanel/cpkeyclt again. If it still fails, the license may not be assigned to the server’s current public IP.
WHM is not loading on port 2087
Make sure port 2087 is open in the server firewall and not blocked by an upstream security rule. If you recently changed IPs, also verify the DNS or direct IP you are using to access WHM.
cpkeyclt reports the wrong IP address
This usually means outbound traffic from the server is leaving through a different IP than expected. Check your routing, NAT, main interface configuration, and any provider-side IP failover setup.
The wrong IP is configured on the server
On older CentOS, AlmaLinux, Rocky Linux, or CloudLinux systems using legacy network scripts, check the interface file:
nano /etc/sysconfig/network-scripts/ifcfg-eth0
On newer systems using NetworkManager, use nmcli or your provider’s recommended network configuration method instead.
The license is active but cPanel still shows an error
Restart cPanel services, clear your browser cache, and test from a private browser window. If the issue persists, check /usr/local/cpanel/logs/license_log for the exact error returned by the licensing server.
Quick Command Summary
For experienced administrators, these are the core commands used during most cPanel license IP-change fixes:
# Check the public IP cPanel sees
curl -s http://checkip.cpanel.net
# Check local server IPs
hostname -I
# Refresh the cPanel license
/usr/local/cpanel/cpkeyclt
# Verify the license record
curl -s https://verify.cpanel.net | grep $(curl -s http://checkip.cpanel.net)
# Restart cPanel services
/scripts/restartsrv_cpsrvd
When Should You Contact Support?
You should open a support ticket if:
- Your cPanel license was purchased through UnderHost.
- The server IP changed after migration or provider-side maintenance.
cpkeycltreports a license error even after the license IP was updated.- The server appears to be using the wrong outbound IP.
- You cannot access WHM after the license refresh.
- You are not comfortable changing network or license settings over SSH.
For account-specific license changes, include the server IP, hostname, service ID if available, and the exact error shown by WHM or /usr/local/cpanel/cpkeyclt.
Need Help Fixing Your cPanel License?
If your cPanel license is still failing after an IP change, UnderHost support can review the license assignment, server IP, network configuration, and cPanel service status for you.
FAQ
Why did cPanel work before but fail after changing the server IP?
Because the license was likely assigned to the old IP address. cPanel validates the local server license against the public IP used by the server.
Does running cpkeyclt change my license IP automatically?
No. It refreshes the local license file and checks the license status. If the license is still assigned to the old IP, the license record must be updated first.
Can UnderHost fix this for me?
Yes, if your cPanel license or managed server service is handled by UnderHost, open a ticket from CustomerPanel and our team can review it.
Should I reinstall cPanel to fix an invalid license?
No. A license error after an IP change normally does not require reinstalling cPanel. Confirm the public IP, update the license if needed, then run /usr/local/cpanel/cpkeyclt.
