Configuring WHM / cPanel
Section titled “Configuring WHM / cPanel”FOSSBilling connects to WHM using its API. Here's how to set up an API token:
- Log in to WHM and go to Development → Manage API Tokens
- Click Generate Token
- Give the token a friendly name (like "billing")
- Review the permissions. The defaults are usually fine, but make sure you understand the access you are granting
- Click Save
- Important: Copy the token now — WHM won't show it to you again
Need more help? See the WHM API documentation.
Adding a WHM server to FOSSBilling
Section titled “Adding a WHM server to FOSSBilling”- Log in to your FOSSBilling admin panel
- Go to System → Hosting plans and servers
- Switch to the New server tab
- Fill in the name, hostname, IP address, and nameservers
- Select WHM (cPanel) from the Server manager dropdown
- Enter the WHM root username (not the API token name)
- Paste the API token you created earlier
- Click Add server to save
Hosting plans with WHM and FOSSBilling
Section titled “Hosting plans with WHM and FOSSBilling”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.
Option 1: Create packages in WHM (Recommended)
Section titled “Option 1: Create packages in WHM (Recommended)”This is the simpler approach and keeps package definitions under your normal WHM workflow:
- Create the package in WHM under the account FOSSBilling uses to connect
- Configure limits and features as you normally would
- 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.
Option 2: Let FOSSBilling create packages
Section titled “Option 2: Let FOSSBilling create packages”If you want FOSSBilling to automatically create packages:
- Create the hosting plan in FOSSBilling with your desired limits
- Add any optional parameters in the Hosting plan additional parameters section
Additional Parameters
Section titled “Additional Parameters”| Name | Example | Description |
|---|---|---|
cgi | 1 or 0 | Enable CGI access |
cpmod | jupiter | cPanel theme |
maxlst | unlimited, null, or 250 | Maximum mailing lists |
hasshell | 1 or 0 | Allow shell access |