CMP

Connectors for private networks

If a panel can't be reached from the internet, for example because it is on your office or data-centre network, run a connector inside that network. The connector is a small agent that collects the portal's requests and passes them to the panel:

Open Cloud accounts › Connectors. Owners and Admins can manage connectors.

Set up a connector

You need a Linux machine in the network that can reach the panel, with Python 3.8 or newer (installed on almost every distribution).

  1. Under Add a connector, enter a name, e.g. Mumbai office, and select Create connector.

  2. The page shows the install steps with your connector's token. Copy them now: the token is shown only once.

  3. On the machine, download the agent:

    sudo curl -fsSL https://<portal>/connector/cmp-connector.py -o /usr/local/bin/cmp-connector.py
    
  4. Create /etc/cmp-connector.json, then run sudo chmod 600 /etc/cmp-connector.json:

    {
      "portal": "https://<portal>",
      "token": "cmpc_…",
      "allow": ["https://10.0.0.5:4083", "https://10.0.0.5:4085"]
    }
    

    In allow, list each panel address the portal may reach, with its port. A Virtualizor client area is usually port 4083, and the admin panel 4085.

  5. Start it as a service, with the systemd unit shown on the page: sudo systemctl enable --now cmp-connector.

  6. Within a minute the connector shows Online, with the machine's name and the agent version.

  7. Connect your panel and, under Reach it, choose the connector.

One connector can serve every panel in its network. You can run separate connectors for separate networks.

Status

Status Meaning
Waiting for the agent The agent has never connected. Check the token and the portal address.
Online The agent connected in the last 90 seconds.
Offline since … The agent stopped connecting. Check that the service is running: sudo systemctl status cmp-connector.

What works through a connector

Everything the portal does through the panel's API: discovering servers, power actions, reinstalling, backups and the rest. The exception is the browser console: use the panel's own console, or SSH from your network.

Troubleshooting

Show the agent's log with sudo journalctl -u cmp-connector -f.

Delete a connector

Disconnect the cloud accounts that use it first, then select Delete. Its token stops working immediately, and you can uninstall the agent: sudo systemctl disable --now cmp-connector.

API

GET, POST /api/v1/organizations/{id}/connectors and DELETE …/connectors/{connector}. The token is returned only by the POST.