The cPanel module lets WHMCS create, suspend, unsuspend, upgrade and terminate hosting accounts on your WHM server automatically. This works with a root WHM server and with a WHM reseller account, which is what most resellers use. Once connected, a paid order turns into a live cPanel account without any manual work.
Before you start
- WHMCS installed and configured.
- WHM access: root, or a reseller or master reseller account such as an MdmHost reseller plan.
- The WHM server hostname, for example
server1.example.net, with a valid SSL certificate.
Create an API token in WHM
- Log in to WHM.
- Go to Development → Manage API Tokens.
- Click Generate Token.
- Enter a name such as
whmcs. - Leave Expiration empty or set a long date, and grant only the ACLs WHMCS needs (account creation, suspension, package listing, password change) – or all ACLs your reseller account has.
- Click Save and copy the token. WHM shows it only once.
Add the server in WHMCS
- Go to Configuration → System Settings → Servers.
- Click Add New Server.
- Choose the Module: cPanel.
- Enter the Hostname or IP Address of the WHM server.
- Enter the Username (root or your reseller user) and paste the token into API Token.
- Click Test Connection. A success message confirms WHMCS can talk to WHM.
- Click Continue and complete the details:
- Name – a label for you.
- Nameservers – the nameservers customers should use (your private nameservers if you have them).
- Maximum No. of Accounts – how many accounts WHMCS should place on this server.
- Secure – tick to use SSL on port 2087.
- Click Save Changes.
Create a server group
- On the Servers page, click Create New Group.
- Name it, for example
cPanel Germany, and add the server. - Set Fill Type to Add to the least full server or Fill active server until full.
- Save.
Select this group in each product's Module Settings tab; see create hosting products.
Import existing accounts
If accounts already exist on the server, go to Utilities → Tools → Server Sync Tool (or Import Accounts), select the server and import them as services linked to clients. This lets WHMCS bill and manage them from now on.
Test automation
- Create a test order, mark it paid and confirm the account appears in WHM.
- On the service page in WHMCS, try Suspend, Unsuspend and Change Password.
- Use Login to cPanel on the service page to confirm single sign-on works.
Troubleshooting
- Connection failed / 401: the token is wrong or expired, or the user name does not match the token's owner.
- SSL certificate verification failed: use the server's hostname (which has a valid certificate) rather than its IP.
- Access denied for createacct: your reseller account lacks the privilege or is at its account limit.
- Firewall blocks: the WHMCS server IP must be allowed to reach port 2087. Provide the IP to your host if needed.
- Always check Utilities → Logs → Module Log for the exact API response.
