# Synology WHMCS module

# Description

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

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

The module gives the company the ability to offer user accounts on Synology devices. Users can have multiple accounts. Accounts may differ with parameters defined in groups.

<p class="callout info">The module requires an existing, fully deployed Synology machine with properly configured groups and other options (more information later in the manual).</p>

<p class="callout info">The module does not support the installation or configuration of DSM on Synology machines in any way.</p>

Functions:

- Auto create and deploy account on Synology
- The module uses only the API to manage the accounts
- Module supports multilingualism
- The module shows the current and history of data usage by the user
- The module notifies the user about exceeding the data limit
- Link to instructions for setting up the service in the client area.

Available options in the admin panel:

- Create users
- Suspend users
- Unsuspend users
- Terminate users
- Change users password
- Change Package
- API connection status
- Disk status

Available options in the client panel:

- Change user password
- Change Package
- Disk status
- Using disk space statistics


- - - - - -

<p class="callout warning">WHMCS minimal version: 8 +  
Synology DMS v6+/ DSM 7.1.1 -</p>

[![image-1677933667696.png](https://doc.puq.info/uploads/images/gallery/2023-03/scaled-1680-/image-1677933667696.png)](https://doc.puq.info/uploads/images/gallery/2023-03/image-1677933667696.png)

[![image-1677933678373.png](https://doc.puq.info/uploads/images/gallery/2023-03/scaled-1680-/image-1677933678373.png)](https://doc.puq.info/uploads/images/gallery/2023-03/image-1677933678373.png)

[![image-1677933684939.png](https://doc.puq.info/uploads/images/gallery/2023-03/scaled-1680-/image-1677933684939.png)](https://doc.puq.info/uploads/images/gallery/2023-03/image-1677933684939.png)# Changelog

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

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

##### v1.2.1 Released 02-04-2023

1. Adaptation for Synology DSM 7.1.1

- - - - - -

##### v1.2 Released 05-03-2023

1. Support for PHP 8.1 and PHP 7.4
2. Support for Synology DSM 6.x and Synology DSM 7.x
3. Changes made to templates, add icons
4. API timeout set 30

- - - - - -

##### v1.1 Released 23-01-2023

1. Support WHMCS V8.6
2. Support IonCube PHP Loader v12
3. Support for PHP 8.1
4. Changes made to templates
5. In the service settings, the choice of email template was changed to a drop-down menu.
6. Added translations: German, Ukranian

- - - - - -

##### v1.0 Released 01-08-2022

First version# Installation and configuration guide



# WHMCS setup(install/update)

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

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

<p class="callout info">To install and update a module, you must perform one and the same action.</p>

#####  

##### 1. Download the latest version of the module.

PHP 8.1

```Powershell
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Synology/PUQ_WHMCS-Synology-latest.zip
```

PHP 7.4

```Powershell
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Synology/php74/PUQ_WHMCS-Synology-latest.zip
```

<p class="callout info">All versions are available via link: [http://download.puqcloud.com/WHMCS/servers/PUQ\_WHMCS-Synology/](http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Synology/)</p>

##### 2. Unzip the archive with the module.

```Powershell
unzip PUQ_WHMCS-Synology-latest.zip
```

##### 3. Copy and Replace "puqSynology" to "WHMCS\_WEB\_DIR/modules/servers/"

# Synology part setup guide

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

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

Here are the initial steps of configuring Synology devices to prepare them for use with the WHMCS module.

<p class="callout info">At the beginning, you should prepare the appropriate domain with the correct DNS entries so that you can generate a correct SSL certificate for Your Synology NAS server. </p>

##### 1. Generate an SSL certificate for your domain.

Connect the certificate for all services that will be used in the server.(FTPS, System, Synology Drive, etc...)

[![image-1660043277546.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660043277546.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660043277546.png)

##### 2. Make sure the partition is formatted in BTRFS

[![image-1660043720097.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660043720097.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660043720097.png)

#####  

##### 3. Enable the user's home folder.

[![image-1660043845442.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660043845442.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660043845442.png)

#####  

##### 4. Enable all necessary file services (ie: FTP, FTPS, SFTP, etc.).

[![image-1660043988444.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660043988444.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660043988444.png)

##### 5. Create user groups with the necessary quotas and permissions.

[![image-1660043586117.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660043586117.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660043586117.png)

[![image-1660043591654.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660043591654.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660043591654.png)

# WHMCS part setup guide

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

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

##### 1. Download the latest version of the module.

PHP 8.1

```Powershell
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Synology/PUQ_WHMCS-Synology-latest.zip
```

PHP 7.4

```Powershell
wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Synology/php74/PUQ_WHMCS-Synology-latest.zip
```

<p class="callout info">All versions are available via link: [http://download.puqcloud.com/WHMCS/servers/PUQ\_WHMCS-Synology/](http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Synology/)</p>

##### 2. Unzip the archive with the module.

```Powershell
unzip PUQ_WHMCS-Synology-latest.zip
```

##### 3. Copy "puqSynology" to "WHMCS\_WEB\_DIR/modules/servers/"

##### 4. Create new server Synology NAS in WHMCS (System Settings-&gt;Products/Services-&gt;Servers)

```
System Settings->Servers->Add New Server
```

- Enter the correct **Name** and **Hostname**

[![image-1660041299469.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660041299469.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660041299469.png)

- In the **Server Details** section, select the "**PUQ Synology**" module and enter the correct **username** and **password** for the **Synology NAS web interface**.
- To check, click the **"Test connection"** button

[![image-1660041337777.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660041337777.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660041337777.png)

<p class="callout warning">WARNING: **ACCESS HASH** field Used to store the access key to the server and is updated automatically.</p>

##### 5. Create a new Products/Services

##### Add new product to WHMCS

```
System Settings->Products/Services->Create a New Product
```

In the **Module settings** section, select the **"PUQ Synology"** module

[![image-1660042158599.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660042158599.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660042158599.png)

- **License key:** A pre-purchased license key for the **"PUQ Synology"** module. For the module to work correctly, the key must be active
- **Unit:** Packet disk space units
- **Disk space size:** Disk size in this product
- **Notification disk limit email template:** Email template that will be sent when the disk quota is exceeded in %
- **Notification, used disk space X %:** Sets a percentage parameter, after exceeding this parameter a notification will be sent to the user
- **Username prefix/Username suffix:** Necessary in order to generate a username for the service, in the format: **prefix&lt;client\_id&gt;-&lt;service\_id&gt;suffix**
- **Group:** The group that will be assigned to the user on the server side of the **Synology NAS**
- **Save usage history (days):** The number of days it takes to save user disk usage statistics
- **Link to instruction:** Link to the instruction, if filled out, it will be reflected in the client area

# Email Template (puqSynology Notification disk limit)

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

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

##### Create an email template for customer notifications.

```
System Settings->Email Templates->Create New Email Template
```

- **Email Type:** Product/service
- **Unique Name:** puqSynology Notification disk limit

[![image-1660040723161.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660040723161.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660040723161.png)

**Subject:**

```PHP
Disk space usage {$disk_used_percentage} % - {$username}
```

**Body:**

```PHP
Dear {$client_name},

This letter informs you that the disk space usage limit is coming to an end.

Product/Service: {$service_product_name}
Due Date: {$service_next_due_date}

Username: {$username}

Disk limit: {$disk_limit_bytes*$unit_coefficient} {$unit}
Disk used: {$disk_used_unit} {$unit} ({$disk_used_percentage} %)
Disk free: {$disk_free_unit} {$unit} ({$disk_free_percentage} %)


{$signature}
```

[![image-1660040784521.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660040784521.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660040784521.png)

# Add server (Synology NAS)

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

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

##### Add a new server to the system WHMCS.

```
System Settings->Servers->Add New Server
```

- Enter the correct **Name** and **Hostname**

[![image-1660041299469.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660041299469.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660041299469.png)

- In the **Server Details** section, select the "**PUQ Synology**" module and enter the correct **username** and **password** for the **Synology NAS web interface**.
- To check, click the **"Test connection"** button

[![image-1660041337777.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660041337777.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660041337777.png)

<p class="callout warning">WARNING: **ACCESS HASH** field Used to store the access key to the server and is updated automatically.</p>

# Product Configuration

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

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

##### Add new product to WHMCS

```
System Settings->Products/Services->Create a New Product
```

In the **Module settings** section, select the **"PUQ Synology"** module

[![image-1660042158599.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660042158599.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660042158599.png)

- **License key:** A pre-purchased license key for the **"PUQ Synology"** module. For the module to work correctly, the key must be active
- **Unit:** Packet disk space units
- **Disk space size:** Disk size in this product
- **Notification disk limit email template:** Email template that will be sent when the disk quota is exceeded in %
- **Notification, used disk space X %:** Sets a percentage parameter, after exceeding this parameter a notification will be sent to the user
- **Username prefix/Username suffix:** Necessary in order to generate a username for the service, in the format: **prefix&lt;client\_id&gt;-&lt;service\_id&gt;suffix**
- **Group:** The group that will be assigned to the user on the server side of the **Synology NAS**
- **Save usage history (days):** The number of days it takes to save user disk usage statistics
- **Link to instruction:** Link to the instruction, if filled out, it will be reflected in the client area

# Client Area



# Home screen

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

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

The end customer, after logging in to his own customer panel, has access to the following information and options

- Link to the user manual (*which was defined by the administrator when setting up the service.*).
- Synology server adress
- Authorization data
- Usage statistics graph
- Table with data on the use of the service

[![image-1678099657119.png](https://doc.puq.info/uploads/images/gallery/2023-03/scaled-1680-/image-1678099657119.png)](https://doc.puq.info/uploads/images/gallery/2023-03/image-1678099657119.png)

# Email notification

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

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

##### **Below you can see an example of an email notification regarding data limit**

[![image-1660042632227.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660042632227.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660042632227.png)

# Disk statistics

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

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

Client can check the data usage statistics in the menu item **"Used space statistics"**

[![image-1660042692052.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660042692052.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660042692052.png)

##### Disk Usage Charts

[![image-1660042718979.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660042718979.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660042718979.png)

# Admin Area



# Product Information

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

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

##### Product Information Screen

[![image-1660042847883.png](https://doc.puq.info/uploads/images/gallery/2022-08/scaled-1680-/image-1660042847883.png)](https://doc.puq.info/uploads/images/gallery/2022-08/image-1660042847883.png)

