Vultr WHMCS Module

Published on: Tue, Mar 8, 2016 at 12:34 pm EST
FAQ

Please read this document in full before you install the Vultr WHMCS Module

Module Information

  • Version: 1.7.0 (Updated)
  • Release Date: April 30th 2018

Change Log

  • April 30 2018
    • Support for WHMCS 7.5 and PHP versions 7.1 and 7.2 with ionCube 10.x
    • Improved Page Load Times in the WHMCS Admin Area

Table of Contents

  • System Requirements
  • Prerequisites
    • Notes
  • Limitations
  • Scope
  • Module Features
  • Creating an API Key
  • Installation
    • New Installation
    • Upgrade form an older version of the module
    • Directory Hierarchy
      • Downloaded Archive
  • First Setup
  • Module Configuration
    • Product Creator
    • Products
    • DNS
    • Server Location
    • Snapshots
    • ISO
  • Ordering Process
  • FAQ

Introduction

The Vultr platform offers a powerful, feature-rich API that allows users to control every aspect of their account. The Vultr WHMCS Module provides hosting providers with a fully automated solution that allows them to offer reliable Cloud Servers on the Vultr Platform to their customers.

Note: The current version of the module is a complete rewrite of the original module, but is compatible with existing Vultr-based products in WHMCS.

System Requirements

  • WHMCS version 7.2.x or newer
  • PHP version 7.0.x or newer
  • MySQL 5.6, MariaDB 5.6, MariaDB 10.0, or MariaDB 10.1.
  • ionCube Loader.

Prerequisites

  • Vultr API Key
  • Your WHMCS Server IPs being whitelisted for API Access
Notes
  • You must whitelist your WHMCS Server’s IPv4 and IPv6 Addresses for API Access
    • If your server has multiple IPv4 Addresses, you can whitelist them individually or whitelist the entire subnet.
    • If your server has an IPv6 Address, it is best to whitelist the entire /64 Subnet
  • WHMCS Version 6 is not supported due to reaching End-of-life.
  • PHP Version 5.x is not supported due to reaching End-of-life.
  • There are no plans to support older version of WHMCS and PHP.
  • You must use the Configurable Options generated by the module for the products. Creating your own will likely cause a conflict.

Limitations

Below are the list of options the module does not include by design.

  1. Add additional IPv4 Addresses.
  2. Enable Private Networking after a virtual machine has been deployed.
  3. Switching between OS and Apps.
  4. Switching between Linux and Windows.

Scope

This document will cover the process of installing and configuring the official Vultr WHMCS Module. Modules downloaded from third-party websites are not supported by Vultr.

Module Features

  • One-Click Creation of VPS Products based on Vultr
    • You will need to manually set the pricing for each product and configurable option.
  • Deploy and Upgrade Virtual Machines
  • Power on/off/cycle feature
  • HTML5 VNC Console
  • rDNS Control
  • Private Networking
  • Startup Scripts
  • SSH Keys
  • Snapshot Control
  • Deploy VMs from a list of pre-defined ISOs
  • Deploy VMs from a list of pre-defined Snapshots
  • Enable/Disable Specific ISOs and Snapshots for VM Deployments
  • Enable/Disable Deployment Locations
  • Vultr DNS Support with Vanity DNS (Custom Nameserver) Support

Creating an API Key

  1. Login to the Vultr Client Area.
  2. Click Account.
  3. Click API.
  4. Click Enable API.
  5. Whitelist the IP Addresses of your WHMCS Server under Access Control.

Installation

The first step is to Download the Vultr WHMCS Module here

New Installation
  1. Extract the ZIP Archive.
  2. Upload the module files to your WHMCS Server following the directory hierarchy defined below
Upgrade form an older version of the module
  1. Backup your database and files
  2. Completely delete the modules/addons/vultr and modules/servers/vultr directories.
  3. Extract and upload the new module.
Directory Hierarchy
Downloaded Archive
  • Modules
    • addons
      • vultr
    • servers
      • vultr

First Setup

  1. Upload the module as instructed above
  2. Login to your WHMCS Admin Panel and navigate to Setup -> Addon Modules.
  3. Next to Vultr Module, click the Configure button.
  4. Tick the Checkbox next to Hooks Enabled.
  5. Enter your API Key in the API Key field.
  6. Setup Access Control for Administrator and other roles you wish to enable it for.
  7. Click Save Changes
  8. Login to your WHMCS Admin Panel and navigate to Addons -> Vultr Module to configure your module options featured in the next section of this document

Module Configuration

This section of the documentation will showcase all the available configuration options for the module, explain how they work, and explain how to configure them.

Product Creator

This section will allow you to create a Vultr-based product in WHMCS. There are two modes, Single Product Creator and Multiple Product Creator.

The Single Product Creator mode will allow you to create a product based on the available Vultr packages, select a Product Group, and pricing for the product you’re adding. Pricing for Configurable Options such as Snapshots, Windows, cPanel Apps etc… must be manually added to the product’s Configurable Options.

The Multi Product Creator will bulk-create Vultr-based VPS Packages in your WHMCS, but you will have to manually setup the pricing for each package as well as pricing for the Configurable Options, similar to the Single Product Creator mode.

