PUQ Mautic

Installation and configuration guide

Basic concepts and requirements

Docker NextCloud module WHMCS 

Order now | Download | FAQ | n8n

Before you start, it is important to read and familiarize yourself with the following articles at this link:
https://doc.puq.info/books/docker-modules

The WHMCS Docker NextCloud module is part of the WHMCS Docker module series developed by PUQcloud. This module enables service providers to offer NextCloud and NextCloud Office Docker containers as a service to their clients, supporting seamless automation and integration.

The system consists of three core components:

🖥️ WHMCS Module

The core component, installed in WHMCS, handles service provisioning and automation directly within WHMCS, providing an intuitive interface for managing NextCloud instances.

📡 Debian 12 Server

A dedicated server running Debian 12, equipped with:
✅ Docker – For efficient container management

Detailed instructions for installing and configuring Docker are available here:
https://doc.puq.info/books/docker-modules/page/installing-docker-for-puqcloud-modules

🔗 n8n Server

This component bridges communication between the WHMCS module and the Docker server, ensuring seamless workflow automation and efficient service provisioning.
To learn more about n8n’s powerful capabilities, visit the official n8n website for extensive documentation, tutorials, and community support.


Key Features & Concepts

⚙️ Workflow Automation

Using n8n’s visual workflow builder, automate numerous critical tasks, such as:
✔️ Automated provisioning of NextCloud and NextCloud Office
✔️ Sending notifications to users and administrators
✔️ Configuring firewall and security settings
✔️ Managing DNS and domain configurations
✔️ Custom automations tailored specifically to your business needs

🔄 Flexibility & Customization

The NextCloud module offers extensive personalization and elastic automation, empowering you to fully customize n8n workflows and seamlessly integrate NextCloud into your existing infrastructure.

WHMCS setup (install/update)

Docker NextCloud module WHMCS 

Order now | Download | FAQ | n8n

Module is coded ionCube v13

Supported php version:

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

1. Download the latest version of the module.

PHP 8.2

wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Docker-NextCloud/php82/PUQ_WHMCS-Docker-NextCloud-latest.zip

PHP 8.1

wget http://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Docker-NextCloud/php81/PUQ_WHMCS-Docker-NextCloud-latest.zip

PHP 7.4

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

All versions are available via link: https://download.puqcloud.com/WHMCS/servers/PUQ_WHMCS-Docker-NextCloud/

2. Unzip the archive with the module.
unzip PUQ_WHMCS-Docker-NextCloud-latest.zip
3. Copy and Replace "puqDockerNextCloud" from "PUQ_WHMCS-Docker-NextCloud" to "WHMCS_WEB_DIR/modules/servers/"

Preparing Docker Server

Docker NextCloud module WHMCS 

Order now | Download | FAQ | n8n

To install the Docker server for this module, please follow the instructions at the following link:


https://doc.puq.info/books/docker-modules/page/installing-docker-for-puqcloud-modules

Setting up n8n workflow

Docker NextCloud module WHMCS 

Order now | Download | FAQ | n8n

Overview

The Docker NextCloud WHMCS module leverages a sophisticated workflow for n8n, designed to automate the comprehensive deployment, configuration, and management processes for NextCloud and NextCloud Office services. Through its intuitive API interface, the workflow securely receives commands and orchestrates predefined tasks via SSH on your Docker-hosted server, ensuring streamlined operations and efficient management.

Prerequisites

Installation Steps

Install the Required Workflow on n8n

You can select from two convenient installation options:

Option 1: Use the Latest Version from the n8n Marketplace

Option 2: Manual Installation

n8n Workflow API Backend Setup for WHMCS

Configure API Webhook and SSH Access

Modify Template Parameters

Adjust and update the following critical parameters to match your deployment specifics:

image-1743075984756.png

Do not alter the following technical parameters to avoid workflow disruption: screen_left, screen_right.

Deploy-docker-compose Configuration

