Docker NextCloud WHMCS module
A module for WHMCS that uses n8n workflows to deploy the NextCloud and NextCloud Office service using Docker.
- Description
- What is NextCloud
- Changelog
- 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)
- Admin Area
- Client Area
Description
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
WHMCS Docker NextCloud module is designed for automated provisioning and comprehensive management of NextCloud and NextCloud Office instances on a Docker server. This powerful integration with WHMCS empowers businesses to efficiently offer cloud-based file storage, collaboration, and office productivity solutions to their clients.
NextCloud Office offers robust productivity tools including integrated document editing, spreadsheet management, and presentations. These office solutions facilitate seamless real-time collaboration, enabling teams to efficiently co-edit documents, share ideas, and enhance productivity without leaving the secure NextCloud environment.
Key Features
🚀 Automated Container Management
- Automatic creation of a NextCloud (with optional NextCloud Office) container upon service order.
- Automated package upgrades and administrator password reset.
🔒 Service Control & Security
- Service creation
- Service suspension and reactivation
- Service termination
- Full reinstallation
- IP access control
🛠️ Advanced Diagnostic Tools
- Built-in tools for diagnosing and managing containers.
🌍 Multilingual Support
- Supports multiple languages, including Arabic, Azerbaijani, Catalan, Chinese, Croatian, Czech, Danish, Dutch, English, Estonian, Farsi, French, German, Hebrew, Hungarian, Italian, Macedonian, Norwegian, Polish, Romanian, Russian, Spanish, Swedish, Turkish, and Ukrainian.
⚙️ Fully Customizable Workflows
- Uses n8n workflows to automate processes, allowing full customization for business-specific needs.
System Requirements
To run the WHMCS Docker NextCloud module, ensure you have:
✅ WHMCS version 8+
✅ An n8n server for workflow automation
✅ A server with Docker installed for container management (Installation Guide)
Installation & Setup
1️⃣ Environment Preparation
- Install WHMCS 8+.
- Set up an n8n server for automation workflows.
- Ensure Docker is installed and running. (Installation Guide)
2️⃣ Module Installation
- Upload and activate the WHMCS Docker NextCloud module.
- Configure the module settings to connect with your Docker server and n8n workflows.
3️⃣ Workflow Customization
- Utilize n8n workflows to automate service provisioning and management.
- Modify workflows as needed for custom business logic.
4️⃣ Testing & Deployment
- Perform a test order to verify automatic container creation.
- Check all service management functions (creation, suspension, unsuspension, termination).
Why Choose This Module?
✅ Seamless automation – Reduces manual work and speeds up service deployment.
✅ Highly customizable – Modify workflows to fit any business model.
✅ User-friendly – Integrated within WHMCS with a simple setup process.
This module makes selling and managing NextCloud and NextCloud Office instances through WHMCS easy, automated, and flexible! 🚀
What is NextCloud
Docker NextCloud module WHMCS
Order now | Download | FAQ | n8n
What is NextCloud? An Overview of the Secure, Self-Hosted Cloud Platform
NextCloud is a powerful, self-hosted cloud platform designed to provide secure, private, and convenient access to your files, documents, and collaborative tools. Unlike traditional cloud services, NextCloud puts the ownership and control of your data directly into your hands, ensuring unmatched privacy and flexibility.
Key Features and Benefits of NextCloud
- Secure File Sharing: Easily and securely share files and folders internally or externally, with granular access permissions.
- Collaboration Tools: Built-in collaborative editing with NextCloud Office (powered by Collabora Online), enabling seamless teamwork on documents, spreadsheets, and presentations in real-time.
- Privacy-Centric: Complete ownership and control of your data, hosted on your own hardware or infrastructure, significantly enhancing data privacy.
- Expandable and Modular: Extend NextCloud's functionality with hundreds of available apps, customizing it to meet specific business or personal requirements.
NextCloud Office: Advanced Document Collaboration
NextCloud Office integrates seamlessly into NextCloud, providing advanced collaboration capabilities directly within your cloud environment. Powered by Collabora Online, NextCloud Office allows teams to create, edit, and collaborate on office documents directly from a web browser, without compromising privacy or security.
- Real-time Collaboration: Edit documents, spreadsheets, and presentations simultaneously with team members from anywhere in the world.
- Compatibility: Fully compatible with Microsoft Office and LibreOffice documents, ensuring a smooth transition and interoperability.
- Privacy-Focused: All documents remain securely on your own infrastructure, without external data leaks or third-party access.
Mobile and Web Accessibility
NextCloud offers robust mobile applications for Android and iOS, ensuring your files, documents, and collaborative spaces are accessible from any device, anywhere. Additionally, the intuitive web interface provides easy access to your cloud environment via any modern web browser.
Who Should Use NextCloud?
NextCloud is ideal for individuals, businesses, and organizations that value data sovereignty, security, and seamless collaboration. Whether you're managing a small business or a large enterprise, NextCloud’s scalability and robust feature set make it a compelling self-hosted solution for your cloud needs.
For those seeking privacy, flexibility, and control over their data and collaborative processes, NextCloud paired with NextCloud Office represents a powerful, secure, and future-ready choice.
Remember to regularly maintain your NextCloud instance and stay updated to ensure security, performance, and reliability.
Changelog
Docker NextCloud module WHMCS
Order now | Download | FAQ | n8n
v1.0 Released 28-03-2025
First version
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:
- 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}
Admin Area
Product Information
Docker NextCloud module WHMCS
Order now | Download | FAQ | n8n
Admin Panel – Container Management Overview
The admin panel is designed to simplify management and is divided into clear sections, providing intuitive controls and real-time data for your NextCloud instance.
Control Buttons
- Container Start / Stop – Initiates or stops the NextCloud container seamlessly.
- Mount Disk / Unmount Disk – Allows administrators to securely attach or detach the container's storage volume, ensuring correct mounting via modifications to the fstab file.
Container Status & Resource Monitoring
- Status – Clearly indicates the container's operational status (Running / Stopped).
- Name – Unique identifier and associated domain for easy reference.
- CPU Usage – Real-time monitoring of container CPU consumption.
- Memory Usage – Live updates on RAM usage.
- Disk IO & Disk Mounted – Detailed input/output activity and mount status of the disk.
- Disk File – Real-time size display of the disk image file.
- Network IO – Comprehensive data on network traffic to and from the container.
- Log Button – Provides immediate access to detailed logs for effective troubleshooting and monitoring.
Application Information & User Management
- Version – Current NextCloud application version.
- Owner – Designated administrative manager.
- Users – List and management of active users with application access.
NextCloud Office Integration
- Real-time Collaboration – Team members can simultaneously collaborate on documents, spreadsheets, and presentations.
- Secure File Sharing – Robust permissions settings for secure internal and external sharing.
- Enhanced Productivity – Integrated tools streamline workflow, allowing teams to achieve more efficiently.
Client Area
Home screen
Docker NextCloud module WHMCS
Order now | Download | FAQ | n8n
Client Area Overview – Logical Structure
The main screen of the client area for the NextCloud service is divided into three logical sections:
This clear and intuitive structure ensures users have easy access to their NextCloud instance, facilitates efficient real-time monitoring of resources, and centralizes critical management functionalities for streamlined operation.
IP Access Control
Docker NextCloud module WHMCS
Order now | Download | FAQ | n8n
In the client area, customers have the ability to manage access to their NextCloud instance by defining a list of allowed IP addresses. This is configured in the Restrict by IP section of the service panel.
Only the IP addresses listed in this section will be allowed to connect to the NextCloud container. All other connections will be blocked for enhanced security.
Note: If no IP addresses are added, the system will allow access from any IP address by default.
Reinstall
Docker NextCloud module WHMCS
Order now | Download | FAQ | n8n
Clients have the ability to fully reinstall their NextCloud instance directly from the client area. This feature is helpful in cases where a clean setup is needed due to misconfiguration or performance issues.
Important: Reinstalling the instance will result in permanent data loss. All files, user accounts, and settings stored within the container will be erased and replaced with a fresh NextCloud installation.
The reinstall process can be launched from the Reinstall page in the client interface. To avoid accidental reinstallation, the module includes a confirmation prompt to protect the user from unintended actions.
Metrics
Docker NextCloud module WHMCS
Order now | Download | FAQ | n8n
If you are using metric-based billing for your NextCloud service (e.g., billing based on bandwidth, disk usage, or other resource consumption), the Metrics tab in the client area provides detailed usage statistics.
This data can help users monitor their usage trends and predict when they may need to upgrade or adjust their current plan. Administrators can also use this data for transparent and accurate billing.