Personal tools


Hetzner VPS For WHMCS

From ModulesGarden Wiki
Jump to: navigation, search


About Hetzner VPS For WHMCS

Hetzner VPS For WHMCS is a tool of great convenience for all those who wish to manage their Hetzner servers automatically.

The module will allow your clients to remotely control the status of a server, access the console, and rebuild the machine.
With it, you will be able to personalize and adjust your offer to even the most demanding needs of your clients.

  • Admin Area Features:
✔ Create/Suspend/Unsuspend/Terminate Server
✔ Power On/Power Off/Shut Down/Reboot Server
✔ View/Reset Server Password
✔ View Server Status And Details
✔ View Assigned IPv4 and IPv6 Addresses
✔ Rebuild Server With Chosen OS Distribution
✔ Configure Product Details:
✔ Choose Location/Data Center
✔ Choose OS Image
✔ Choose Type
✔ Define Additional Volume Size
✔ Choose Available Images To Rebuild
✔ Choose Features Available In Client Area:
✔ Rebuild Server
✔ Access Console
✔ Generate Configurable Options
✔ Run API Connection Test
  • Client Area Features:
✔ Power On/Power Off/Shut Down/Reboot Server
✔ View/Reset Server Password
✔ View Server Status And Details
✔ View Assigned IPv4 and IPv6 Addresses
✔ Rebuild Server With Chosen OS Distribution
✔ Access Remote Console
✔ Provide SSH Key During Order
  • Supported Operating Systems:
✔ CentOS
✔ Debian
✔ Fedora
✔ Ubuntu
  • Configurable Options:
✔ Location
✔ Image
✔ Data Center
✔ Type
✔ Additional Volume Size
  • General Info:
✔ Integrated With Server Allocator For WHMCS - Automatic Assignment Of Most Suitable Servers To Products (read more)
✔ Multi-Language Support
✔ Supports PHP 7.1 Up To PHP 7.3
✔ Supports WHMCS Template Six
✔ Supports WHMCS V7.5 And Later
✔ Easy Module Upgrade To Open Source Version

Installation and Configuration

This tutorial will show you how to successfully install and configure Hetzner VPS For WHMCS smoothly.

We will guide you step by step through the whole process.


1. Log in to our client area and download the module.
HTZ 1.png
2. Upload and extract the extension into the main WHMCS directory.

Extracted files in your WHMCS directory should look like this:

HTZ 2.png
3. When you install Hetzner VPS For WHMCS for the first time, you have to rename the 'license_RENAME.php' file.

The file is located in 'modules/servers/HetznerVPS/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'.

HTZ 3.png
4. In order to configure your license key, you have to edit the previously renamed 'license.php' file.

Enter your license key between the quotation marks as presented on the following screen.
You can find your license key in our client area → 'My Products'.

HTZ 4.png
5. Now, set up the 'storage' folder as recursively writable.

This folder is available at '/your_whmcs/modules/servers/HetznerVPS/'.

HTZ 5.png
6. The last step is setting up the tasks cron job.

It will be used to remove volumes from the panel after their termination. If not set, the admin will have to delete them manually.
We suggest that the cron should run every hour:

php -q /your_whmcs/modules/servers/HetznerVps/cron/cron.php Tasks

Configuration of Server

Before you can go on, you must generate your Hetzner API Token. You will need it to connect with the server successfully.

Underneath you will find instructions where to find your API details.

7. Firstly, log into your Hetzner account and enter site:

Find and open your project.

HTZ7 7 1.png
8. In the side menu find 'Access' section and enter it.
HTZ7 7 2.png
9. There, move to 'API Tokens' section and press 'Generate API Token' button.
HTZ7 7 3.png
10. A new window will appear. Provide description and press 'Generate API Token' button again.
HTZ7 7 4.png
11. The API token will appear on the list. Copy it and keep safe as you will need in a moment to create connection between WHMCS and the Hetzner server.
HTZ7 7 5.png
12. Now, log in to your WHMCS and proceed to 'Setup' 'Products/Services' 'Servers' and press 'Add New Server' .
HTZ 6.png
13. Next, enter your server name and select 'Hetzner VPS' from the 'Type' field.

Now, provide the previously generated API token in the 'Password' field. Then check the connection, If successful, save the changes.

HTZ 7.png
14. It is time to create a server group. To do so, click on 'Create Server Group' .
HTZ 8.png
15. Enter a name, click on your previously created server, press 'Add' and afterward 'Save Changes' .
HTZ 9.png

Configuration of Product

16. In order to create and configure a product, go to 'Setup' 'Products/Services' 'Products/Services' .

Click on 'Create a New Group' .

HTZ 10.png
17. Enter your product group name and press 'Save Changes' .
HTZ 11.png
18. Once you have a product group, you can create a new product.

To do so, first click on 'Create a New Product' .

HTZ 12.png
19. Afterward, choose your product type, enter your product name, choose module and the product group from the dropdown menus. Press 'Continue'.
HTZ 13.png
20. Now, go to the 'Module Settings' section, choose your previously created server group from the dropdown menu.

The module should automatically save and reload the settings. If not, click on the 'Save Changes' option manually.

HTZ 14.png
21. Now, you can start configuring the settings of the server you sell.

