Blesta module for Jabali Panel
Last updated
The Jabali Panel module for Blesta creates, suspends, upgrades and cancels hosting accounts on Jabali Panel. Clients get an Actions tab where they can change their password and log in to the panel with one click. It signs every request with an automation token, so Blesta never stores a panel admin password. Billing integrations covers how the API, scopes and ports work.
Requirements
- Blesta 5.x
- PHP 7.4 or newer with the
curlandjsonextensions - The Blesta server can reach the panel on
8443, or on443with the port 443 option turned on - An automation token with
read:status,read:users,read:packages,write:usersandwrite:domains, plusdelete:usersfor cancellation. See Create an automation token.
1. Install the module
Copy the blesta folder from the repository into Blesta as components/modules/jabali/:
git clone https://github.com/shukiv/jabali-billing-modules.git
cp -a jabali-billing-modules/blesta /var/www/blesta/components/modules/jabali
Replace /var/www/blesta with your Blesta directory. The folder must be named exactly jabali. Copy all of it, including apis/lib/, which holds the API client.
Then, in Blesta, go to Settings → Company → Modules → Available and install Jabali Panel.
2. Add a server
Open the module and click Add Server:
| Field | Value |
|---|---|
| Server Label | Any name, e.g. Jabali EU-1 |
| Panel Hostname | The panel hostname, e.g. panel.example.com |
| Panel Port | 8443, or 443 if the panel admin turned on Also serve the API on port 443 |
| Automation Token ID | The automation token’s ID |
| Automation Token Secret | The automation token’s secret |
| Account Limit | Optional cap on accounts for this server |
Blesta checks the connection when you save. If saving fails, the credentials are wrong, the panel is unreachable, or the two clocks differ by more than 5 minutes.
3. Create a package
Create a Blesta package with the module set to Jabali Panel, then choose the panel’s hosting package:
- Jabali Package: a dropdown of the panel’s packages. It needs the
read:packagesscope. - Package ID (manual override): if the dropdown is empty, choose — set below manually — and paste a package ID here.
What the module does
| Blesta action | What happens on the panel |
|---|---|
| Add service | Creates the account on the package’s hosting package and creates the order’s domain |
| Suspend / Unsuspend | Suspends or reactivates the account |
| Cancel | Deletes the account and its domains (needs delete:users) |
| Change package | Moves the account to the new package’s hosting package |
| Client Actions tab | Change Password, and Log in to Jabali Panel, which opens the panel with a single-use login link |
The login button only appears when the panel supports one-click login. When the panel is unreachable, Blesta hides it.
Service fields. Clients enter the domain when they order. Staff adding a service by hand can also set the username, password and email. The module stores the panel user ID with the service as jabali_user_id.
Usernames. If none is given, the module builds one from the domain: lowercase letters and digits only, leading digits removed, padded to at least 3 characters and cut to 16. A username you enter must be 3 to 32 characters, start with a letter and contain only lowercase letters and digits.
Passwords. The panel needs at least 10 characters. If the order has no password, the module generates one that is long enough.
Email tags. Welcome and other service emails can use these tags:
| Level | Tags |
|---|---|
| Module | host_name |
| Package | package_id |
| Service | jabali_username, jabali_password, jabali_domain, jabali_email, jabali_user_id |
Troubleshooting
Module calls are logged in Tools → Logs → Module.
| Symptom | Fix |
|---|---|
| Server won’t save | Wrong token ID or secret, panel unreachable on that port, or clock skew. Sync both servers with NTP. |
Add service fails with scope_denied | The token lacks write:domains or write:users. See scopes. |
| Package dropdown is empty | The token lacks read:packages. Add it, or use the manual override field. |
| ”The password must be at least 10 characters long” | Enter a longer password, or leave the field empty so the module generates one. |
| No Log in to Jabali Panel button | The panel is older than one-click login, or Blesta could not reach it. |
More causes are in Billing integrations: Troubleshooting.