Skip to content

Connect CWP (Control Web Panel) servers

ClientFence creates, suspends and removes CWP accounts through the CWP API. You add each server once with an API key, then link your hosting plans to CWP packages.

  1. Sign in to the CWP admin panel and go to CWP Settings → API Manager.
  2. Select Allow new Api access and fill in the form:
    • Short Name: such as ClientFence.
    • Ip Origin: the IP address of your ClientFence server. Only this address is accepted.
    • Key code: select Generate and copy the key.
    • Owner: root.
    • Format Request: JSON.
    • API Functions: switch on the functions ClientFence calls: account (add, del, list, susp, unsp), accountdetail (list), changepack (update) and changepass (update).
  3. Select Create.
  4. Open port 2304 in the server’s firewall for the ClientFence server’s IP address.

See CWP’s API introduction and authentication.

  1. Go to System → Hosting Plans and Servers, stay on the Hosting Servers tab and select New Server.
  2. Fill in the form and select Add Server:
Field What to enter
Name Any name you know the server by.
Hostname The address of the CWP server, such as server1.example.com. ClientFence connects to it.
IP The IP address new accounts are created on. Required.
Server Manager CWP.
API Key The key from the API Manager.
Connection Port Empty uses 2304, the CWP API port.
Verify TLS Certificate Yes, unless the server uses a self-signed certificate.
Password Length Length of the passwords ClientFence makes for new accounts. Empty means 10.

The CWP API always uses HTTPS, so Use Secure Connection has no effect.

  1. Select Test Connection (the signal icon) on the server’s row. It lists the accounts through the API.

On the server’s edit page, Users Prefix adds a prefix to the user names ClientFence makes. Saved credentials are never shown again. To change one, enter a new value and save.

ClientFence cannot create CWP packages. Make each package in CWP first, then make a hosting plan on the Hosting Plans tab (New Plan) with exactly the same name. New accounts and plan changes use the CWP package of that name, with the limits set in CWP; the limits on the hosting plan’s page are not sent.

Then choose the server and the hosting plan in the product’s Configuration tab, under Hosting Settings. See Products.

Action What happens
Order activated Creates the account for the domain on the server’s IP, with a user name from the domain, a new password and the client’s email. With Reseller Hosting, as a reseller.
Suspend / unsuspend Suspends or unsuspends the account.
Cancel Deletes the account.
Change Hosting Plan Moves the account to the CWP package with the new plan’s name.
Change Account Password Changes the account password. Clients can do this on their service page too.
Sync with server Checks that CWP returns the account’s details.
Change Username, Change Domain, Change IP Not supported: the action stops with the message “CWP does not support …”.
Login to Control Panel (client) Opens the CWP user panel, https://<Hostname>:2083, where the client signs in (port 2031 for a reseller). There is no one-click sign-in.
Jump to control panel (staff) Opens https://<Hostname>:2083; Reseller control panel opens port 2031.

A new password reaches CWP on active, suspended and expired orders. While an order is not yet set up or is canceled, it is saved in ClientFence only.

  • The “CWP” server manager is not fully configured: fill in the IP, Hostname or API Key the message names.
  • Could not connect to the CWP server: check the Hostname, the Connection Port and that the firewall lets the ClientFence server reach port 2304.
  • The CWP server returned HTTP status … or an invalid JSON response: check the address, the port and that the key’s Format Request is JSON.
  • The CWP server returned an error: …: CWP refused the request and the rest is its own message, for example a wrong key, an Ip Origin that does not match or a function that is off for the key.
  • CWP did not return valid account details: the account is missing in CWP, or the key cannot list Account Details.

Failed order actions are listed under Orders → Failed actions. See Failed actions.