Use this powerful n8n workflow as an API backend for WHMCS/WISECP to automate Docker Grafana deployment, suspension, termination, resource scaling, and container control via secure SSH execution.
Download this n8n workflow template and start using it instantly.
Hosting Providers: Companies utilizing WHMCS or WISECP that need to offer automated Grafana services based on Docker containers. DevOps Teams: Professionals seeking a robust n8n automation solution for remote server management and deployment orchestration.* n8n Automation Specialists: Users looking for advanced examples of integrating n8n with infrastructure management via SSH.
This specialized n8n templates solution solves the challenge of linking client billing actions (like 'Create Service' or 'Suspend') performed in WHMCS or WISECP directly to physical server management commands (like docker compose up or disk mounting/resizing). The entire process is abstracted behind a secure n8n webhook API. By leveraging the power of the n8n node ecosystem combined with dynamic Bash scripting, this n8n workflow ensures reliable deployment, resource management (CPU, RAM, Disk), container control (start/stop), and Nginx configuration updates on the target Docker server, making it an essential automation tool for offering managed Grafana hosting services.
The automated process begins with the API n8n trigger (Webhook node) listening for POST requests carrying specific service commands (e.g., create, terminate) from the billing system.
Parametrs n8n node loads default configuration variables. An If n8n node performs a critical security check, validating the incoming server_domain against the expected domain. Invalid requests are immediately halted with a 422 error.Switch n8n nodes (If1, Service Actions, Container Actions, Container Stat, Grafana) to route the request based on the requested command parameter.Deploy, Suspend, Mount Disk), a dedicated Set n8n node dynamically constructs a comprehensive, idempotent Bash script, incorporating variables like the domain, disk size, and user credentials received from the n8n trigger input.SSH n8n node, which executes it on the remote Docker server using predefined credentials.Code1 n8n node receives the raw stdout/stderr output from the SSH session. It parses this output, standardizing it into a clean JSON format ({ "status": "success" } or { "status": "error", "message": "..." }).API answer n8n node sends the standardized JSON result back to the calling billing system, confirming the outcome of the requested operation.To deploy this powerful n8n workflow template, follow these steps:
API n8n node (Webhook) to use Basic Authentication. You must create and link a Basic Auth credential (IwjFGVb8SRb9Lm4u in the example, named 'Grafana') which will secure the API endpoint. The caller (WHMCS/WISECP module) must use these credentials.SSH n8n node. This requires a dedicated SSH Password or Key credential (Cyjy61UWHwD2Xcd8 in the example) that has sudo access to the remote Docker host where containers will be managed.Parametrs n8n node and update the default values to match your server environment:serverdomain: The domain name of the target server.clientsdir: The root directory for client-specific Docker files.mount_dir: The base directory for disk mounts (e.g., /mnt).This n8n workflow relies on several core n8n node types to manage its complex logic:
API (Webhook Trigger): The starting point, acting as the secure API endpoint at /docker-grafana via POST method. This n8n trigger receives the core commands.
Parametrs (Set): Used for centralized configuration. Sets vital variables like serverdomain, clientsdir, and mount_dir for use across the entire n8n workflow.
If / Switch Nodes (If, If1, Service Actions, Container Actions, Container Stat, Grafana): These logic control n8n node types handle the complex routing, checking the input command value to direct the flow to the correct management script.
Deploy-docker-compose / nginx (Set): These nodes contain base configurations, specifically a dynamic Docker Compose YAML definition and Nginx configurations, which are injected into the SSH deployment script.
Deploy, Suspend, Terminated, ChangePackage, Start, Stop (Set): A series of Set n8n nodes dedicated to building specific, large Bash scripts (sh variable) for each lifecycle command. These scripts handle file system operations, fstab updates, Nginx proxy configuration, and docker compose execution.
SSH (SSH): The most critical n8n node. It securely executes the dynamically generated Bash script from the preceding Set node on the remote Docker host.
Code1 (Code): A utility n8n node responsible for parsing the text output received from the SSH command and converting it into a standardized JSON response format (success/error structure) before final output.
API answer (Respond to Webhook): The final n8n node, responsible for sending the HTTP response back to the client (WHMCS/WISECP) with the status of the operation.
Deploy a custom-branded website chatbot API using this specialized n8n workflow. It integrates the DeepSeek AI model and session memory via an n8n trigger for a seamless, high-performance conversational experience.

Use this advanced n8n workflow to automatically identify, analyze, and log dependency update risks from Jira using GPT-4o. Boost DevOps efficiency with powerful n8n templates.

Automate financial news delivery using this robust n8n workflow. Schedule market updates from Finnhub and instantly broadcast them to a Telegram channel using this pre-built n8n template.

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 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.

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.







































