Full DevOps Stack Deployment on Linux via SSH - n8n Workflow

Automate the entire DevOps infrastructure setup—Docker, Kubernetes (K3s), Jenkins, Prometheus, and Grafana—on a Linux server in minutes using this powerful n8n workflow template.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • DevOps Engineers needing rapid environment provisioning.

  • System Administrators seeking repeatable, zero-touch server setups.

  • Automation Specialists looking for advanced infrastructure n8n templates.

  • Users who need to deploy Docker, Kubernetes, Jenkins, and Monitoring stacks simultaneously.

Overview

Setting up a robust, modern DevOps environment requires installing and configuring numerous tools like Docker, Kubernetes, Jenkins, Prometheus, and Grafana. Manually performing these steps is time-consuming, prone to error, and lacks repeatability.

This expert-level n8n workflow solves this complexity by turning a multi-hour manual task into a single-click execution. Utilizing the power of the n8n node for secure SSH commands, this automation handles everything from OS preparation and package installation to firewall configuration and user setup. This n8n workflow template is essential for rapid prototyping, staging environment creation, and consistent production deployments, ensuring every server is configured identically.

How it Works

The entire automation is driven sequentially through a series of dedicated SSH n8n node executions:


  1. Trigger and Configuration: The process begins with a manual n8n trigger. The Configure Parameters n8n node immediately loads variables (host, credentials, desired software versions like the k8s_version).

  2. System Preparation: The first SSH n8n node runs crucial system updates, installs essential utilities (git, curl), and sets up Python/Ansible support.

  3. Core Tool Installation: Subsequent SSH nodes handle the sequential installation of Docker (Engine and Compose), Kubernetes (K3s), and Jenkins, ensuring proper service startup and integration (like adding Jenkins to the Docker group).

  4. Monitoring Stack Deployment: The Install Monitoring n8n node leverages Helm commands running on the remote server to deploy the Prometheus and Grafana stacks directly into the newly installed K3s cluster.

  5. User and Security Setup: A dedicated DevOps user is created and configured with necessary sudo and Docker permissions. The final security step uses another SSH n8n node to enable the UFW firewall and open specific ports for Jenkins (8080), Grafana, Prometheus, and Kubernetes API.

  6. Finalization: The Final Configuration n8n node sets up sample project directories and files (Docker Compose, Kubernetes deployment manifest, Jenkins pipeline) for the new DevOps user, and a final Set n8n node provides a clean summary of access URLs and credentials.

Installation Guide

To deploy this comprehensive n8n workflow, follow these steps:


  1. Import the n8n template: Copy the provided JSON data and paste it into your n8n instance via the 'New Workflow' -> 'Import from JSON' option.

  2. Set Up SSH Credentials: This n8n workflow relies heavily on the SSH n8n nodes. You must configure an SSH Private Key credential pointing to the target Linux server (usually configured for root access or a user with elevated privileges).

  3. Configure Parameters: Locate the Configure Parameters n8n node. Update the serverhost, serveruser, and serverpassword fields to match your target server details. You can also customize the devopsuser credentials and tool versions here.

  4. Test Execution: Execute the workflow using the Start DevOps Setup manual n8n trigger. Ensure the n8n workflow runs successfully and check the output nodes for configuration summary and login details.

Note: This workflow is optimized for Debian/Ubuntu-based Linux distributions.

Node Details


  • Start DevOps Setup (n8n trigger): This manual n8n trigger initiates the entire DevOps deployment process.

  • Configure Parameters (Set n8n node): Essential for defining environment variables like serverhost, serveruser, k8s_version (set to '1.28' by default), and user passwords. These parameters are referenced by subsequent SSH commands.

  • System Preparation (SSH n8n node): Executes apt update and installs basic system utilities, Python 3, and prerequisite libraries necessary for further automation tasks.

  • Install Docker/Kubernetes/Jenkins/Monitoring (Multiple SSH n8n nodes): These nodes are the core of the n8n workflow. Each n8n node executes specific, complex Bash scripts (e.g., using curl -sfL https://get.k3s.io) to download, install, and configure the respective DevOps tools, often using Helm for Kubernetes deployments.

  • Create DevOps User (SSH n8n node): Handles user creation, password setting, group assignment, and copies necessary configuration files (like kubeconfig) to the new user's home directory.

  • Final Configuration (SSH n8n node): The final SSH command that wraps up the deployment by creating sample project files (docker-compose.yml, Jenkinsfile) for immediate use and displaying a summary output.

  • Setup Complete (Set n8n node): Collects the output from preceding nodes, summarizing access endpoints (Jenkins, Grafana, Prometheus URLs) and providing the generated credentials.

Related n8n Workflows

Free

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

The AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.

Featured*