Module Installation for Hetzner Dedicated Servers for WHMCS
Hetzner Dedicated Servers Automation for WHMCS is a highly convenient tool for anyone looking to automate the management of their Dedicated Servers.
This module enables your clients to remotely manage server status, access the docker details (if installed), and rebuild their machines with ease. It also offers flexibility to customize your services, making it easy to meet even the most demanding client requirements.
Installation and Configuration This tutorial will guide you through the smooth installation and configuration of Hetzner Dedicated Servers Automation for WHMCS.
We will guide you step by step through the whole process.:
- Download and obtain the license key from our client area.
- Extracted files (modules folder content) into your WHMCS directory.
Activating Hetzner Dedicated Servers Automation Module in WHMCS:
-
First go to Configuration > System Settings > Addon Modules
-
Next to Hetzner Server
a. Activate – Click on Activate to activate the module b. Configure – Now click on configure for module configurations c. Module License – Provide license key that we get during module download d. Admin ID – Required for receiving cron job notifications. e. Allowed Domain – Necessary if WHMCS is installed on a subdomain and you want to display your plans on the main domain. In this case, you must whitelist the parent domain for security purposes. f. Access Control – Provide access control based on your requirement whereas Administrator is a mandatory Access control.

Obtaining Webservice credentials for the module
To perform these steps in Hetzner Robot, follow this concise guide:
- Get Webservice User and Password - Visit the Hetzner Robot panel at https://robot.hetzner.com/, click on the profile icon, select Settings, then go to Webservice and app settings. There, you can find or create your webservice user and password.
- Enable Webservice Ordering - Navigate to the Ordering tab within the Robot panel and enable Webservice Ordering if required for your module or integration. Note: These actions are necessary for API access and automating server management through external applications.
Configuring module with Webservice credentials
Here’s how to add and configure the Hetzner Webservice information in your WHMCS Hetzner module:
- In the WHMCS admin panel, go to Addons and select Hetzner Server.
- Click on Add Account in the module.
- Enter the account name, Hetzner webservice username, and password, then confirm.
- Next, open the Configuration menu within the module and adjust your settings as needed for server provisioning and management.
Note: These steps allow the WHMCS module to communicate securely with Hetzner and manage server automation.
Cron Job
If you wanted to automatically assign the products when user ordered, then you can set up the cron to run at every day or every 6/12 hours, you can adjust according to your requirement

Possible error you may face during cron job and how to address them
- handleOutOfStockProducts Error - Error: TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /modules/addons/hetzner/crons/hetznercron.php:0 Stack trace: #0 /modules/addons/hetzner/crons/hetznercron.php(0): in_array() #1 /modules/addons/hetzner/crons/hetznercron.php(0): handleOutOfStockProducts() #2 {main}
Fix: If you encounter an error related to handleOutOfStockProducts(), it means that the module hasn't been configured properly. This module depends on two specific settings, and if either one is not configured, you will see this error when running the cron job. To resolve this, go to the following path: path-to-your-whmcs-admin/addonmodules.php?module=hetzner&settings=settings and disable the Out Of Stock/Delete option. This should resolve the issue.
If you'd like to keep this feature active, where the cron job automatically marks products as out of stock, you need to visit path-to-your-whmcs-admin/addonmodules.php?module=hetzner&prod=whmcsProd and select your Standard Server plans. This configuration will prevent the error from occurring.
- Issue is related to product assignment via the cron job for your end users. This can occur if there is an order with a "pending" status, but you've either manually assigned the order, cancelled it, or left it as "pending" after the user service was cancelled. In these cases, the module might not be able to properly assign the product, which can result in a cron job error.
Fix: To resolve this, you'll need to make adjustments through PhpMyAdmin. Specifically, you should update the status of the order in the mod_hetzner_order table. Changing the status appropriately will allow the cron job to complete successfully.