Installation and configuration guide
- WHMCS setup(install/update)
- Basic concepts and requirements
- Setup guide: WHMCS preparation and configuration
- Add server (Hetzner)
- Product Configuration
- Email Template (puqHetznerDatacenter Custom Welcome Email)
- Email Template (puqHetznerDatacenter Custom start stop service Email)
- Email Template (puqHetznerDatacenter Custom reset password Email)
- Email Template (puqHetznerDatacenter Custom snaphot action service Email)
- Email Template (puqHetznerDatacenter Custom backup action service Email)
- Email Template (puqHetznerDatacenter Custom ISO action service Email)
- Email Template (puqHetznerDatacenter Custom reinstall action service Email)
WHMCS setup(install/update)
Hetzner Datacenter module WHMCS
Order now | Download | FAQ
Module is coded ionCube v13
Supported php version:
- php 7.4 WHMCS 8.11.0 -
- php 8.1 WHMCS 8.11.0 +
- php 8.2 WHMCS 8.11.0 +
To install and update a module, you must perform one and the same action.
1. Download the latest version of the module.
PHP 8.2
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HetznerDatacenter/php82/PUQ_WHMCS-HetznerDatacenter-latest.zip
PHP 8.1
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HetznerDatacenter/php81/PUQ_WHMCS-HetznerDatacenter-latest.zip
PHP 7.4
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HetznerDatacenter/php74/PUQ_WHMCS-HetznerDatacenter-latest.zip
All versions are available via link: http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HetznerDatacenter/
2. Unzip the archive with the module
unzip PUQ_WHMCS-HestiaCP-latest.zip
3. Copy and Replace "puqHetznerDatacenter" to "WHMCS_WEB_DIR/modules/servers/"
Basic concepts and requirements
Hetzner Datacenter module WHMCS
Order now | Download | FAQ
Requirements for the successful operation of the module
- Minimal WHMCS version 8+
- Hetzner API
The logic of the module.
You can offer your clients virtual machines from Hetzner. The module allows you to deploy almost any service based on Hetzner.
Creating a new Account.
- Checking the module license
- Generating the server name in the format
NameServer-[*user_id*]-[*service_id*]
- Generating data to create a server
- Sending data via API and creating a server
Package change
- The package change function allows you to enable and disable backups
Suspending an Account
- Checking the module license
- Selecting the suspension method: server shutdown or enabling firewall rules
- Executing the suspension via API
Unsuspending an Account
- Checking the module license
- Selecting the restoration method: server power on or restoring firewall rules
- Executing the restoration via API
Terminating an Account
- Checking the module license
- Deleting the server via API
- Updating information in the WHMCS database
Client Area
The module provides clients with the ability to manage virtual machines through the WHMCS client area, including functions for creating, suspending, restoring, and deleting servers, as well as managing backups and snapshots.
Setup guide: WHMCS preparation and configuration
Hetzner Datacenter module WHMCS
Order now | Download | FAQ
1. Download the latest version of the module.
PHP 8.X
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HetznerDatacenter/PUQ_WHMCS-HetznerDatacenter-latest.zip
PHP 7.4
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HetznerDatacenter/php74/PUQ_WHMCS-HetznerDatacenter-latest.zip
All versions are available via link: http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HetznerDatacenter/
2. Unzip the archive with the module
unzip PUQ_WHMCS-HetznerDatacenter-latest.zip
3. Copy "HetznerDatacenter" to "WHMCS_WEB_DIR/modules/servers/"
4. Create new server HetznerDatacenter in WHMCS (System Settings -> Products/Services -> Servers)
System Settings->Servers->Add New Server
- Enter the correct Name and API url
api.hetzner.cloud
- In the Server Details section, select the "PUQ Hetzner Datacenter" module and enter the correct api key and for the Hetzner API. To get an API key, go to the Hetzner console -> Security -> API tokens -> Generate API token
- To check, click the "Test connection" button
6. Create a new server Group
For the module to work correctly, you need to create a group and add our server that we created to it. If you want to use several projects, you need to create your own server for each project and create a group and add one server to one group.
System Settings->Products/Services->Create New Group
6. Create a new Products/Services
System Settings->Products/Services->Create a New Product
In the Module settings section, select the "PUQ Hetzner Datacenter" module
Please note that you need to select a group with a configured server, so we can separate services by projects in the Hetzner console
Package Settings
License key: A pre-purchased license key for the "PUQ Hetzner Datacenter" module. For the module to work correctly, the key must be active.
Server name: This option allows you to add a prefix string to the server name. A new name will be generated each time the create account function is called. When NameServer will only be present if the field is set: NameServer-[*user_id*]-[*service_id*]
.
Server type: The type of server to be deployed. This is selected from the available server types provided by Hetzner. This field is automatically populated based on your selection from Select Server and Location.
Server location: The physical location of the server. This is selected from the available locations provided by Hetzner. This field is automatically populated based on your selection from Select Server and Location.
Server placement groups: The placement groups for the server. This allows you to specify how the server should be grouped within the data center. This field is automatically populated based on your selection from the Select Placement Group.
Server image: The operating system image to be used for the server. This is selected from the available images provided by Hetzner. This field is automatically populated based on the selection from Select Image.
SSH keys: The SSH keys to be used for accessing the server. You can add multiple SSH keys. This field is automatically populated based on your selection from Select SSH Keys.
Server networks: The networks to which the server will be connected. This field is automatically populated based on your selection from Private Networks.
Server firewalls: The firewall rules to be applied to the server. You can select from predefined firewall rules or create custom ones. This field is automatically populated based on your selection from Select Firewalls.
User data: Custom user data to use during server creation. This field is limited to 32KB. You can use this to provide cloud-init configuration scripts or other initialization data.
Package setting: Additional settings for the package, including:
- Hide PTR open record: Hide PTR open record. When the checkbox is checked, it hides the button.
- Not allow access to server on VNC/NC: This setting prohibits access to the server console if enabled.
- Not allow access to Charts: This setting prohibits access to the server charts if enabled.
- Not allow reset password: This setting prohibits access to the server charts if enabled.
- Backup: Allow access to server backup. The parameter allows access to server backups. You need to select the name of the custom field. (Default: Backup)
- Snapshot: Allow access to server snapshot. The setting allows access to the server snapshot if enabled.
- Server labels: Add labels to the server. The user_id and service_id fields with the corresponding values will be automatically added.
- Hide inputs on client area: Hide inputs in client area. This setting hides the inputs (domain, password, username, nameserver1, and nameserver2) and sets up a server label(s) in the client area if enabled.
- Firewall for suspend service: This setting allows you to select a firewall to be used for suspending the service or disable the VM.
- Link to instruction: A link to the instruction will be reflected in the client area.
API Settings
Select Server and Location: Choose the server type and location from the available options provided by Hetzner.
Select Image: Choose the operating system image for the server from the available options provided by Hetzner.
Custom option name for image: Specify a custom option name for the server image if needed.
Allow user to select ISO image: Enable this option to allow users to select an ISO image.
Allow user to reinstall service: Enable this option to allow users to reinstall the service from the client area.
Allow user to choose backup and snapshot when reinstalling service: Enable this option to allow users to choose a backup and snapshot when reinstalling the service.
Select Placement Group: Choose the placement group for the server from the available options provided by Hetzner.
Select SSH Keys: Choose the SSH keys to be used for accessing the server from the available options provided by Hetzner.
Public Networks: Configure the public network settings for the server. This includes enabling or disabling public IPv4 and IPv6 addresses.
Private Networks: Configure the private network settings for the server.
Select Firewalls: Choose the firewall rules to be applied to the server from the available options provided by Hetzner.
Email configuration: Setting up email templates. Selection of pre-prepared templates to inform the user about some actions:
- Custom Welcome Email: Template for the welcome email.
- Custom start stop service Email: Template for the start/stop service email.
- Custom reset server password Email: Template for the reset server password email.
- Custom snapshot action Email: Template for the snapshot action email.
- Custom backup action Email: Template for the backup action email.
- Custom ISO action Email: Template for the ISO action email.
- Custom reinstall action service Email: Template for the reinstall action service email.
Metric Billing: Configuration for metric billing, including:
- Floating IPv4 addresses: Configure pricing for floating IPv4 addresses.
- Floating IPv6 addresses: Configure pricing for floating IPv6 addresses.
- Bandwidth Usage (GB): Configure pricing for bandwidth usage.
- Snapshot Usage (GB): Configure pricing for snapshot usage.
Add server (Hetzner)
Hetzner Datacenter module WHMCS
Order now | Download | FAQ
Add a new server to the system WHMCS.
System Settings->Servers->Add New Server
- Enter the correct Name and API url
api.hetzner.cloud
- In the Server Details section, select the "PUQ Hetzner Datacenter" module and enter the correct api key and for the Hetzner API. To get an API key, go to the Hetzner console -> Security -> API tokens -> Generate API token
- To check, click the "Test connection" button
Product Configuration
Hetzner Datacenter module WHMCS
Order now | Download | FAQ
Add new product to WHMCS
System Settings->Products/Services->Create a New Product
In the Module settings section, select the "PUQ Hetzner Datacenter" module
Package Settings
License key: A pre-purchased license key for the "PUQ Hetzner Datacenter" module. For the module to work correctly, the key must be active.
Server name: This option allows you to add a prefix string to the server name. A new name will be generated each time the create account function is called. When NameServer will only be present if the field is set: NameServer-[*user_id*]-[*service_id*]
.
Server type: The type of server to be deployed. This is selected from the available server types provided by Hetzner. This field is automatically populated based on your selection from Select Server and Location.
Server location: The physical location of the server. This is selected from the available locations provided by Hetzner. This field is automatically populated based on your selection from Select Server and Location.
Server placement groups: The placement groups for the server. This allows you to specify how the server should be grouped within the data center. This field is automatically populated based on your selection from the Select Placement Group.
Server image: The operating system image to be used for the server. This is selected from the available images provided by Hetzner. This field is automatically populated based on the selection from Select Image.
SSH keys: The SSH keys to be used for accessing the server. You can add multiple SSH keys. This field is automatically populated based on your selection from Select SSH Keys.
Server networks: The networks to which the server will be connected. This field is automatically populated based on your selection from Private Networks.
Server firewalls: The firewall rules to be applied to the server. You can select from predefined firewall rules or create custom ones. This field is automatically populated based on your selection from Select Firewalls.
User data: Custom user data to use during server creation. This field is limited to 32KB. You can use this to provide cloud-init configuration scripts or other initialization data.
Package setting: Additional settings for the package, including:
- Hide PTR open record: Hide PTR open record. When the checkbox is checked, it hides the button.
- Not allow access to server on VNC/NC: This setting prohibits access to the server console if enabled.
- Not allow access to Charts: This setting prohibits access to the server charts if enabled.
- Not allow reset password: This setting prohibits access to the server charts if enabled.
- Backup: Allow access to server backup. The parameter allows access to server backups. You need to select the name of the custom field. (Default: Backup)
- Snapshot: Allow access to server snapshot. The setting allows access to the server snapshot if enabled.
- Server labels: Add labels to the server. The user_id and service_id fields with the corresponding values will be automatically added.
- Hide inputs on client area: Hide inputs in client area. This setting hides the inputs (domain, password, username, nameserver1, and nameserver2) and sets up a server label(s) in the client area if enabled.
- Firewall for suspend service: This setting allows you to select a firewall to be used for suspending the service or disable the VM.
- Link to instruction: A link to the instruction will be reflected in the client area.
API Settings
Select Server and Location: Choose the server type and location from the available options provided by Hetzner.
Select Image: Choose the operating system image for the server from the available options provided by Hetzner.
Custom option name for image: Specify a custom option name for the server image if needed.
Allow user to select ISO image: Enable this option to allow users to select an ISO image.
Allow user to reinstall service: Enable this option to allow users to reinstall the service from the client area.
Allow user to choose backup and snapshot when reinstalling service: Enable this option to allow users to choose a backup and snapshot when reinstalling the service.
Select Placement Group: Choose the placement group for the server from the available options provided by Hetzner.
Select SSH Keys: Choose the SSH keys to be used for accessing the server from the available options provided by Hetzner.
Public Networks: Configure the public network settings for the server. This includes enabling or disabling public IPv4 and IPv6 addresses.
Private Networks: Configure the private network settings for the server.
Select Firewalls: Choose the firewall rules to be applied to the server from the available options provided by Hetzner.
Email configuration: Setting up email templates. Selection of pre-prepared templates to inform the user about some actions:
- Custom Welcome Email: Template for the welcome email.
- Custom start stop service Email: Template for the start/stop service email.
- Custom reset server password Email: Template for the reset server password email.
- Custom snapshot action Email: Template for the snapshot action email.
- Custom backup action Email: Template for the backup action email.
- Custom ISO action Email: Template for the ISO action email.
- Custom reinstall action service Email: Template for the reinstall action service email.
Metric Billing: Configuration for metric billing, including:
- Floating IPv4 addresses: Configure pricing for floating IPv4 addresses.
- Floating IPv6 addresses: Configure pricing for floating IPv6 addresses.
- Bandwidth Usage (GB): Configure pricing for bandwidth usage.
- Snapshot Usage (GB): Configure pricing for snapshot usage.
Email Template (puqHetznerDatacenter Custom Welcome Email)
Hetzner Datacenter module WHMCS
Order now | Download | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template
- Email Type: Product/service
Unique Name: puqHetznerDatacenter Custom Welcome Email
Subject:
Your Server is Now Ready for Use
Body:
Dear {$client_name},
Congratulations! Your server has been successfully deployed and is ready for you to begin configuring.
Server Details:
IPv4 DNS PTR: {$ipv4_dns_ptr}
IPv4 IP: {$ipv4_ip}
IPv6 IP: {$ipv6_ip}
Server Cores: {$server_cores}
Server Memory: {$server_memory}
Server Disk: {$server_disk}
Root Password: {$root_password}
Accessing Your Server
To begin managing your new server, you will need to connect via SSH (Secure Shell). Here’s how you can do that:
Open an SSH client on your computer. For Windows, we recommend using PuTTY, while macOS and Linux users can use the built-in Terminal application.
Connect to your server by executing the following command in your terminal or SSH client:
ssh root@{$ipv4_ip}
When prompted, enter the root password provided below:
Root Password: {$root_password}
Once connected, you’ll have full access to your server’s console and can monitor the installation.
Need Assistance?
If you have any questions or encounter any issues during this process, please do not hesitate to reach out to our support team. We are here to help! You can submit a support ticket via the following link: Submit a Ticket.
Thank you for choosing us as your hosting provider. We’re excited to be part of your journey and are committed to ensuring your experience is successful.
Kind regards,
{$signature}
Email Template (puqHetznerDatacenter Custom start stop service Email)
Hetzner Datacenter module WHMCS
Order now | Download | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template
- Email Type: Product/service
Unique Name: puqHetznerDatacenter Custom start stop service Email
Subject:
{if $server_action eq "start"}Your Server Has Been Successfully Started{/if}{if $server_action eq "stop"}Important: Your Server Has Been Stopped{/if}
Body:
Dear {$client_name},
{if $server_action eq "start"}Your server has been successfully started.{/if}{if $server_action eq "stop"}Your server has been stopped.{/if}
Product/Service: {$service_product_name}
If you have any questions or need further assistance, do not hesitate to contact our support team.
Thank you for choosing us.
{$signature}
Email Template (puqHetznerDatacenter Custom reset password Email)
Hetzner Datacenter module WHMCS
Order now | Download | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template
- Email Type: Product/service
Unique Name: puqHetznerDatacenter Custom reset password Email
Subject:
For user {$user} on Product/Service: {$service_product_name} password has been change
Body:
Dear {$client_name},
You change password for user {$user} on Product/Service: {$service_product_name}. Below is the user logging data.
User: {$user}
New password: {$password}
{$signature}
Email Template (puqHetznerDatacenter Custom snaphot action service Email)
Hetzner Datacenter module WHMCS
Order now | Download | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template
- Email Type: Product/service
Unique Name: puqHetznerDatacenter Custom snaphot action service Email
Subject:
{if $snapshot_action eq "create"}Snapshot started create Successfully{/if}{if $snapshot_action eq "remove"}Snapshot Removed Successfully{/if}{if $snapshot_action eq "rollback"}A restore from your snapshot has been initiated{/if}
Body:
Dear {$client_name},
{if $snapshot_action eq "create"}Snapshot creation started.{/if}{if $snapshot_action eq "remove"}Your snapshot has been successfully removed.{/if}{if $snapshot_action eq "rollback"}A restore from your snapshot has been initiated.{/if}
{if $snapshot_id}Snapshot ID: {$snapshot_id}{/if}
{if $snapshot_description}Snapshot Description: {$snapshot_description}{/if}
{if $service_product_name}Service name: {$service_product_name}{/if}
If you have any questions or need further assistance, do not hesitate to contact our support team.
Thank you for choosing us.
{$signature}
Email Template (puqHetznerDatacenter Custom backup action service Email)
Hetzner Datacenter module WHMCS
Order now | Download | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template
- Email Type: Product/service
Unique Name: puqHetznerDatacenter Custom backup action service Email
Subject:
{if $backup_action eq "enable"}Backup Enabled Successfully{/if}{if $backup_action eq "disable"}Backup Disabled Successfully{/if}{if $backup_action eq "create"}Backup Creation Initiated Successfully{/if}{if $backup_action eq "remove"}Backup Removed Successfully{/if}{if $backup_action eq "restore"}Backup Restoration Initiated Successfully{/if}
Body:
Dear {$client_name},
{if $backup_action eq "enable"}Your backup has been successfully enabled.{/if}{if $backup_action eq "disable"}Your backup has been successfully disabled.{/if}{if $backup_action eq "create"}The creation of your backup has been successfully initiated.{/if}{if $backup_action eq "remove"}Your backup has been successfully removed.{/if}{if $backup_action eq "restore"}The restoration of your backup has been successfully initiated.{/if}
{if $backup_id}Backup ID: {$backup_id}{/if}
{if $backup_description}Backup Description: {$backup_description}{/if}
If you have any questions or need further assistance, do not hesitate to contact our support team.
Thank you for choosing us.
{$signature}
Email Template (puqHetznerDatacenter Custom ISO action service Email)
Hetzner Datacenter module WHMCS
Order now | Download | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template
- Email Type: Product/service
Unique Name: puqHetznerDatacenter Custom ISO action service Email
Subject:
{if $iso_action eq "mount"}ISO Mounted Successfully{/if}{if $iso_action eq "unmount"}ISO Unmounted Successfully{/if}
Body:
Dear {$client_name},
{if $iso_action eq "mount"}Your ISO has been successfully mounted.{/if}{if $iso_action eq "unmount"}Your ISO has been successfully unmounted.{/if}
{if $iso_id}ISO ID: {$iso_id}{/if}
{if $iso_name}ISO Name: {$iso_name}{/if}
{if $iso_description}ISO Description: {$iso_description}{/if}
If you have any questions or need further assistance, do not hesitate to contact our support team.
Thank you for choosing us.
{$signature}
Email Template (puqHetznerDatacenter Custom reinstall action service Email)
Hetzner Datacenter module WHMCS
Order now | Download | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template
- Email Type: Product/service
Unique Name: puqHetznerDatacenter Custom reinstall action service Email
Subject:
Server Rebuild Initiated Successfully
Body:
Dear {$client_name},
We are pleased to inform you that the rebuild of your server has been successfully initiated. The server will be rebuilt using the following image:
Image Name: {$image_name}
Image Description: {$image_description}
Disk Size: {$image_disk_size} GB
Architecture: {$image_architecture}
Image Type: {$image_type}
Please be patient as the rebuild process completes. If you have any questions or need further assistance, do not hesitate to contact our support team.
Thank you for choosing us.
{$signature}