Skip to content

HostBill

The VirtConsole module for HostBill automates the instance lifecycle from order to termination. It covers:

  • Creation
  • Suspension and unsuspension
  • Termination
  • Package upgrades. Downgrades error where the storage size would shrink.
  • A Control Panel SSO widget that gives customers a one-click login into the panel
  • A working panel with at least one instance plan. See Quick setup.
  • A billing API token, generated on the management server with vcli api:billing-token generate. See API tokens.

The module is open source. Download the latest HostBill module archive from the VirtConsole package host at https://packages.virtconsole.com/, unzip it and copy the contents into the Hosting modules directory of your HostBill installation, for example /home/hostbill/public_html/includes/modules/Hosting.

Your module path should look like /home/hostbill/public_html/includes/modules/Hosting/hypervisorio/class.hypervisorio.php.

In the HostBill admin area, add a server and select the VirtConsole provisioning module. Fill in:

Field What to enter
Hostname Your management server hostname.
API Token The billing API token generated with vcli api:billing-token generate. See API tokens.
Secure Always tick this.

Use Test Connection to confirm HostBill can reach the panel before you assign the server to a product.

On the product’s module settings, the module loads its dropdowns live from the management server:

Setting Purpose
Plan Any instance plan from your management server.
Hypervisor Region/Group Instances deploy onto an available hypervisor from this group.
Hypervisor A specific hypervisor. Used when Override Group to selected Hypervisor is ticked.
Override Group to selected Hypervisor Tick to skip the group and deploy on the hypervisor selected above.

When an order provisions, the module finds or creates the panel user by the customer’s email address, then creates the instance with the product’s plan and target. If the product collects a domain or hostname at order time, that value becomes the instance hostname. The module stores the instance ID, the panel user ID and the instance’s primary IP on the account.

HostBill does not expose instance management controls itself, so the module ships a Control Panel SSO widget instead. On the customer’s service page the widget shows a Virtual Machine Access card with the IP address, the plan and the service status, plus a Launch Control Panel button while the service is active. The button signs the customer straight into the user panel with SSO to manage the instance.

Power control, reinstall and other instance actions are not offered inside HostBill; customers use the panel for those after the SSO login.

  • Test Connection fails. Confirm the hostname resolves to your management server, the Secure box is ticked, and the API token was generated on that same server and is not IP-restricted to a different address.
  • Provisioning fails with an authentication error. The API Token on the server is wrong, disabled, or IP-restricted to a different address than the HostBill server. Generate a fresh token with vcli api:billing-token generate using the HostBill server’s IP.
  • Upgrade fails with a storage error. The new plan’s disk is smaller than the current one. Disk shrinks are refused; move the customer to a plan with an equal or larger disk.
  • The Control Panel SSO widget shows an error. The panel cannot be reached from the HostBill server, or the stored instance no longer exists. Check the hostname and the instance on the panel.

For panel-side issues, see the FAQ.