W H M C S M O D U L E
N E T W O R K S

WELCOMES YOU!!

WHMCSModule Networks - Documents

Category - Leaseweb Modules

Leaseweb VPS Module Installation WHMCS

This guide covers installing the module suite, connecting your Leaseweb account(s), creating your first product, and — if you're coming from the older "Leaseweb VPS" module — migrating your existing products and services across.


1. Requirements
  • WHMCS 8.x or later
  • PHP 8.2 or later, with the cURL extension enabled
  • A Leaseweb account with API access (an API key generated from the Leaseweb Customer Portal)
  • A valid license key for this module

2. Obtaining required API credentials**
  1. Visit the URL "https://secure.leaseweb.com/" and log in with your credentials.
  2. Go to the "Administration ()" section in left side menu and select the “API Key” tab, or go directly to "https://secure.leaseweb.com/api-client-management/".
  3. Click on "Add API Key" Provide your WHMCS server IP address within "Whitelisted IP's" text box and also provide a reference name, then click on Update to activate it
  4. Copy the API Key

3. Package Contents

The download contains two modules that work together and must both be installed:

modules/
├── servers/leaseweb_vps/     ← Provisioning module (service lifecycle, client dashboard)
└── addons/leaseweb_vps/      ← Addon module (accounts, catalog, orders, admin console)

Both are required. The addon module owns account management; the provisioning module cannot function without it.


4. Installation
  1. Upload the entire contents of the modules/ folder from the package to the root of your WHMCS installation, merging with your existing modules/ folder. This places both modules/servers/leaseweb_vps/ and modules/addons/leaseweb_vps/ correctly.
  2. In the WHMCS Admin Area, go to Setup > Addon Modules.
  3. Find Leaseweb VPS Manager in the list and click Activate.
    • Activate the addon before creating any products — it requires for the provisioning module depends on, and product setup will not work correctly without it.
  4. Click Configure on the same row and grant access permissions to the admin roles that should be able to use the addon's pages, then Save.
  5. Go to Addons > Leaseweb VPS Manager to open the module's admin console.

5. Initial Configuration — Adding a Leaseweb Account

Every product connects to Leaseweb through an "Account" — one Leaseweb API key, tied to one Leaseweb datacenter region.

  1. In the addon, go to Accounts > Add New Account.
  2. Fill in:
    • Name — any label to identify this account internally (e.g. "Amsterdam Reseller").
    • API Key — generated from the Leaseweb Customer Portal.
    • Region — select the Leaseweb datacenter location this API key/account is scoped to (Amsterdam, Frankfurt, London, Montreal, Singapore, Sydney, Tokyo). If your account's location isn't listed yet, choose Other... and enter a custom label — note that accounts with a custom region cannot browse or import from the live plan catalog until a real location is set.
  3. Click Test on the saved account to confirm the API key is valid and reachable before using it on any product.

Add one account per Leaseweb customer account / region you sell from. A product is always tied to exactly one account, and that account's region is used automatically everywhere — there is no separate location field to keep in sync.


6. License Activation
  1. Go to Addons > Leaseweb VPS Manager > License (or enter it from Setup > Addon Modules > Configure — the field is masked to its last few characters once saved, for security).
  2. Enter your license key and click Activate.
  3. The License page also shows whether a newer version of the module is available.

7. Creating a Product
Option A — Import a Plan (recommended)

The fastest way to get a sellable product live:

  1. Go to Addons > Leaseweb VPS Manager > VPS Plans.
  2. Select the Leaseweb Account whose catalog you want to browse (its region is used automatically).
  3. Find the plan you want to sell and click Import.
  4. Choose a Product Group, enter a Product Name, and set a Price Markup (%) to add on top of Leaseweb's own price.
  5. Click Import. WHMCS creates the product, applies sensible defaults (see below), and immediately syncs its description, pricing, and configurable options (disk upgrade, operating system, control panel) from the live plan.
