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.
  3. Uncheck API requests.
  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.

Last modified: May 29, 2024