Hetzner Cloud Servers For WHMCS
Contents |
About Hetzner Cloud Servers For WHMCS
Hetzner Cloud Servers 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. |
- Admin Area Features:
✔ Create/Suspend/Unsuspend/Terminate Server |
✔ Power On/Power Off/Shut Down/Reboot Server |
✔ View/Reset Server Password |
✔ Change Server Primary IP Address |
✔ View Server Status And Details |
✔ View Assigned IPv4 And IPv6 Addresses |
✔ Rebuild Server With Chosen OS Distribution |
✔ Mount/Unmount ISO Images |
✔ View/Manage Floating IP Addresses |
✔ View/Restore Automatic Backups |
✔ View CPU/Memory/Network Usage Graphs |
✔ View Task History |
✔ Configure Product Details: |
✔ Choose Location/Data Center |
✔ Choose OS Image |
✔ Choose Type |
✔ Number Of Floating IPv4 And IPv6 Addresses |
✔ Define Additional Volume Size And Filesystem |
✔ Define Snapshots Size Limit |
✔ Define Random Domain Prefix |
✔ Define Firewalls Limit |
✔ Define Firewall Rules Inbound/Outbound/Total Limits |
✔ Define Reverse DNS Template |
✔ Select Email Template Sent After Rebuild Action |
✔ Choose User Data |
✔ Enable Backups |
✔ Enable Opening Console In New Window |
✔ Choose Available Images To Rebuild |
✔ Choose Available ISO Images To Mount |
✔ Choose Features Available In Client Area: |
✔ Rebuild Server |
✔ Access Console |
✔ Reverse DNS |
✔ Floating IP Addresses |
✔ Backups |
✔ Graphs |
✔ Networks |
✔ Task History |
✔ Rescue Mode |
✔ Soft Reboot |
✔ Change Primary IP Address |
✔ Snapshots |
✔ ISO Images |
✔ Firewalls |
✔ Available Images To Rebuild |
✔ Available ISO Images |
✔ Select Server Information Fields Displayed In Client Area |
✔ Select Action On Service Suspension And Termination |
✔ Power Off VM Before Upgrade |
✔ Enable Static VM Domain Name |
✔ Generate Configurable Options |
✔ Run API Connection Test |
- Client Area Features:
✔ Power On/Power Off/Shut Down/Reboot Server |
✔ View/Reset Server Password |
✔ Change Server Primary IP Address |
✔ View Server Status And Details |
✔ View Assigned IPv4 And IPv6 Addresses |
✔ View/Restore Automatic Backups |
✔ Create/Manage Firewalls And Their Rules |
✔ Access Remote Console |
✔ View/Manage Floating IP Addresses |
✔ View CPU/Memory/Network Usage Graphs |
✔ Mount/Unmount ISO Images |
✔ Create/Manage Networks: |
✔ Create Subnets And Attach Resources |
✔ Add Routes |
✔ Rebuild Server With Chosen OS Distribution |
✔ Create/Manage IPv6 Reverse DNS Records |
✔ Create/Restore Snapshots |
✔ View Task History |
✔ Provide SSH Key During Order |
- Configurable Options:
✔ Location |
✔ Data Center |
✔ Image |
✔ Type |
✔ Additional Volume Size |
✔ Filesystem For Additional Volume Size |
✔ Snapshots Limit |
✔ User Data |
✔ Enable Backups |
✔ Number Of Floating IPv4 Addresses |
✔ Number Of Floating IPv6 Addresses |
✔ Firewalls Limit |
✔ Inbound Firewall Rules Limit |
✔ Outbound Firewall Rules Limit |
✔ Total Limit of Firewall Rules |
- Available Images:
✔ Linux OS And Solutions: |
✔ 3CX |
✔ AlmaLinux |
✔ Alpine Virtual |
✔ Archlinux |
✔ CentOS |
✔ Clonezilla |
✔ collab-tools |
✔ Debian |
✔ Docker |
✔ Fedora |
✔ FreeBSD |
✔ FreePBX |
✔ GitLab |
✔ Go |
✔ IPFire |
✔ Jitsi |
✔ Lamp |
✔ k3OS |
✔ Kali Linux |
✔ mfsBSD |
✔ NetBSD |
✔ Nextcloud |
✔ NixOS |
✔ OPNsense |
✔ OpenBSD |
✔ openSUSE |
✔ Oracle Linux |
✔ Owncast |
✔ pfSense CE |
✔ PhotoPrism |
✔ Prometheus Grafana |
✔ Proxmox Mail Gateway |
✔ Proxmox VE |
✔ RancherOS |
✔ Rocky Linux |
✔ Ruby |
✔ RustDesk |
✔ Securepoint UTM |
✔ SystemRescueCD |
✔ TrueNAS SCALE |
✔ Ubuntu |
✔ virtIO Drivers |
✔ VyOS |
✔ WireGuard |
✔ WordPress |
✔ Microsoft Windows: |
✔ Windows Server 2022 |
✔ Windows Server 2019 |
✔ Windows Server 2016 |
✔ Windows Server 2012 R2 |
✔ Windows VirtIO Drivers |
✔ Any Other OS Platforms And Solutions When Made Available By Hetzner |
- General Info:
✔ Supports Hetzner Cloud Solutions |
✔ Integrated With Advanced Billing For WHMCS - Actual Server Resource Usage Billing |
✔ Integrated With Server Allocator For WHMCS - Automatic Assignment Of Most Suitable Servers To Products |
✔ Fully Integrated With Lagom WHMCS Client Theme |
✔ Multi-Language Support |
✔ Supports PHP 8.2 Back To PHP 7.4 |
✔ Supports WHMCS Metric Billing - Integration: Cores, Memory, Disk |
✔ Supports WHMCS Server Sync Tool |
✔ Supports WHMCS Themes "Six" And "Twenty-One" |
✔ Supports WHMCS V8.11 Back To WHMCS V8.8 |
✔ Requires ionCube Loader V13 Or Later |
✔ Easy Module Upgrade To Open Source Version |
Installation and Configuration
This tutorial will show you how to successfully install and configure Hetzner Cloud Servers For WHMCS smoothly. We will guide you step by step through the whole process. |
Installation
1. Log in to our client area and download the module. |
2. Extract and upload the extension into the main WHMCS directory. Extracted files in your WHMCS directory should look like this: |
3. When you install Hetzner Cloud Servers 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'. |
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. |
5. Now, set up the 'storage' folder as recursively writable. This folder is available at '/your_whmcs/modules/servers/HetznerVPS/'. |
6. The last step is setting up the tasks cron job. Remember that before you schedule the cron task, you must create a product/service first. If done the other way around, errors might occur. It is needed to:
We suggest that the cron should run every 5 minutes: 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 on where to find your API details. |
7. Firstly, log into your Hetzner account and enter this site: https://accounts.hetzner.com/login. Find and open your project. |
8. In the side menu, find the 'Security' section and enter it. Then, proceed to 'API Tokens'. |
9. In the 'API Tokens' section, press the 'Generate API Token' button. |
10. A new window will appear. Provide a description, choose appropriate permissions 'Read & Write' and press the 'Generate API Token' button again. |
11. Now, you will see the newly generated 'API Token' . Copy it and keep safe as you will need in a moment to create a connection between WHMCS and the Hetzner server. |
12. Now, log in to your WHMCS and proceed to 'System Settings' → 'Servers' and press 'Add New Server'. |
13. Next, enter your server name, provide any data into the 'Hostname' or 'IP Address' and select 'Hetzner Cloud Servers For WHMCS' from the 'Type' field. Now, provide the previously generated API token in the 'Password' field. Then check the connection, and if successful, save the changes. Note: The module requires neither the "Hostname" nor "IP Address", fill out one of the fields to avoid fatal errors. |
14. It is time to create a server group. To do so, click on 'Create Server Group'. |
15. Enter a name, click on your previously created server, press 'Add' and afterward 'Save Changes'. |
Configuration of Product
16. In order to create and configure a product, go to 'System Settings' → 'Products/Services'. Click on 'Create a New Group' . |
17. Enter your product group name and press 'Save Changes'. |
18. Once you have a product group, you can create a new product. To do so, first, click on 'Create a New Product' . |
19. Afterward, choose your product type, enter your product name, choose the module and the product group from the dropdown menus. Press 'Continue'. |
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. |
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 you can also configure such options as:
|
22. The following section is dedicated to the Client Area Features. You will find here several options that can be enabled and then will be available to your clients in their client area. These options are:
|
23. Adjust the content of the "Server Information" section visible in the client area. Select here the fields that you wish to be visible for clients on the product overview page. |
24. Configure the automation settings:
|
25. 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. |
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. |
Now that the product is ready, it is time to set up the corn job responsible for task executions. It is suggested that the cron should run every 5 minutes: php -q /your_whmcs/modules/servers/HetznerVps/cron/cron.php Tasks |
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 the server without using a password.
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}( [^@]+@[^@]+)?# More information about how Hetzner handles SSH keys and how to create them can be found here. |
Management
Admin Area
Hetzner Cloud Servers 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 as:
|
|
Please note that in case the product had no SSH key provided while being created, the 'Password' field with the option to be changed is available among other Server Information. |
Below you will also find:
|
For available graphs, you may change settings to adjust the displayed data time frame to your needs. |
At the bottom, you will find the Task History. |
Ordering
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. 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. |
Importing Existing Server
In this section, you can find short instruction on how to connect one of your clients to your already existing server in the Hetzner panel. Take the following steps to make sure that the process will be carried out properly. 1. Firstly, manually create an order for your customer in WHMCS. Choose a client and in the summary, view click on the 'Add New Order' button. Next, select a 'Product/Service' and press 'Submit Order'.
The above-mentioned information has to be consistent with the data from your Hetzner panel. Now, complete this field as presented below. |
3. If the completed data is correct, after refreshing the page, you will see the attached server from Hetzner. Important! Remember to manually add other missing parameters of the instance such as credentials, configurable options, SSH Key, billing cycle, etc. so they match the parameters of the attached instance from Hetzner. |
Client Area
Client area interface of Hetzner Cloud Servers 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, shut down and reboot their servers by pressing the corresponding buttons. |
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. |
Backups
The first section available for clients grants the ability to view the list of existing 'Backups' of your server. You may restore any of the available backups at any time you need, simply press the icon marked on the screen. Please remember that 'Backups' are assigned to a particular server and will be removed once the server is deleted. |
Console
Clients may access console directly from the client area. It is the easiest and fastest possible way to connect to the server. |
Firewalls
'Firewall' section allows your clients to view existing on the server firewalls and add new ones. To create a new firewall just press 'Create Firewall' button. |
Enter a firewall name and confirm the action by pressing the green button. |
Once you have the firewalls added, it is time to create required firewall rules. Press the edit icon next to the firewall to do so. |
Here you will find the list of existing rules if any have already been created. Press the button 'Create Rule' to add a new one. |
In order to add a new firewall rule please fill in the required fields:
|
As you can see, management of the existing rules is extremely easy. Edit or remove firewall rules by pressing adequate buttons. |
Floating IP Addresses
In this section you can review all 'Floating IP Addresses' and edit them. |
Graphs
Once entering the 'Graphs' section, clients will be moved to the page with the generated graphs showing:
|
ISO Images
In the 'ISO Images' section, a client can mount additional images that were selected by the administrator during the product configuration. Thanks to it, a client can easily install e.g. additional operating systems that are not available by default for the 'Rebuild' feature. Note: Currently mounted image is highlighted with the bolded font. Customers can unmount it at any time, or mount any other image from the list. |
Networks
Networks section allows direct management of networks. They can create networks (1), subnets (2), routs (2), then attach resources and manage aliases. |
Once you have a set of networks created, you may move to creating subnets per each network. Move to the 'Subnets' (2) section. There press 'Create Subnet' to create a new one. |
Now, to each created subnet you may attach resources. You may select your own resource to attach or set a private IP address manually. |
There is also an option to manage alias IP addresses. Use a comma if you want to add more than one alias at once. |
Next to 'Subents' (2) you will find section dedicated to 'Routs' (3) management. There you may add a new route by providing its destination, CIDR and a gateway. |
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. |
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. |
Reverse DNS
In this section you can change the hostname that will appear when getting the hostname belonging to the primary IPs (IPv4 and IPv6) of your server. To do so, click on the button as presented below. |
When 'IP' and 'Reverse DNS' are provided, just save the changes. |
Snapshots
Creating snapshots allows customers to quickly restore any changes to a virtual machine in case of any problems. Clients can create as many snapshots as they wish, providing that the total size of snapshots does not exceed the limit specified in the product configuration or chosen in the configurable option. Once the shutter has been created, the customer can restore it, change its description or delete it. |
After pressing the 'Create Snapshot' button, the new window will pop up along with the possibility to specify the snapshot description. Please note that taking a new snapshot may take a while to process. |
Task History
Navigate to the "Task History" section to access a comprehensive list of completed actions, including their status and dates of completion, within the server activity. |
Tips
1. In the language file, you can customize the names of the displayed operating systems, and also add new ones on your own, if they appear in Hetzner. Simply add new records in the same way as the default ones. |
2. The module allows the possibility to install a snapshot, that has been previously created in your Hetzner panel, as an OS image. All created snapshots are available in the dropdown list of the available images in the product's module settings. |
How To Use Language Overrides
Incorporating language customizations - the module readily accommodates language overrides, allowing you to tailor the language files to your preferences. The language file english.php remains unencoded and can be modified to suit your needs. However, it's recommended to avoid altering the core file itself, and instead, leverage the capability of using overrides. |
Here's how to apply language overrides:
~/langs/overrides/english.php.
For example: Original yourWHMCS/modules/servers/moduleName/langs/english.php: $_LANG['Search'] = 'Search'; Override yourWHMCS/modules/servers/moduleName/langs/overrides/english.php: $_LANG['Search'] = 'Look for'; |
By following these steps, you can seamlessly implement language customizations without altering the core language file, ensuring your changes will not be lost after every module update. Remember that some of the modules have more than one language file, located under /addons and /servers paths. You may create the override files for both of them. |
Update Instructions
An essential guidance through the process of updating the module is offered here. Ensure successful completion of the module update by carefully following each step, thereby preventing data loss or any unforeseen issues. |
Upgrade Guide
Seeking a solution that offers greater flexibility, customization tailored to your precise needs, and unrestricted availability? There is an option that not only proves to be cost-effective in the long run but also includes prioritized support services, making it a truly valuable investment. Opt for the Open Source version of your Hetzner Cloud Servers For WHMCS module to unlock these benefits. Follow a comprehensive guide covering the transition process, the advantages it brings, and step-by-step instructions on what to do next after the order has been successfully finalized. |
Common Problems
1. When you have problems with connection, check whether your SELinux or firewall does not block ports. |
2. If you use WHMCS V7.8.X (or later), a fatal error may occur when trying to save server settings without providing any hostname or IP address details. Our module does not require this field to be filled out, but in that case, try to provide anything in the hostname field. Please note that this is a bug occurring in WHMCS, not the module itself. |
3. Error: 422 Unprocessable Entity response: { "error": { "message": "image has incompatible architecture", "code": "invalid_input", "details": { (truncated...) If you encounter the above error when creating a server, the Image and Type fields in 'Configuration' section of the product settings are incorrectly set up.
|