PUQ Mautic

Installation and configuration guide

1. WHMCS setup(install/update)

 Order now | Dowload | FAQ
 

To install and update a module, you must perform one and the same action.

 
1. Download the latest version of the module.

PHP 8.X

wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HestiaCP/PUQ_WHMCS-HestiaCP-latest.zip

PHP 7.4

wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HestiaCP/php74/PUQ_WHMCS-HestiaCP-latest.zip

All versions are available via link: http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HestiaCP/

2. Unzip the archive with the module
unzip PUQ_WHMCS-HestiaCP-latest.zip
3. Copy and Replace "puqHestiaCP" to "WHMCS_WEB_DIR/modules/servers/"
 

Basic concepts and requirements

 Order now | Dowload | FAQ

Requirements for the successful operation of the module

HestiaCP configuration:

Attention! To deploy a custom package, you must set the interface language for the account administrator to English.

WHMCS Configuration:

Attention! Let's Encrypt certificate generation takes longer than any other request.
In order to avoid the "Troubleshooting an Argument 1 passed ... must be an instance of PDOStatement Error" error, some configuration changes must be made.

Let's go to:

nano /etc/mysql/my.cnf

The changes are by 30 sec or more:

wait_timeout=30
long_query_time=30

After changing the configuration, you need to restart the service:

service mysql restart

The logic of the module.

Important! When you change the package settings in the module settings in WHMCS, the settings on the server will not be applied to already deployed packages. In order to apply the settings to the existing packages on the server, you can refresh parameters by click on the "Change Package" button for any client who has this package. New changes will be also applied as soon as a new service in this package is ordered.

Note! The custom package that you have configured in WHMCS will only be deployed if the "Use the package parameters" setting is enabled. And if the "Use the package parameters" setting is unchecked, the package from the "Chose pakage on server" dropdown list of packages will be used.

Creating a new Hosting Account.
  1. After the client has ordered and paid for the hosting service, as well as previously entered the domain, the following will be performed:
    1. Checking the license of the module
    2. Getting available lists of packages from the server to avoid conflicts when deploying a custom package. 
      1. If the custom package does not exist and custom package deployment is enabled: 
        1. Deploy the package with the create function, 
        2. Create a user account, the username is generated, either by the standard WHMCS method or by the Custom method, the way to generate a unique username,
      2. If the custom package exists on the server and custom package deployment is enabled: 
        1. Deploy the package with the change function, 
        2. Create a user account, the username is generated, either by the standard WHMCS method or by the Custom method, the way to generate a unique username,
      3. If custom package deployment is disabled: 
        1. Create a user using a package from the drop-down list that is available in the settings, the username is generated, either by the standard WHMCS method or by the Custom method, the way to generate a unique username,
    3. Add a new domain, if possible.
    4. Additional actions provided by the settings.
Package change
  1. After you click on the change package button, the following actions will be performed:
    1. License check
    2. Getting a list of server packages to avoid conflicts during deployment of a custom package
      1. If custom package deployment is enabled:
        1. If package:
          1. Already exists Edit package using the Edit Existing Package function
          2. Does not exist then Create a new package using the create new package function
      2. If the deployment of a custom package is disabled, then the package is changed using the drop-down list in the module settings.

The logic of the filemanager.

The file manager that comes with the module is a regular web application that connects to the server via the FTP protocol via a secure communication channel and allows you to interactively manage files, manage archives, and also edit text files.

After the user clicks on the button connects to the file manager, tokenization data will be sent to the remote server where they will be received, and the user will be able to perform actions with his profile.

Note for the administrator. The file manager can be deployed on any hosting account with php7.4, it is also worth considering how resource intensive your use will be.

It is important to use a secure connection with an SSL certificate to keep users safe!

 

 

 

 

Setup guide: Install HestiaCP on server

 Order now | Dowload | FAQ

Logo.pngHestia Control Panel

Step 1: Make sure that your server is running a supported operating system (amd64 or arm64):
Step 2: Log in as the system user (root):

You'll need to connect to your server as root, either directly from the console or remotely using SSH.

Step 3: Download the installer:

wget https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install.sh

Step 4: Run the installer and follow the prompts:

bash hst-install.sh

To perform an unattended installation (with defaults):

bash hst-install.sh --interactive no --email email@domain.tld --password p4ssw0rd --hostname hostname.domain.tld -f

Or modify your installation with for exmaple:

bash hst-install.sh --apache no --postgresql yes --clamav no --spamassassin no

 

Will install Hestia without Apache2, ClamAV and Spamassassin How ever it will install Postgresql as additional feature

More options or examples can be found in the Documentation or use the Install string generator

Reporting bugs and issues:

If something isn't working as expected on HestiaCP, please report the issue to our development team on GitHub.

Please include:

License

Hestia Control Panel is open-source and licensed under GPLv3.

Setup guide: WHMCS preparation and configuration

 Order now | Dowload | FAQ
1. Download the latest version of the module.

PHP 8.X

wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HestiaCP/PUQ_WHMCS-HestiaCP-latest.zip

