PUQ Mautic

Installation and configuration guide

WHMCS setup(install/update)

Hetzner Datacenter module WHMCS

 Order now | Download | FAQ

Module is coded ionCube v13

Supported php version:

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

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.
  1. Checking the module license
  2. Generating the server name in the format NameServer-[*user_id*]-[*service_id*]
  3. Generating data to create a server
  4. Sending data via API and creating a server
Package change
  1. The package change function allows you to enable and disable backups
Suspending an Account
  1. Checking the module license
  2. Selecting the suspension method: server shutdown or enabling firewall rules
  3. Executing the suspension via API
Unsuspending an Account
  1. Checking the module license
  2. Selecting the restoration method: server power on or restoring firewall rules
  3. Executing the restoration via API
Terminating an Account
  1. Checking the module license
  2. Deleting the server via API
  3. 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

image-1724850441575.png

image-1724851230866.png

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

image-1724853090096.png

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

settingsHetznerDatacenter.png

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:

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:

Metric Billing: Configuration for metric billing, including:

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

image-1724850441575.png

image-1724851230866.png

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

Unique Name: puqHetznerDatacenter Custom Welcome Email

image-1725014242260.png


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}

image-1725014459758.png

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

Unique Name: puqHetznerDatacenter Custom start stop service Email

image-1725014717960.png


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}

image-1725016539213.png

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

Unique Name: puqHetznerDatacenter Custom reset password Email

image-1725018922546.png


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}

image-1725019070065.png

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

Unique Name: puqHetznerDatacenter Custom snaphot action service Email

image-1725200462144.png


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}

image-1725200542055.png

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

Unique Name: puqHetznerDatacenter Custom backup action service Email

image-1725200731607.png


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}

image-1725200882832.png

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

Unique Name: puqHetznerDatacenter Custom ISO action service Email

image-1725200967532.png


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}

image-1725200998574.png

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

Unique Name: puqHetznerDatacenter Custom reinstall action service Email

image-1725201180316.png


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}

image-1725201209597.png