Servers & Modules¶
Provisioning — automatically creating a hosting account when an order is paid — is one of the most valuable things PNLCS does. This page explains how it works.
Server¶
A server in PNLCS is a record describing a machine where customer accounts live: its hostname, port, and API credentials. You add servers under Setup → Servers.
Some types have settings of their own on the server form. A Proxmox VE server, for example, has its Node (empty = the least busy node), a Resource pool, and an optional First VM id / Last VM id range that keeps customer machines apart from your own. See Connect a Server.
Module¶
A module is the code that knows how to talk to a particular control panel or provider's API. PNLCS ships with these server modules:
| Module | What it provisions |
|---|---|
| Panelica | Accounts on a Panelica hosting panel |
| Panelica Licenses | Panelica licenses, sold with a Panelica partner account (guide) |
| cPanel/WHM | WHM/cPanel accounts |
| Plesk | Plesk subscriptions |
| DirectAdmin | DirectAdmin users |
| HestiaCP | HestiaCP users |
| aaPanel | Sub aaPanel accounts (needs aaPanel Pro) |
| Proxmox VE | Proxmox VMs / LXC containers (VPS) |
| Vultr | Vultr cloud instances (VPS) |
| Custom | No automation — you create accounts by hand |
When you add a server you pick its Server Type (which module handles it). A product then picks a Server Module, not a single server, and optionally a Server group. When the account is created, PNLCS chooses a server of that type: from the product's group if it has one, otherwise the first active server with that module that has not reached its Max Accounts. The service then stays on that server.
Setup → Modules lists every installed module (servers, payment gateways, registrars, SSL modules and addons), whether it is Built-in or Third-party, how much uses it, and a Switch off button: a module that is switched off is no longer offered for new servers or products, and what already uses it keeps working. See Modules.
A third-party module is a folder under modules/ with a pnlcs.json
manifest; PNLCS finds it by itself, and a built-in module of the same name
always wins. See Writing a module.
Server groups¶
If you have several servers of the same type, put them in a server group. A product can point at the group, and PNLCS picks a server from it, either filling one server at a time (Sequential) or giving each new account to the server with the fewest (Round Robin), and skipping servers that have reached their Max Accounts. When no server in the group has room, provisioning fails and is reported rather than using a server outside the group.
What the module does¶
For each service, the module can:
- Create the account (when the order is accepted, or at once if the product's Auto Setup says so)
- Suspend it (non-payment)
- Unsuspend it (payment received)
- Terminate it (cancellation)
- Change password and change package (upgrades/downgrades)
- Report usage (disk / bandwidth) back, checked every hour, for overage billing
Upgrades and downgrades¶
A customer moves a service to another package from its Upgrade /
Downgrade page. The product decides which packages are offered
(Upgrade packages), or keeps its customers where they are
(Customers can move to another package unticked). With the Panelica module, a package that gives less than the
account's plan does now can be chosen only when what the account has fits it:
apps, domains, email and FTP accounts, subdomains per domain and disk space,
counted the way Panelica counts them when something is created. A package that
does not fit is listed with what to remove first, and the move is refused,
through the API's upgradeproduct as well. When the account uses more memory
than a package allows, the customer is warned that their apps may be slowed
down or stopped there.
Panelica applies a plan's limits to what is created, not to what exists: a smaller plan removes nothing, and the account's apps share the smaller plan's CPU and memory. Staff can still change a service's product on its admin page.
Reliable provisioning¶
PNLCS only marks a service Active after the module confirms the account was created. If the module call fails (server down, bad credentials, quota full), the service stays pending, you get an alert, and the action is queued and retried automatically up to 5 times, with growing gaps (about 5, 5, 10, 20 and 40 minutes); after the last attempt it stops and you are alerted again. An error that can never come right (for example, no server module configured) is not retried at all, and the alert says so. Nothing silently shows "active" without a real account behind it. The service's admin page shows the server's answer and the next automatic try under Setup has not finished:; the customer is told only that setup is not finished yet and that there is no need to order again.
While ordering, a domain already set up on the server the order would go to is refused (checked with Panelica; a server that cannot be asked does not stop the order).
You can see what is waiting and retry; see Provisioning did not happen.
Panelica extras¶
Two features work with Panelica servers only, because they use parts of its API the other panels do not offer:
- Live Servers, on the admin dashboard, signs you in to any of your Panelica servers' control panels with one click. See Live Servers.
- Set Up on My Hosting, on a domain's page in the client area, adds the domain to the customer's Panelica hosting account and points its nameservers there. See Sell Domains.
Adding a server¶
Step-by-step: Connect a Server.
Which panel should I use?
PNLCS works with all the panels above. If you're still choosing, Panelica is a modern cPanel/Plesk alternative with built-in isolation (no CloudLinux) and universal migration.