Use this comprehensive n8n workflow template to automate Docker Nextcloud provisioning, suspension, termination, and monitoring via a powerful API backend, ideal for integration with WHMCS or WISECP.
Download this n8n workflow template and start using it instantly.
Hosting providers or system integrators using WHMCS or WISECP.
DevOps specialists requiring an automation layer (n8n) to manage Docker deployment and resource allocation.
Users needing a centralized control panel to provision Nextcloud instances on specific host servers.
Developers looking for advanced n8n templates involving heavy SSH scripting and infrastructure orchestration.
This specialized n8n workflow provides a secure and high-level abstraction layer over raw infrastructure operations. Instead of manually running complex Docker Compose commands and shell scripts on multiple servers, external applications (like billing systems) trigger specific actions via a single API endpoint (the n8n trigger).
This robust n8n workflow manages the entire lifecycle of a Nextcloud deployment—including dynamic creation of dedicated disk images (data.img), mounting them via fstab, configuring Docker Compose for Nextcloud, MariaDB, Redis, and Collabora (Office), setting up Nginx VHOST files, and performing application-level commands (like managing users or checking versions) using the Nextcloud occ command line utility. This makes infrastructure management highly scalable and reliable, leveraging the flexibility of n8n nodes for complex technical orchestration.
The entire process is initiated by an external system sending a request to the n8n webhook trigger.
API n8n trigger receives a POST request containing the command (e.g., 'create', 'suspend', 'stats') and client parameters (domain, resource limits, server name). The flow first verifies that the target server_domain is permitted using an If n8n node.Deploy-docker-compose, nginx): For provisioning or package changes, subsequent Set nodes dynamically generate the necessary docker-compose.yml (defining Nextcloud, MariaDB, Redis, and Collabora containers with resource limits) and customized Nginx configuration templates.Service Actions, Container Stats, NextCloud): The main logic utilizes multiple Switch n8n node instances to route the request based on the specific command.Set Nodes): The relevant action (e.g., Deploy, Suspend, Stat, Change Password) is routed to a corresponding Set n8n node. These nodes store complex, parameterized Bash scripts that handle file creation, disk management (using fallocate, mkfs.ext4, and losetup), Docker operations (docker-compose up/down, docker exec), Nginx configuration deployment, and asynchronous Nextcloud Office (Collabora) configuration.Servers Switch & SSH n8n node): The Servers Switch n8n node directs the dynamically generated Bash script to the correct physical Docker host via the appropriate SSH n8n node credential (d01-test.uuq.pl or d02-test.uuq.pl).Code n8n node, converting the shell script result into a consistent JSON response structure before returning it to the external billing system via the API answer2 Respond to Webhook n8n node.To deploy this powerful n8n workflow, follow these steps:
API n8n trigger uses Basic Authentication (nextcloud credential name). You must create this credential with a secure username and password that your external system will use to call the n8n workflow.d01-test.uuq.pl and d02-test.uuq.pl SSH n8n node credentials. These must be set up to access your Linux Docker host servers, preferably using SSH key authentication or password access, ensuring the user has appropriate sudo permissions to manage Docker and system files (/etc/fstab).DNS Parametrs n8n node with your PowerDNS API URL and API Key.Parametrs n8n node and update the configuration:clientsdir: The base directory on the Docker hosts where client files and Docker Compose configurations are stored (e.g., /opt/docker/clients).mountdir: The root mount point for disk images (e.g., /mnt).This n8n workflow heavily relies on core functionality and custom scripting:
API (Webhook Trigger): The entry point n8n trigger. It listens for POST requests on the configured path (/docker-nextcloud) using Basic Auth to start the provisioning and management process.
If / Switch Nodes (If, If1, If2, Servers Switch, Service Actions, Container Stats, NextCloud): A complex network of flow control n8n node logic used to analyze the input command and route the execution path to the correct management script (e.g., deploy vs. suspend, stats vs. change password).
Parametrs (Set n8n node): Holds global variables (like file paths and directory structures) that are dynamically injected into the shell scripts, centralizing configuration for the entire n8n workflow.
Deploy-docker-compose / nginx (Set n8n node): These Set nodes generate the complete configuration files (docker-compose.yml and Nginx vhost snippets) dynamically using expressions based on input parameters (RAM, CPU, domain, passwords).
Deploy / Suspend / Terminated (Set n8n node): These nodes contain large, multi-step Bash scripts. For example, the Deploy script handles directory creation, disk image creation (fallocate), formatting (mkfs.ext4), mounting (via fstab), copying Nginx configurations, starting containers (docker compose up -d), and running background setup tasks for Collabora Office.
Stat / Inspect / Log (Set n8n node): Contain Bash scripts designed to execute Docker CLI commands (docker inspect, docker stats, docker logs) remotely and parse the output for structured JSON responses.
d01-test.uuq.pl / d02-test.uuq.pl (SSH n8n node): These are the critical execution nodes. They take the generated Bash script from the preceding Set node and execute it on the designated remote host server, providing the bridge between the n8n automation and the Docker infrastructure.
Add record / Delete record (HTTP Request n8n node): Used to interact with the PowerDNS API for automated domain record updates (CNAME records) after provisioning or termination.
Use this powerful n8n workflow template to deploy, manage, and scale MinIO Docker containers. Integrate seamlessly as an API backend for WHMCS or WISECP using SSH and custom scripting.

Use this n8n workflow to automate the deployment, scaling, and lifecycle management of Dockerized InfluxDB instances via a secure API backend, ideal for WHMCS and WISECP integrations.

Use this robust n8n workflow as an API backend to automate the deployment, monitoring, suspension, and termination of Immich Docker containers. Essential n8n templates for hosting providers using WHMCS or WISECP.

Use this powerful n8n workflow template to deploy, provision, manage, and monitor Docker containers remotely via an API integrated with WHMCS or WISECP, leveraging robust SSH scripting.

Deploy new n8n templates and n8n workflow configurations automatically from Google Drive to your n8n instance using the n8n API. This n8n workflow handles JSON cleanup and tagging.

Deploy a Google Gemini-powered AI assistant using this advanced n8n workflow. Automate email, calendar, and general tasks directly from WhatsApp using specialized n8n templates and custom n8n node configurations.

PUQ sp. z o.o. is an international IT company building solutions to automate cloud and IT service sales. We created PUQcloud — a free, open-source platform for billing, automation, and IT business management. We also develop modules for WHMCS and WISECP, helping people start their own business without big tech. Our offices are in Poland and Canada, with a global team.







