Products

This section will show a complete list of all your Vultr-based products in WHMCS and will allow you to quickly navigate to the Edit, or the Configurable Options page for each one. You can also delete a product from that page. This section is quite useful for when you want to quickly find a Vultr Product in your WHMCS Admin Area to modify it, or modify the Configurable Options for it.

DNS

The Vultr WHMCS Module supports Vanity Nameservers (custom ns1 and ns2.domain.com). Setting up Vanity Nameservers requires a first step, which is to create the custom name servers with your domain registrar and point them to the IPs ns1.vultr.com and ns2.vultr.com resolves to. One done, please follow the steps below:

  1. Login to your WHMCS Admin Panel.
  2. Go on Addons -> Vultr Module.
  3. Click on DNS.
  4. Add the values for Nameserver 1 and Nameserver 2 and click Save Changes.
  5. You’re done.

Please note that Vanity Nameservers are applied to newly added DNS Zones/Domains. Existing ones will have to be modified in https://my.vultr.com manaually.

Server Location

You have the option to enable and disable certain Cloud Locations, thus allowing your customers to deploy virtual machines only in the locations you choose. Please keep in mind that selecting the Cloud Location during the order process is not possible since locations are loaded dynamically depending on where the selected package is available at the time of deployment.

In order to select which locations to enable for your customers, please follow the steps below:

  1. Login to your WHMCS Admin Panel.
  2. Go on Addons -> Vultr Module.
  3. Click on Server Location.
  4. Click the Enabled button to disable the locations you wish to disable (clicking the button when it says Disabled will re-enable the location).
  5. You’re done.
Snapshots

The Vultr WHMCS Module allows you to make one or more of the snapshots on your account Public - meaning you would allow your customers to deploy new Virtual Machines from these Snapshots if they choose to do so. All the snapshots on your account are set to Disabled by default in the module and you would need to enable them.

In order to select which Snapshots to make public for your customers, please follow the steps below:

  1. Login to your WHMCS Admin Panel.
  2. Go on Addons -> Vultr Module.
  3. Click on Snapshots.
  4. Click the Disabled button to enabled the Snapshots you wish to make public (clicking the button when it says Enabled will re-enable the Snapshot).
  5. You’re done.
ISO

Similar to the Snapshot Feature, you can make one or more of the custom uploaded ISO’s on your account Public - meaning you would allow your customers to deploy new Virtual Machines from these ISOs if they choose to do so. All the ISOs on your account are set to Disabled by default in the module and you would need to enable them.

In order to select which Snapshots to make public for your customers, please follow the steps below:

  1. Login to your WHMCS Admin Panel.
  2. Go on Addons -> Vultr Module.
  3. Click on ISO.
  4. Click the Disabled button to enabled the ISOs you wish to make public (clicking the button when it says Enabled will re-enable the ISO).
  5. You’re done.

Ordering Process

Ordering Vultr-based products in WHMCS is a three-step process.

Step 1

Client Orders in the WHMCS Client Area/Cart: The client will be placing an order for a Virtual Machine. They will be asked to enter:

  • Hostname
  • Root Password
  • NS1 & NS2

This is the standard WHMCS Order Form and Vultr does not have any control over. You are welcome to change your WHMCS Order Form template to hide any of these options. Please keep in mind that the selected root password in the order for will not be used since Vultr’s API will generate a random secure password for each VM. Additionally, if a client deploys from a Snapshot, they would need to know the root password for the Snapshot before hand, otherwise they won’t be able to log in.

Additionally, the client will be asked to select whether or not to enable Auto Backups, Snapshot limit, and the OS Type.

In regards to the OS Type, there are 4 options in the dropdown menu showing under OS Type in the Order Form

  1. A list of all available OS Images
  2. ISO
  3. Snapshot
  4. Application

Selecting Application will enable a list of all the available One-Click Apps Vultr offers. ISO and Snapshot will allow the customer to select which ISO or Snapshot to deploy the Virtual Machine from.

Step 2

The Administrator would approve the order and provision the service in WHMCS (or you can choose to make that an automated process in the product option in WHMCS in the same manner as any other product in WHMCS.

Step 3

The customer would have to finalize the ordering process in the client area by choosing a Lable/Nickname for their server, a hostname, and other options such as SSH Key, IPv6, Private Networking, or Startup Script.

FAQ

I received an error about connection failure.

Ensure that your API key is not prefixed or suffixed with any whitespace, and that your server's IPv4 and IPv6 addresses are both whitelisted for API Access. You can verify your API rules as well as test your API key using cURL commands, such as the examples given here.

How do I specify a standard startup script via the auto setup system?

As stated, the customer is expected to finalize the deployment of the virtual machine in the client area after they have customized their options to their liking. Please keep in mind that the list of location is dynamically populated depending on the selected plan's availability across Vultr's cloud locations - see Step 3 above. There is currently no function to setup a global startup script.

How do I update the applications in the configuration options?

If you want to list all available applications, you can use this API Command and add the applications you want in the configurable options. Automatic synchronization does not exist in the module.