Skip to content

WHM / cPanel and FOSSBilling

FOSSBilling connects to WHM using its API. Here's how to set up an API token:

  1. Log in to WHM and go to DevelopmentManage API Tokens
  2. Click Generate Token
  3. Give the token a friendly name (like "billing")
  4. Review the permissions. The defaults are usually fine, but make sure you understand the access you are granting
  5. Click Save
  6. Important: Copy the token now — WHM won't show it to you again

Need more help? See the WHM API documentation.

  1. Log in to your FOSSBilling admin panel
  2. Go to SystemHosting plans and servers
  3. Switch to the New server tab
  4. Fill in the name, hostname, IP address, and nameservers
  5. Select WHM (cPanel) from the Server manager dropdown
  6. Enter the WHM root username (not the API token name)
  7. Paste the API token you created earlier
  8. Click Add server to save

When a customer orders a hosting plan, FOSSBilling first checks if WHM has a package with the same name. If it doesn't find one, it creates the package using the details from FOSSBilling.

Section titled “Option 1: Create packages in WHM (Recommended)”

This is the simpler approach and keeps package definitions under your normal WHM workflow:

  1. Create the package in WHM under the account FOSSBilling uses to connect
  2. Configure limits and features as you normally would
  3. Create a matching plan in FOSSBilling with the exact same name

Accounts will follow WHM's limits — the FOSSBilling plan details don't matter as long as the name matches.

If you want FOSSBilling to automatically create packages:

  1. Create the hosting plan in FOSSBilling with your desired limits
  2. Add any optional parameters in the Hosting plan additional parameters section
NameExampleDescription
cgi1 or 0Enable CGI access
cpmodjupitercPanel theme
maxlstunlimited, null, or 250Maximum mailing lists
hasshell1 or 0Allow shell access