cPanel

The cPanel module allows you to add and manage cPanel & WHM servers in WHMCS.

  • To use the cPanel module, the server must be a cPanel & WHM server that uses a valid cPanel & WHM license.
  • If you want to use a WP Squared server, you must use the separate WP Squared module.

Supported Features

CreateSuspendUnsuspendTerminate
Change PackageChange PasswordUsage UpdatesClient Area Link

Make sure to open the following ports for outbound connections from your WHMCS server:

  • 2086
  • 2087

Adding a Server

To set up a cPanel & WHM server in WHMCS:

  1. Go to Configuration () > System Settings > Servers.
  2. Click Add New Server.
  3. Select cPanel from the menu.
  4. Enter the hostname or IP address.
  5. Enter the username and password or API token.
    • For the username and password, use your WHM account credentials.
    • You can generate an API token in WHM at Development » Manage API Tokens.
  6. Click Test Connection.
  7. Enter the desired additional server details.
  8. Examine the displayed default port. If your server uses a different port, check Override with Custom Port and enter the correct port.
    For more information, see Server Port Overrides.
  9. Click Save Changes.
  10. If this is the only cPanel & WHM server that is currently in WHMCS, click on the name and ensure that it results in an asterisk (*) next to it. This indicates that it is the default to use when any other non-specific configuration doesn’t apply.
If Two-Factor Authentication is enabled on your cPanel & WHM server, you must disable it for API requests.

Creating a cPanel Product

You can create a product that provisions accounts on your cPanel & WHM server at Configuration () > System Settings > Products/Services.

When you do this, you can choose between several configurations:

Use an Existing WHM Package

Creating a product using a WHM package

To create a product using an existing package in WHM:

  • Select Shared Hosting for Product Type.
  • Select the desired hosting plan for WHM Package Name.
You can create packages in WHM at Home » Packages » Add a Package.

Use Custom Package Options

Advanced Mode in the Module Settings tab

To create a product using custom package options:

  1. Select Shared Hosting for Product Type.
  2. Do not select a hosting plan for WHM Package Name.
  3. Click Switch to Advanced Mode.
  4. Enter the desired values for each package setting. If you do not enter a value for a setting, the quota will be unlimited.

To configure quotas on a per-account basis, you must have root-level access to the server.


Create a Reseller Package

Reseller settings in the Module Settings tab

In the hosting industry, resellers sell server resources in smaller packages to individual cPanel & WHM users.

Reseller usage limits and reporting use the behavior of reseller accounts in cPanel & WHM. The system will not aggregate use for resellers that the root user owns when making usage calculations.

To create a hosting product for a reseller account:

  1. Select Reseller Hosting for Product Type.
  2. Do not select a hosting plan for WHM Package Name.
  3. Click Switch to Advanced Mode and enter the desired values for each package setting.
    • If you do not ever a value for a given setting, the quota will be unlimited.
    • For Reseller ACL List, enter the name of an ACL that already exists in WHM.
      You can create ACL lists in WHM at Resellers » Edit Reseller Nameservers and Privileges.
    • Make certain to also configure:
      • Limit Reseller by Number
      • Limit Reseller by Usage
      • Reseller Disk Space
      • Reseller Bandwidth
      • Allow DS Overselling
      • Allow BW Overselling
      • Configure Nameservers
      • Reseller Ownership

Per-Account Billing

When you create a reseller product, you can use usage billing to bill customers for each account that the reseller account provisions. You can choose whether to include a certain number of cPanel accounts in the price and only charge for exceeding a certain limit, offer tiered pricing, or charge for every cPanel account resellers create.

To do this, toggle Sub-Accounts to On under Metric Billing and configure the desired pricing.

For more information, see Bill Resellers Per Account.

When a client orders a product, WHMCS will track the number of cPanel accounts that the reseller creates. On the service’s next due date, the system records the current number of cPanel accounts and adds any additional cost to the service’s renewal invoice.

WHMCS Connect

This module supports WHMCS Connect. WHMCS Connect allows you and your administrators to quickly and easily access the control panels of all the servers configured in your WHMCS installation that support Single Sign-On, enabling you and your staff to administer and make changes without ever needing to re-authenticate.

For more information, see WHMCS Connect.

Log in to cPanel

Log in to cPanel in the Client Area and Log in to Control Panel in the Admin Area use the server hostname if it is available. If it is not, they use the IP address.

  • The use of http or https login links depends on the Secure setting in the server configuration.
  • The link in the Admin Area uses the xfercpanel function. When the system prompts you, enter your WHM login details (not the client’s cPanel details) to log in to the client’s account with reseller privileges.

API Token Permissions

API tokens in cPanel & WHM allow you to restrict the actions that an API token can perform.

