Installation and configuration guide
- Basic concepts and requirements
- WHMCS setup (install/update)
- Preparing Docker Server
- Setting up n8n workflow
- Add server
- Product Configuration
- Metric Billing
- Email Template (puqDockerNextCloud Welcome Email)
- Email Template (puqDockerNextCloud Update Email)
- Email Template (puqDockerNextCloud Notification disk limit)
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:
- php 7.4 WHMCS 8.11.0 -
- php 8.1 WHMCS 8.11.0 +
- php 8.2 WHMCS 8.11.0 +
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
- You must deploy your own dedicated n8n server to manage workflows effectively.
- Alternatively, you may opt for the official n8n cloud-based solutions accessible via: n8n Official Site
- Your Docker server must be accessible via SSH with necessary permissions.
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
- The latest workflow templates are continuously updated and available on the n8n marketplace.
- Explore all templates provided by PUQcloud directly here: PUQcloud on n8n
Option 2: Manual Installation
- Each module version includes a bundled workflow template file.
- Import this workflow file directly into your n8n server manually.
n8n Workflow API Backend Setup for WHMCS
Configure API Webhook and SSH Access
- Create a secure Basic Auth Credential for Webhook API interactions within n8n.
- Create an SSH Credential within n8n to securely communicate with the Docker host.
Modify Template Parameters
Adjust and update the following critical parameters to match your deployment specifics:
server_domain
â Set this to the domain of your WHMCS Docker server.clients_dir
â Specify the directory where user data and related resources will be stored.mount_dir
â The standard mount point for container storage (recommended to remain unchanged).
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:
- Initial service provisioning and setup
- Service suspension and subsequent unlocking
- Service configuration updates
- Routine service maintenance tasks
nginx Configuration Management
Enhance and customize proxy server configurations using the dedicated nginx workflow element:
- main: Define specialized parameters within the server configuration block.
- main_location: Set custom headers, caching policies, and routing rules for the root location.
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.
- Scripts are conveniently linked directly to the SSH action elements.
- You retain complete flexibility to adapt or extend these scripts as necessary to meet your precise operational requirements.
Â
Â
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
- Enter the correct Name and Hostname for your server.
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.
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.
Â
Â
Â
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.
- License key â A pre-purchased, active license key for the "PUQ Docker NextCloud" module is required for proper operation.
- Disk space â Specifies the disk space allocated to the NextCloud Docker container.
- CPU â Sets the CPU usage limit for the Docker container.
- RAM â Determines the amount of RAM allocated to the Docker container.
- Link to instruction â URL to documentation or instructions that will appear in the client's service management panel, if provided.
- Main domain â The primary domain for accessing NextCloudâs web interface. If left empty, the domain specified in the serverâs hostname setting will be used.
- Subdomain â Assigns an individual subdomain for each service. If left blank or if the subdomain already exists, it will automatically generate using the format {user_id}-{service_id}.
-
Supported Macros for App Subdomain:
- {user_id} â Client ID
- {service_id} â Service ID
- {random_digit_x} â Generates random digits (x specifies length)
- {random_letter_x} â Generates random letters (x specifies length)
- {unixtime} â Current Unix timestamp
- {year}, {month}, {day}, {hour}, {minute}, {second} â Date and time values
- Notification, used disk space X % â Defines the percentage threshold of disk usage at which the client receives a notification alert.
- Notification disk limit email template â Select an email template that will be sent automatically when the disk usage threshold is reached.
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/
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
- Email Type: Product/service
- Unique Name: puqDockerNextCloud Welcome Email
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}
Â
Â
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
- Email Type: Product/service
- Unique Name: puqDockerNextCloud Update Email
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}
Â
Â
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
- Email Type: Product/service
- Unique Name: puqDockerNextCloud Notification disk limit
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}