Skip to content

CWP and FOSSBilling

FOSSBilling integrates with CWP (Control-WebPanel) using its API. Here's how to set up the CWP API:

  1. Log in to your CWP server and navigate to CWP SettingsAPI Manager
  2. Click Allow new API access
  3. Give the API key a friendly name (like "FOSSBilling"), generate an API key, and enter your FOSSBilling server IP in the IP Origin field
    • You can enter % to allow any IP, but this isn't recommended for security reasons
  4. Leave Format Request set to JSON
  5. Assign these permissions to the API key (as of FOSSBilling 0.4.0):
    • Account: Add, Update, Delete, List, Suspend, Unsuspend
    • Account Details: List
    • Account Package Change: Update
    • Change Password: Update
  6. Copy the API key and save your changes

For more detail, see the CWP 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 for your server
  5. Select CWP from the Server manager dropdown
  6. Enter the API key you created earlier
  7. Click Add server to save

Because of CWP API limitations, FOSSBilling cannot create hosting packages for you automatically. You need to:

  1. Create your hosting plans (packages) directly in CWP first, setting all limits and capabilities there
  2. Create matching plans in FOSSBilling with the exact same name

If the names don't match exactly, FOSSBilling won't be able to create accounts with that package.