To do this, you must grant the following permissions in WHM at Development » Manage API Tokens:

basic-whm-functionsbasic-system-infocpanel-apicreate-acctcreate-user-session
suspend-acctupgrade-accountkill-acctpasswdacct-summary
list-acctsshow-bandwidthcpanel-integrationlist-pkgsns-config
edit-mxmanage-api-tokensssl-gencrt
  • When creating an API token for the root user, you must also enable the viewglobalpackages permission.
  • When using the Configurable Package Addon, you must also enable the edit-account permission.
  • When creating reseller products, you must enable the Everything permission. The reseller API functions on cPanel & WHM servers require root access.

Keep DNS Zone on Termination

When terminating a cPanel & WHM account via the WHMCS Admin Area, select Keep DNS Zone to retain the associated DNS zone record. You may wish to use this, for example, when performing an account migration with DNS forwarding.

You cannot recreate a new account on the server using the same domain while the DNS zone exists. You must delete it before you can successfully provision a new account.

Disable Two-Factor Authentication

For the cPanel module to function when Two-Factor Authentication (2FA) is enabled for your account, you must disable the 2FA requirement for API requests.

To do this:

  1. Log in to WHM as the root user.
  2. Go to Security Center > Configure Security Policies.
    The Configure Security Policies interface in WHM.
  3. Uncheck API requests.
    Security Policy Extensions section.
  4. Click Save.

Add-On Features

In WHMCS 8.2 and later, in addition to WHMCS’s existing product addon functionality (now an Independent Product), you can create an Add-On Feature. These addons let you sell module-specific features that are available through cPanel & WHM and Plesk, like WP Toolkit or, in WHMCS 8.10 and later, Sitejet Builder.

For more information, see Product Addons.

Troubleshooting

You can find information about most hosting server and provisioning issues by reviewing recent messages at Utilities > Module Queue and in Module Log at Configuration () > System Logs.

For more information, see Troubleshooting Servers.

You may encounter the following common issues with cPanel & WHM servers:


Error or IssueCauseNext Steps
Access Denied/Permission DeniedThe cPanel & WHM or WP Squared server denied WHMCS access to perform the requested action.Access Denied Errors
Action Failed Unable to auto-login. Please contact supportThe username under the client’s Products/Services tab is empty.Action Failed Errors
Sorry, a group for that username already existsAn account with this username already exists on the server.Group Already Exists Errors
Invalid value paper_lantern for the cpmod settingThe product configuration in WHMCS specifies a cPanel theme that does not exist on your cPanel server.Invalid cpmod Errors
Key Generation Failed: (XID xxxxxx) You do not have the feature “sslmanager”The cPanel hosting account does not have the required SSL/TLS-related permissions.Key Generation Failed Errors
This module requires a cPanel & WHM server with a valid license and the 'Standard' server profile. or This module requires a WP Squared server with a valid license and the 'WP Squared' server profile.You are attempting to use a server that does not run the correct control panel or does not have a valid license.License Profile Errors
Login FailedYour server configuration is incorrect or brute force protection settings are preventing access to the cPanel API.Login Failed Errors
No user name supplied: username is a required argumentThe username under the client’s Products/Services tab is empty.Missing Username Errors
The Package menu does not include all of the packages on your server.Package use would exceed the reseller’s quotas on their WHM account.Missing WHM Packages
WHM Username is missing for the selected serverThere is a server balancing misconfiguration.Missing WHM Username Errors
Registrar Error or CURL Error: 56 - OpenSSL SSL_read: Success or CURL Error: 56 - OpenSSL SSL_read: error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading, errno 0System updates in EasyApache 4 are causing errors.OpenSSL Registrar Errors
Package Not Allowed or Exceeded Resource/Account AllocationYou only have reseller access to your server and are trying to create an account without a valid package name.Package Not Allowed Errors
You do not have permission to use Selected PackageThe package name in WHMCS does not exactly match the package name in WHM.Package Permission Errors
Product attribute Package Name XXX not found on serverThere are insufficient resources to create an account with this package, you entered the package name incorrectly, or an API token has insufficient permissions.Product Attribute Errors
Resellers are not permitted to create subdomains of the server's main domainThe domain is missing from the service configuration.Reseller Subdomain Errors
Sorry, that username is reservedThe username for the new account contains a prohibited word.Username Reserved Errors
Failed to load module “WpToolkitCli”: The system failed to load the module Cpanel::API::WpToolkitCli because of an error: Can't locate Cpanel/API/WpToolkitCli.pm in @INC (you may need to install the Cpanel::API::WpToolkitCli module)The required WP Toolkit module does not exist on your cPanel & WHM server.wptoolkitcli Errors

Last modified: 2025 February 13