PHP 7.4

wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HestiaCP/php74/PUQ_WHMCS-HestiaCP-latest.zip

All versions are available via link: http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HestiaCP/

2. Unzip the archive with the module
unzip PUQ_WHMCS-HestiaCP-latest.zip
3. Copy "puqHestiaCP" to "WHMCS_WEB_DIR/modules/servers/"
4. Create new server HestiaCP in WHMCS (System Settings->Products/Services->Servers)
System Settings->Servers->Add New Server

image-1666496386936.png

image-1666496559639.png

5. Create a new Products/Services
System Settings->Products/Services->Create a New Product

 

In the Module settings section, select the "PUQ HestiaCP" module

image-1682430242943.png

5. WHMCS configuration

Attention! Let's Encrypt certificate generation takes longer than any other request.
In order to avoid the "Troubleshooting an Argument 1 passed ... must be an instance of PDOStatement Error" error, some configuration changes must be made.

Let's go to:

nano /etc/mysql/my.cnf

The changes are by 30 sec or more:

wait_timeout=30
long_query_time=30

After changing the configuration, you need to restart the service:

service mysql restart

 

 

 

 

Setup guide: Downloading backups description and configuration

 Order now | Download | FAQ

In order to gain the ability to download backups directly from the WHMCS billing system, you can use this functionality. This feature is implemented by deploying a custom script to the root directory of the administrator's website. Once the script is created, users will be able to download backups by exchanging tokens and hashes between the billing system.

Note: Only the admin account has access to the backup files. Only those sites that were created in the administrator account will have access to backups

In order for the backup to be downloaded, it is necessary to create a new template based on the existing one with a suitable configuration for example:

1. Copy an existing template with a custom name

cp /usr/local/hestia/data/templates/web/php-fpm/PHP-8_1.tpl /usr/local/hestia/data/templates/web/php-fpm/download_backups.tpl

2. Let's edit the created template, add a directory with backups to the line with php_admin_value[open_basedir], at the end of the line

nano /usr/local/hestia/data/templates/web/php-fpm/download_backups.tpl

The line will look something like this:

php_admin_value[open_basedir] = /home/%user%/.composer:/home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/private:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt:/backup

3. Activate the template on the server

Снимок экрана 2023-04-26 002743.png

 

Setup guide: Filemanager preparation and configuration

 Order now | Dowload | FAQ

1. Simple installation Filemanager

1. Prepare hosting for the file manager.

Minimum Requirements: PHP 7.2.5+ (with php-zip extension)

2. Download the latest version filemanager from the module folder.
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HestiaCP/filemanager/filemanager.zip

All versions are available via link: http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HestiaCP/filemanager/

2. Unzip the archive with the Filemanager and upload them to your PHP server
unzip filemanager.zip
3. Make sure your webserver can read and write to ../repository/ and ../private/ folders
4. Set the website document root to ../dist/ directory. This is also known as 'public' folder

NOTE: For security reasons filegator/dist is the ONLY folder you want to be exposed through the web. Everything else should be outside of your web root, this way people can’t access any of your important files through the browser. If you run the script from the root folder, you will see the message 'Development mode' as a security warning.

2. Advanced installation Filemanager

1. Installing a file manager

The original instructions for installing and configuring the file manager https://docs.filegator.io/install.html

Minimum Requirements: PHP 7.2.5+ (with php-zip extension)

Download precompiled build

Precompiled build is created for non-developers. In this version, the frontend (html, css and javascript) is compiled for you and the source code is removed so the final archive contains only minimum files.

NOTE: For security reasons filegator/dist is the ONLY folder you want to be exposed through the web. Everything else should be outside of your web root, this way people can’t access any of your important files through the browser. If you run the script from the root folder, you will see the message 'Development mode' as a security warning.

Install on fresh Ubuntu 18.04 or Debian 10.3

On a new server login as root and enter this into the shell:

apt update
apt install -y wget unzip php apache2 libapache2-mod-php php-zip php-mbstring php-dom php-xml

cd /var/www/
wget https://github.com/filegator/static/raw/master/builds/filegator_latest.zip
unzip filegator_latest.zip && rm filegator_latest.zip

chown -R www-data:www-data filegator/
chmod -R 775 filegator/

echo "
<VirtualHost *:80>
DocumentRoot /var/www/filegator/dist
</VirtualHost>
" >> /etc/apache2/sites-available/filegator.conf

a2dissite 000-default.conf
a2ensite filegator.conf
systemctl restart apache2

exit

Open your browser and go to http://your_server_ip_address

Show your support
Upgrade instructions

Which versions am I running? Look for APP_VERSION inside dist/index.php file

2. Installing API script and file manager configuration script

1. Download the latest version API script and file manager configuration script from the module folder.
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HestiaCP/filemanager/api/Filegator-api-for-HestiaCP-module.zip

All versions are available via link: http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HestiaCP/filemanager/api/

2. Unzip the archive with the API script and file manager configuration script and upload them to your PHP server
unzip Filegator-api-for-HestiaCP-module.zip

