Installing WHMCS
This module provides the core functionality to automate the creation, suspension, and termination of hosting subscriptions on LxRoot directly from your WHMCS instance.
Installation
- Unzip the module archive into the directory:
modules/servers/LxRoot.Note: The directory must be named 'LxRoot' exactly.
- Log in as the user under which WHMCS runs (do not use root).
- Navigate to the api directory within the module and run:
composer install
If Composer is not installed globally, download composer.phar to the directory and run:
php composer.phar install
Upgrading
- Remove the existing module directory from
modules/servers/LxRoot. - Unzip the new version into the same directory.
- Re-run
composer installin the api directory.
If updating from a version prior to 1.1.0, the subscriptionId custom field has changed to LxRootSubscriptionId. You may need to manually update existing subscriptions in WHMCS.
Configuration
- Create a SuperAdmin access token via the LxRoot control panel. Save the Token and your orgId.
- In WHMCS, navigate to System Settings > Servers and click Add New Server.
- Fill in the following details:
- Name: Any descriptive name (e.g., LxRoot Cluster).
- Hostname: Your control panel domain (without http/https).
- Username: Your LxRoot orgId.
- Access Hash: Your generated Access Token.
You only need to add your Control Panel server. Actual website placement is handled automatically by the LxRoot orchestration layer based on your server groups.
Technical Logic
Multiple Subscriptions
When a client's first subscription is created, a custom field lxrOrgId is generated. Subsequent purchases are added to this same organization, allowing the client to manage all packages under a single login.
Website Creation
The module attempts to provision the website immediately. If the site creation fails, WHMCS marks it as "Failed," even if the organization, login, and subscription were successfully established.