Fine-tune Docker Compose configurations tailored specifically for these critical operational scenarios:

docker-compose

nginx Configuration Management

Enhance and customize proxy server configurations using the dedicated nginx workflow element:

nginx

Bash Script Automation

Automate Docker container management and related server tasks through dynamically generated Bash scripts within n8n. Scripts execute securely via SSH and provide responses in JSON or plain text formats for easy parsing and logging.

bash scripts

 

 

Add server

Docker NextCloud module WHMCS 

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

server hostname

Attention: Important Information

The hostname field must precisely match the domain configured as server_domain in the n8n workflow. Misalignment between these parameters will disrupt the communication between WHMCS and Docker. Furthermore, ensure this domain is configured so that all subdomains point correctly to the Docker server's IP address.

server details

In the Server Details section, choose the module "PUQ Docker NextCloud". Enter the accurate username and password as configured for the API endpoint in the n8n workflow.

Additionally, input the URL of the API entry point from the n8n workflow into the Access Hash field.

image-1743079288684.png

image-1743079218618.png

 

 

 

Product Configuration

Docker NextCloud module WHMCS 

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

In the Module settings section, select the "PUQ Docker NextCloud" module.

image-1743080274021.png

Metric Billing

Docker NextCloud module WHMCS 

Order now | Download | FAQ | n8n

To bill specific metrics individually, you can utilize the standard WHMCS Metric Billing mechanism integrated with the Docker NextCloud module.

To configure Metric Billing, you must activate the relevant metrics and define the desired pricing. Metrics billing utilizes the default WHMCS functionality. For detailed documentation on how WHMCS Metric Billing operates, visit:

https://docs.whmcs.com/products/configuration-options/usage-billing/

metric billing setup

metric pricing setup

Email Template (puqDockerNextCloud Welcome Email)

Docker NextCloud module WHMCS 

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

image-1743080981334.png

Subject: 

NextCloud Service Activation

Body:

Dear {$client_name},

We are pleased to inform you that your NextCloud service order has been successfully accepted.

Product/Service: {$service_product_name}
Payment Method: {$service_payment_method}
Amount: {$service_recurring_amount}
Billing Cycle: {$service_billing_cycle}
Next Due Date: {$service_next_due_date}

Your NextCloud instance is currently being installed and configured. It will be ready for use within approximately 5 minutes.

You can access your NextCloud instance using the following link:

https://{$service_domain}/

On your first login, please use the provided credentials or set up your account if prompted.

Thank you for choosing our services. We look forward to providing you with a secure and powerful NextCloud experience.

Warm regards,
{$signature}

image-1743081040217.png

 

 

Email Template (puqDockerNextCloud Update Email)

Docker NextCloud module WHMCS 

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

image-1743081421389.png

Subject: 

NextCloud Service Update Notification

Body:

Dear {$client_name},

Your NextCloud instance is currently undergoing a routine update to enhance performance and security.

You will be able to access your NextCloud service again within approximately 3 minutes.

Access your NextCloud server here:

https://{$service_domain}/

Thank you for your patience and for choosing our NextCloud services.

Best regards,
{$signature}

image-1743081470342.png

 

 

Email Template (puqDockerNextCloud Notification disk limit)

Docker NextCloud module WHMCS 

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

image-1743081742883.png

Subject: 

NextCloud Disk Usage Alert: {$disk_used_percentage}% Used

Body:

Dear {$client_name},

We would like to inform you that your NextCloud service is approaching its disk space limit. Please take immediate action to avoid any potential interruptions to your service.

Service Details:

Product/Service: {$service_product_name}
Domain: {$service_domain}
Total Disk Space: {$disk_total}
Used Disk Space: {$disk_used} ({$disk_used_percentage}%)

Consider removing unnecessary files, or contact us to upgrade your disk space plan.

Thank you for your attention.

Best regards,
{$signature}

image-1743081769114.png