Attention! The configuration.php file must be located in the root folder of your file manager. The api.php file must be located in the /dist folder of your file manager.

 

Add server (HestiaCP)

 Order now | Download | FAQ
Add a new server to the system WHMCS.
System Settings->Servers->Add New Server

image-1666496386936.png

image-1666496559639.png

Product Configuration

 Order now | Dowload | FAQ
Add new product to WHMCS
System Settings->Products/Services->Create a New Product

In the Module settings section, select the "PUQ HestiaCP" module

image-1682500275998.png

 

 

 

Email Template (puqHestiaCP end of place email)

 Order now | Dowload | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template

Unique Name: puqHestiaCP end of place email

image-1666610597659.png
Subject:

Space in your hosting account {$user} is running out

Body:

Dear {$client_name},


You are running out of free space in the Product/Service: {$service_product_name}.

You have already used {$used_spase_procentes} percent of space.

Total free space used: {$used_spase}

Maximum allowable space up to: {$disk_quota}


{$signature}

image-1666611293210.png

Email Template (puqHestiaCP Database email reset password/username)

 Order now | Dowload | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template

Unique Name: puqHestiaCP Database email reset password/username

image-1666611454109.png

Subject:

On Database {$dbname} change password or username

Body:

Dear {$client_name},


Password or Username of Database has been change. Below is the user logging data.

Database Name: {$dbname}
Database Username: {$dbusername}
Password: {$dbpassword}

{$signature}

image-1666611579689.png

Email Template (puqHestiaCP Database is ready)

 Order now | Dowload | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template

Unique Name: puqHestiaCP Database is ready

image-1666611950297.png

Subject:

New Database {$dbname} is ready

Body:

Dear {$client_name},


You have created a new Database on Product/Service: {$service_product_name}. Below is the user logging data.

Database Name: {$dbname}
Database Username: {$dbusername}
Password: {$dbpassword}
Type: {$type}
Charset: {$charset}

{$signature}

image-1666612032541.png

Email Template (puqHestiaCP Reset email password)

 Order now | Dowload | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template

Unique Name: puqHestiaCP Reset email password

image-1666612164112.pngSubject:

Password has been change for e-Mail Account {$email}

Body:

Dear {$client_name},


Yor password has been change for e-Mail account {$email} on Product/Service: {$service_product_name}. 
Below is the user logging data.

Hostname: {$hostname}
Email: {$email}
Password: {$password}
Webmail: http://webmail.{$hostname}
Hostname: mail.{$hostname}


IMAP SETTINGS
Authentication: Normal Password
SSL/TLS: Port 993
STARTTLS: Port 143
No encryption: Port 143

POP3 SETTINGS
Authentication: Normal Password
SSL/TLS: Port 995
STARTTLS: Port 110
No encryption: Port 110

SMTP SETTINGS
Authentication: Normal Password
SSL/TLS: Port 465
STARTTLS: Port 587
No encryption: Port 25


{$signature}

image-1666612309917.png

Email Template (puqHestiaCP e-Mail Account is ready)

 Order now | Dowload | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template

image-1666612442813.pngSubject:

e-Mail Account {$email} is ready

Body:

Dear {$client_name},


You have created a new e-Mail account on Product/Service: {$service_product_name}. 
Below is the user logging data.

Hostname: {$hostname}
Email: {$email}
Password: {$password}
Webmail: http://webmail.{$hostname}
Hostname: mail.{$hostname}


IMAP SETTINGS
Authentication: Normal Password
SSL/TLS: Port 993
STARTTLS: Port 143
No encryption: Port 143

POP3 SETTINGS
Authentication: Normal Password
SSL/TLS: Port 995
STARTTLS: Port 110
No encryption: Port 110

SMTP SETTINGS
Authentication: Normal Password
SSL/TLS: Port 465
STARTTLS: Port 587
No encryption: Port 25


{$signature}

image-1666612546508.png

Email Template (puqHestiaCP Reset FTP password)

 Order now | Dowload | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template

Unique Name: puqHestiaCP Reset FTP password

image-1666612659373.pngSubject:

For FTP user {$user} on domain {$domain} password has been change

Body:

Dear {$client_name},


Has been change password for user {$user} on Product/Service: {$service_product_name}. 
Below is the user logging data.

Server: {$domain}
User: {$user}
New password: {$password}
Port:21

{$signature}

image-1666612777810.png

Email Template (puqHestiaCP FTP User is ready)

 Order now | Dowload | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template

Unique Name: puqHestiaCP FTP User is ready

image-1666612877572.pngSubject:

New FTP user has been created

Body:

Dear {$client_name},


You have created a new FTP user on Product/Service: {$service_product_name}. 
Below is the user logging data.

Server: {$server}
User: {$user}
Password: {$password}
Port: 21

{$signature}

image-1666612960950.png

Email Template (puqHestiaCP Reset service password)

 Order now | Dowload | FAQ
Create an email template for customer notifications.
System Settings->Email Templates->Create New Email Template

image-1666613088744.pngSubject:

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-1666613180530.png