Skip to content

Documentation

cPanel and WHM

cPanel is the panel your customers sign in to; WHM is the panel above it, and that is where Provibr connects. There is no operating system to install and no machine to boot. An account is created on a server that is already running, given a package, and later suspended, moved to another package or removed.

What you need

A WHM API token, not a password and not a cPanel login. You create it in WHM itself, and it travels as an ordinary header on every call the agent makes.

  • Host: the address of WHM, including https. Leave the port out and Provibr fills in 2087.
  • WHM user: the account the token belongs to, usually root.
  • API token: created under Manage API Tokens in WHM, and shown to you once.
  • TLS fingerprint: optional, and on a cPanel server you normally leave it empty. The section below says why.
shell
openssl s_client -connect <host>:2087 </dev/null 2>/dev/null | \
  openssl x509 -noout -fingerprint -sha256
Commands and terminal output are in English everywhere, in the panel and in these pages. One text, one truth: what you read here is literally what your host will print back.
The address has to be https, unlike DirectAdmin and Pterodactyl where a plain-text panel is accepted with a warning. WHM answers on 2086 without encryption and on 2087 with it, and Provibr accepts only the second. What travels over that connection is not one account's key but a token that may create and delete every account on the machine.

Creating the token

The token is made in WHM, by the user it will belong to. Provibr never sees it again after you save it: it is pushed once to your agent and sealed in that agent's vault, and the platform keeps only the field names.

  1. Sign in to WHM as the user the token should belong to, usually root.
  2. Open Development and then Manage API Tokens.
  3. Generate a token and give it a name that says it belongs to Provibr, so you can recognise it later when you want to withdraw it.
  4. Copy the token before you leave the page. WHM shows it once and cannot show it again; losing it means creating a new one.
A token with every function selected is root on that machine. Restrict it to what the integration actually calls: reading the version, the accounts, the packages, the bandwidth and the domains, and creating, suspending, resuming, repackaging and removing accounts. A call the token is not allowed to make fails with the reason WHM gives, and that is a better outcome than a token that may do everything.

The certificate

Port 2087 is the encrypted one, and a cPanel server usually carries a certificate from a public authority that the panel renews by itself, roughly every ninety days. In that ordinary case the fingerprint field stays empty and the agent verifies the certificate the way a browser would.

Pinning a certificate that renews every ninety days means re-pinning it every ninety days. An integration that stops working four times a year is worse than the problem it was meant to solve, so leave the field empty unless you have a reason not to.

Fill it in only when the server presents a certificate no public authority vouches for, which in practice means your own internal certificate authority. Take the fingerprint from the agent host, so you are fingerprinting exactly what the agent will see, and take it again whenever that certificate is replaced.

Settings

There are none. A WHM decides for itself which machine an account lands on and which address it gets, so there is nothing left for you to choose. The settings tab still exists, because that is also where you resend credentials.

Hosting packages

A WHM package is the panel's own description of an account: disk quota, monthly bandwidth, how many subdomains and mailboxes, which feature list. It is not a Provibr plan and not an operating system. It is a name we refer to, and what is in it can change on your server without us noticing.

The integration page can read the list of packages with what is in them, so you pick from what your server really has rather than typing a name from memory. Packages are made in WHM; Provibr does not create them.

A web plan pins one package on one integration and gives it a name of your own. Ordering with a plan beats picking a loose package, and the loose picker stays available for the cases a plan does not cover.

A limit a package leaves out is not a limit of zero but no limit at all. The default package that ships with WHM has neither a disk quota nor a bandwidth limit, and that is an unlimited package rather than a broken one.

Whether a disk quota is enforced at all

A cPanel server only enforces disk quotas when the filesystem the accounts live on carries quota support. Without it WHM accepts the package, accepts the number, and enforces nothing.

The symptom is quiet. Move an account to a package with a two-gigabyte quota and the account keeps reporting its limit as unlimited: nothing failed, nothing was refused, and the number in that package means nothing on that machine.

The connection test reports this. It reads the accounts on the server and says whether their quotas are really being enforced, next to the WHM version and the counts. On a server without accounts there is nothing to measure, and it says that rather than guessing.

It is also why Provibr reads the disk limit from the account and not from the package. What the account reports is what is in force; the number in the package is what somebody intended.

Switching quotas on is work on the server rather than in Provibr: the filesystem has to be mounted with user quotas and the accounts rescanned. What that takes depends on the filesystem and on how the machine was installed, so your hosting provider or the cPanel documentation is the place for it.

What an account looks like in Provibr

A hosting account is an ordinary server row of the type webserver. Its identifier is the cPanel username, and its main domain, package, disk usage and bandwidth come along on every poll.

  • Creating an account needs a username, a main domain, a contact address, a package and a password.
  • Usernames follow WHM's own rule: starting with a letter, then letters and digits, at most sixteen characters. No hyphens and no underscores.
  • The password is not recorded anywhere. Only the fact that you supplied one is; the value travels separately.
  • Afterwards you can suspend, resume, change the package and delete. There is no console, because a hosting account does not have one.
  • No result is trusted on its own word. WHM confirms a change with a page of process output rather than with the new state, so every change ends by reading the account back.
Capitals are the one to watch. Type MyClient and WHM creates myclient, reports success, and never mentions it. An identifier that no longer matches the server would make the account disappear from the panel on the next full poll, so Provibr lowercases the name before sending it and records the name the server gave back.

Adopting accounts that already exist

The import tab lists the accounts on the panel and lets you take the ones you want into Provibr. Accounts already known are shown but cannot be selected again, so you see the whole picture rather than a filtered one.

Imported accounts count towards your capacity exactly like accounts you ordered. Import more than you have room for and an overage opens, with the usual grace period.

Usage

Disk usage and bandwidth ride along with the regular poll, so an account gets a usage graph without anything extra being switched on. Bandwidth is a monthly total that the server resets itself, so it is shown as a number on the account rather than as a line on the graph.

Right after a package change the account reports its new package immediately and its new bandwidth limit a few minutes later. The name is authoritative straight away and the number catches up on a later poll; the two disagreeing for a moment is not a fault.

Worth knowing

  • Managing the server itself does not exist. Provibr creates, changes and removes accounts on a WHM you operate; the services, DNS zones, mail routing and the panel's own settings stay where they are.
  • There is no console. A hosting account is not a machine, so there is nothing to attach a terminal to.
  • Mailboxes, databases and DNS inside an account belong to cPanel. Provibr creates the account and hands it over; what happens inside it is between your customer and the panel.
  • Reseller accounts are not modelled. Provibr talks to WHM as one operator, and a token owned by a reseller sees a smaller world than root does, and that case has not been measured and is not described here.