Automated MinIO Container Deployment and Management API - n8n Workflow

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.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Web hosting providers or resellers utilizing WHMCS or WISECP billing systems.
DevOps teams requiring a flexible, self-hosted API for infrastructure provisioning.
System administrators who need to automate complex Docker and Nginx configuration management.
Users seeking advanced n8n templates showcasing SSH remote execution and custom code.

Overview

Managing containerized services like MinIO directly from a billing system (like WHMCS or WISECP) requires a robust API layer. This n8n workflow serves as that critical backend. It receives commands via a secure webhook n8n trigger and translates them into precise Bash scripts, which are then executed remotely on the Docker host via an SSH n8n node. This approach allows for zero-touch automation of service provisioning, suspension, termination, resource resizing (Change Package), and detailed operational checks (Inspect, Stats, Logs). This complex n8n automation streamlines server management by handling file system creation, mounting (using fallocate, mkfs.ext4, and fstab), and Nginx configuration updates required for proxying MinIO's main and console endpoints.

How it Works

This high-level n8n workflow operates entirely via API calls:


  1. Incoming Command: The process starts with the API n8n trigger (a Webhook) receiving a POST request containing the desired command (e.g., create, suspend, containerstart) and necessary parameters (domain, user credentials, disk size).

  2. Domain Validation: The If n8n node validates the incoming request against the configured serverdomain to ensure security and correctness. Invalid requests are immediately rejected.

  3. Command Routing: The request proceeds through a series of Switch n8n node branches (Service Actions, Container Stat, Container Actions, MinIO) to determine the specific operation category.

  4. Script Generation: The relevant Set n8n node (e.g., Deploy, Suspend, ChangePackage) dynamically constructs a complex, idempotent Bash script, interpolating user data (like domain, disk size, username) and configuration templates (like Deploy-docker-compose and nginx).

  5. Remote Execution: The generated script is passed to the SSH n8n node, which securely executes it on the target Docker host. Actions include creating directories, setting up loop devices, formatting file systems, updating /etc/fstab, managing Docker Compose, and updating Nginx configuration files.

  6. Response Formatting: The Code1 n8n node captures the standard output and error messages from the SSH command and formats them into a standardized JSON response structure (status, message).

  7. API Response: The API answer n8n node delivers the final status back to the initiating WHMCS/WISECP module, completing the asynchronous n8n workflow.

Installation Guide

To use this n8n templates file, follow these setup steps:


  1. Import the n8n workflow: Copy the provided JSON data and paste it into a new n8n workflow instance.

  2. Webhook Authentication: Set up Basic Authentication credentials for the API n8n trigger node. This credential must be used by your WHMCS/WISECP module when sending commands.

  3. SSH Credentials: Create SSH Password credentials for the SSH n8n node. This credential must provide access (preferably via a user with elevated privileges, typically configured for password-less sudo) to your Docker host server.

  4. Configure Parameters: Update the Parametrs n8n node with your specific server details:

serverdomain: The domain name of the hosting server.
clients
dir: The base directory where client-specific data (Docker Compose files, status) will be stored.
* mount_dir: The base directory for mounting disk images.

  1. Activate: Save and activate the n8n workflow. The webhook URL is now ready to accept commands from the billing system.

Node Details

API (Webhook n8n trigger): The entry point of the n8n workflow. Configured for POST requests on the path docker-minio with Basic Authentication, serving as the interface for external billing systems.
Parametrs (Set n8n node): Stores global configuration variables essential for dynamic script generation, such as base directories (clientsdir, mountdir) and the required serverdomain.
If (n8n node): Performs crucial security validation by comparing the incoming request's server domain against the expected static value.
Service Actions / Container Actions / MinIO (Switch n8n node): These powerful switch nodes dynamically route the request based on the command input (e.g., create, suspend, app
version), ensuring the correct configuration script is executed.
Deploy / Suspend / ChangePackage (Set n8n node): These nodes are where the core logic resides. They generate specialized, multi-line Bash scripts that execute complex provisioning, resizing, file system, and Nginx manipulation tasks.
SSH (n8n node): This critical n8n node executes the dynamically generated Bash script on the remote Docker server using configured credentials. It is the engine that drives the infrastructure changes.
Code1 (Code n8n node): Handles post-execution data cleaning. This Javascript n8n node parses the raw text output from the SSH session (which contains success messages or structured JSON errors) and formats it into a consistent JSON output for the final response.
API answer (Respond To Webhook n8n node): Sends the final, structured API response back to the billing system, concluding the automated n8n workflow operation.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

We are a Poland-based IT company specializing in secure, high-performance infrastructure and outsourcing solutions. Our TIER 3 data center ensures reliability, and we prioritize data privacy over commercial indexing. We offer corporate email, encrypted collaboration tools, private web hosting, VPN security, and IT management for companies with 10+ employees. Our open-source approach guarantees flexibility without vendor lock-in.

Featured*