Option B — Manual Product Setup
  1. Go to Setup > Products/Services > Products/Services > Create a New Product, choose a Product Group and Product Type ("Server/VPS"), and save.

  2. On the Module Settings tab, select Leaseweb VPS as the module, then configure:

    Virtual Server Configuration

    • Leaseweb Account — which account (and therefore region) this product provisions from.
    • VPS Plan — the specific plan to sell, loaded live from that account's catalog.
    • Price Markup (%) — added on top of Leaseweb's own price.
    • Snapshots Allowed — how many snapshots a client may keep at once.
    • Reference Prefix — used to generate a VPS hostname when a service has no domain set.
    • Firewall Rule Limit — maximum firewall rules a client may create.
    • Default Reverse DNS Template — applied automatically when a client clears a reverse DNS entry.

    Client Area Features — independent show/hide switches per dashboard tab: Network, Traffic, Reinstall, Recovery, Snapshots, Firewall, Notifications, Logs, and VPS Name (whether clients may rename their own VPS — administrators can always rename it regardless of this setting).

  3. Save. Configurable Options (disk upgrade, operating system, control panel) are synchronized automatically from the selected plan, each priced with the same markup as the base plan.


8. Migrating from the Previous "Leaseweb VPS" Module

If you were previously using an older, separately-built "Leaseweb VPS" module, this suite includes a migration tool so your existing products and customers move across without losing order history or requiring re-provisioning.

What migration does:

  • Converts the product in place — same product ID, same order and renewal history, same customers.
  • Automatically relinks every existing (non-cancelled) service on that product to its VPS, using the identifier the old module had already stored for it. No manual re-linking needed for services that have a clear match.
  • Applies the same defaults a freshly imported plan would get (snapshot allowance, reference prefix, firewall limit, reverse DNS template, all Client Area tabs enabled) — these can be changed afterward like any other product.
  • Syncs pricing and configurable options from the plan you select, the same as a fresh import.

Steps:

  1. Go to Addons > Leaseweb VPS Manager > Product Migration. This page lists every product on either the old or the current module, with its status.
  2. Find the legacy product (marked Leaseweb VPS (Legacy)) and click Migrate.
  3. Select:
    • Leaseweb Account — the account this product should use going forward (its region is applied automatically).
    • VPS Plan — the current catalog plan that matches what this product sells, used for pricing/configurable-option sync.
    • Price Markup (%) — recalculated markup for this product.
  4. Click Migrate. You'll see a confirmation showing how many existing services were automatically relinked out of the total on that product.
  5. If any services were not automatically relinked, they had no matching VPS identifier on record under the old module. Link them manually from Addons > Leaseweb VPS Manager > VPS Instances by finding the VPS and using the assign/import action against the correct client's service.
  6. After migrating, open the product's Module Settings once to confirm everything saved as expected, and verify the Status column on the Product Migration page now shows Configured.

Before migrating a product with active customers, we recommend migrating one lower-traffic product first, confirming a client's dashboard loads correctly and the VPS actions work, then proceeding with the rest.


9. Upgrading (v2.14.x aftermath)

To upgrade to a newer version, simply overwrite the modules/servers/leaseweb_vps/ and modules/addons/leaseweb_vps/ folders with the new package contents — no manual database steps are required. The addon automatically checks and updates its database tables on the next admin page load after an upgrade. Existing accounts, products, and activity history are always preserved.


10. Uninstalling
  1. Deactivate Leaseweb VPS Manager under Setup > Addon Modules. This preserves all data (accounts, activity history, license) in case you reactivate later.
  2. Remove the modules/servers/leaseweb_vps/ and modules/addons/leaseweb_vps/ folders.
  3. To permanently remove all stored data, also drop these database tables: mod_leaseweb_vps_*,. Only do this if you are certain you will not reinstall — this cannot be undone.

11. Troubleshooting
  • "The Leaseweb VPS provisioning module was not found" — the addon is activated but modules/servers/leaseweb_vps/ is missing or was not uploaded. Re-check step 3 of Installation.
  • Connection test fails on an Account — double-check the API key was copied in full from the Leaseweb Customer Portal, and that the key has API access enabled.
  • VPS Plans / Product Migration shows no plans, or "This account's Region Label is not a Leaseweb ordering location" — the account's Region is set to a custom label rather than a real Leaseweb location. Edit the account and pick one of the listed regions instead of "Other...".
  • Invalid License/Directory/Domain/IP — Make sure you re-issued the license.
  • A client reports missing dashboard tabs or a missing VPS Name field — check the product's Module Settings > Client Area Features section; each tab is an independent on/off switch.
Hello!
Swity AI Assistant