# Basic concepts and requirements

### HestiaCP module **[WHMCS](https://puqcloud.com/link.php?id=77)**

#####  [Order now](https://puqcloud.com/whmcs-module-hestiacp.php) | [Download](https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-HestiaCP/) | [FAQ](https://faq.puqcloud.com/)

#### **Requirements for the successful operation of the module**

- Minimal WHMCS version 8+
- HestiaCP minimal version: 1 +

**HestiaCP configuration:**

<p class="callout warning">**Attention!** To deploy a custom package, you must set the interface language for the account administrator to English.</p>

**WHMCS Configuration:**

<p class="callout warning">**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.</p>

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.

<p class="callout danger">**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.</p>

<p class="callout info">**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.</p>

##### Creating a new Hosting Account.

1. <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">After the client has ordered and paid for the hosting service, as well as previously entered the domain, the following will be performed:</span></span> </span>
    1. <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Checking the license of the module</span></span> </span>
    2. <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Getting available lists of packages from the server to avoid conflicts when deploying a custom package.</span></span> </span>
        1. <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">If the custom package does not exist and custom package deployment is enabled:</span></span> </span>  
            
            1. <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb"> Deploy the package with the create function,</span></span> </span>
            2. <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb"> Create a user account,</span></span> the username is generated, either by the standard WHMCS method or by the Custom method, the way to generate a unique username,</span>
        2. <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb"> If the custom package exists on the server and custom package deployment is enabled:</span></span> </span>  
            
            1. <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb"> Deploy the package with the change function,</span></span> </span>
            2. <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb"> 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,</span></span></span>
        3. <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb"> If custom package deployment is disabled:</span></span> </span>
            1. <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb"> 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,</span></span></span>
    3. <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Add a new domain, if possible.</span></span></span>
    4. <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Additional actions provided by the settings.</span></span></span>

##### 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. <span class="HwtZe" lang="en"><span class="jCAhz ChMk0b"><span class="ryNqvb">Already exists Edit package using the Edit Existing Package function</span></span></span>
                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.

<p class="callout info">**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.</p>

<p class="callout danger">**It is important to use a secure connection with an SSL certificate to keep users safe!**</p>