Documentation
Server Managers in FOSSBilling
CWP and FOSSBilling

Integrating FOSSBilling with CWP

Configuring CWP

FOSSBilling is integrated with CWP (Control Web Server) using it's API. We will briefly describe how to setup the CWP API, however if needed you can view the CWP API documentation (opens in a new tab).

  1. First, login to your CWP server and navigate to the API Manger module (CWP Settings -> Api Manager)
  2. Click on the Allow new API access button
  3. Give the API key a friendly name (such as FOSSBilling), generate an API key (Key code), and enter your FOSSBilling server IP in the IP Origin field.
    • You may optionally enter % to allow any IP address to connect to your CWP API, however this is discouraged for security reasons.
  4. Leave the Format Request option set to JSON
  5. Assign the following permissions to the API key (as of FOSSBilling 0.4.0):
    1. Account: Add,Update,Delete,List,Suspend,Unsuspend
    2. Account Details: List
    3. Account Package Change: Update
    4. Change Password: Update
  6. Copy the API key you've generated and save the changes.

Adding a CWP server to FOSSBilling

  1. Login to your admin panel.
  2. Go to Configuration -> Hosting plans and servers from within the side panel.
  3. Go to the "New server" tab and fill out the name, hostname, and IP address, and nameservers for your server.
  4. Select the Server manager drop down and select CWP from the drop down.
  5. Enter the API key you created in the previous steps
  6. Click the add server button to save your settings and add the server to FOSSBilling.

Hosting plans with CWP and FOSSBilling

Due to technical limitations between FOSSBilling and CWP, FOSSBilling cannot create hosting packages automatically. Because of this, you should first create the hosting plans (packages) you want to use from withing CWP and define the limitations and capabilities you want it to have there, as FOSSBilling will be unable to change or define them.

Once you've created the package within CWP, you should then create it within FOSSBilling, ensuring that the package name matches exactly between the two. If it doesn't match, FOSSBilling will be unable to create accounts with that package.