WebGee DocsDocs
Reseller Hosting

Add a server to WHMCS

Connect your WHMCS installation to a WebGee reseller or VPS server using a WHM API token, so it can create and manage cPanel accounts automatically.

Connect WHMCS to your hosting server so it can create, suspend and terminate cPanel accounts automatically when customers order. Applies to reseller accounts and to VPS or dedicated servers with WHM.

Use an API token, not your WHM password. A token can be revoked on its own and restricted to specific IP addresses, and it does not change when you rotate your password.

1. Generate an API token in WHM

  1. Sign in to WHM.
  2. Go to Development → Manage API Tokens.
  3. Select Generate Token.
  4. Name it something identifiable — whmcs — and select the privileges it needs.
  5. Copy the token.

The token is shown once. If you navigate away without copying it, you must generate a new one.

Restrict the token to your WHMCS server's IP address while you are here — see Restrict WHM API tokens by IP. A token that works from anywhere is a standing key to your whole server.

2. Add the server in WHMCS

  1. In the WHMCS admin area, go to Setup → Products/Services → Servers.

  2. Select Add New Server.

  3. Fill in:

    FieldValue
    NameAnything identifiable, e.g. webgee-uk-1
    HostnameThe server's hostname
    IP AddressThe server's main IP
    Assigned IP AddressesThe IPs available to accounts on it
    TypecPanel
    UsernameYour WHM username — root on a VPS, your reseller username otherwise
    Access Hash / API TokenThe token from step 1
  4. Leave Password empty. It is not used when a token is supplied.

  5. Tick Secure to connect over SSL, and set the port to 2087.

3. Test the connection

Select Test Connection before saving. WHMCS reports success or the exact error.

Save only once the test passes — saving a server that cannot connect means orders fail at provisioning time, after the customer has paid.

If the test fails

  • Invalid username or token — the username must match the account the token was generated under. A token made under root does not work with a reseller username.
  • Connection refused or timeout — port 2087 is blocked between your WHMCS server and the hosting server, or the token is IP-restricted to a different address.
  • Access denied — the token lacks a required privilege. Regenerate it with account creation and management permissions.

On this page