Just like when creating a new virtual machine in your Hetzner panel, here also you can configure such options as:

  • Location - Select a location for the related server from the list.
  • Data Center - Select the data center region. More distant server locations may increase the server's latency without providing any practical benefits to clients.
    If selected, 'Location' will not be taken into account.
  • Image - Select the image of the system that will be installed on the server.
  • Type - Choose type from the list of available to be used on the server.
  • Additional Volume Size [GB] - Allows you to create and attach an additional SSD storage volume to the server in the provided size (in GB).
    If left empty or set to 0, then the volume will not be created and attached.
HTZ 15.png
22. The following section is dedicated to the Client Area Features.

You will find here six options that can be enabled and then will be available to your clients in their client area. These options are:

  • Rebuild - if enabled, clients are allowed to rebuild their virtual machine in an adequate section.
  • Console - if enabled, clients are granted access to console
  • Available Images To Rebuild - Select OS images from available to allow the client to use when rebuilding a virtual machine.
    Please note, that if you leave this field empty then all available OS images will be displayed in the client area to rebuild.
HTZ 16.png
23. At the end of the configuration process, you can decide whether you want to generate configurable options for the product.

Configurable options can be used by your clients to select each virtual machine parameters individually during order placement.
Otherwise, if configurable options are not defined, then the fixed parameters specified in the earlier configuration will be used instead.

HTZ 17.png
If you decide to use configurable options, press on the 'Create' button and select which options you want to generate.
Note that the configuration for disabled options will still be taken from the configuration of the main product.
More information about how to use configurable options can be found here or in the official WHMCS documentation.
HTZ 18.png

SSH Keys

In the 'Custom Fields' tab you will find a 'SSH Public Key' field which is displayed to clients on the order form by default.

This field is optional. It allows your clients to insert their public key in order to be able to log in to server without using a password.
The provided key should be in one of the OpenSSH formats which are supported by Hetzner API. This includes the following types:

  • ssh-rsa
  • ssh-dss
  • ecdsa-sha2-nistp256
  • ecdsa-sha2-nistp384
  • ecdsa-sha2-nistp521
  • ssh-ed25519

If you would like to limit the possibility of entering the key e.g. only to the 'ssh-rsa' format, you can use the regular expression in the validation field, such as:

#ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3}( [^@][email protected][^@]+)?# 

More information about how Hetzner handles SSH keys and how to create them can be found here.
If you do not want this field to be available to customers during the ordering process, simply uncheck 'Shown on Order Form' option.
Remember that API allows such action only once, during the initial VM creation.

HTZ 18 1.png


Admin Area

Hetzner VPS For WHMCS allows you to monitor and manage your customer virtual machine from the admin area of your WHMCS system.

This includes supervision of such features like:

  1. Configurable options which enable you to view the chosen server resources.
  2. Module commands to allow easy and quick management of the server
  3. Service actions, including: Power on/off, Shut down, Reboot the server and Reset the password
  4. Server information provides you with the current status, resources and options set for the virtual machine.
HTZ 19.png
Please note that in case the product had no SSH key provided while being created, a 'Password' field with the option to be changed is available among other Server Information.
HTZ 19 0.png


Owing to configurable options, you are able to offer a product which your clients can tailor according to their needs.
Additionally, you are able to set up pricing for each configurable option, which makes your offer even more competitive.

Based on the custom SSH key field configuration, you might also insert your public SSH key, which will allow you to log in to a server without the need to use the password.
Note that this key should be in one of the OpenSSH standard formats which are supported by API, e.g. ssh-rsa.

After the order placement and successful VM creation, the server credentials will be sent to the client's email address according to the set cron execution intervals.

HTZ 19 1.png

Client Area

Client area interface of Hetzner VPS should look like the one on the screen below.
As you can see, the control panel contains useful options required for managing a server.

The module allows your customers to easily power on/off, shutdown and reboot their servers through pressing the corresponding buttons.
Clients can also rebuild the server, access the console and view the current server parameters, resources and all set options, as well as the assigned IP addresses.

HTZ 20.png
In case the SSH Key has not been used when creating this virtual machine, a one time password, with the option to change it, will be available among other server information.
HTZ 20 1.png

Rebuild Server

This feature allows your clients to rebuild their virtual machine and change a server's OS image.

Press the shown below button in order to reinstall your server to the chosen image and confirm your choice.
Please remember that this will also wipe the previously saved data on the VM disk.

HTZ 21.png
In case your machine has been created without the SSH key provided (read more here), a one time password will appear when the process of rebuilding the machine starts.
Please copy it and keep safe to use.
HTZ 21 1.png

Access Console

Clients might be granted access to the console.

Simply press its icon to open the console window.

HTZ 22.png

Update Instructions

Essential guidance through the process of updating the module is offered here.

Keep in mind there is a quick and easy option in our client area that will let you upgrade the license of your module to an open source version at any time - and at a lower price!
To take advantage of it, simply use the License Upgrade button located on the product's page and a discounted invoice will be generated automatically.

Common Problems

1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
WHMCS Modules
WHMCS Translations
cPanel Modules
Magento Extensions
Magento Themes
PrestaShop Modules
Blesta Extensions
Hetzner VPS For WHMCS