docker.recipes

n8n Workflow Automation

beginner

Extendable workflow automation tool.

Overview

n8n is a fair-code workflow automation platform that enables businesses to create complex integrations and automate repetitive tasks without extensive programming knowledge. Originally developed as an open-source alternative to proprietary solutions like Zapier, n8n provides a visual workflow builder with over 350 pre-built integrations spanning popular services like Slack, Google Workspace, Salesforce, and countless APIs. The platform operates on a fair-code licensing model, making it free for self-hosting while offering commercial licenses for embedding in other products. n8n transforms manual business processes into automated workflows through its intuitive drag-and-drop interface, where users connect nodes representing different services, triggers, and actions. The platform excels at handling complex conditional logic, data transformation, and error handling that would typically require custom development. Unlike cloud-only solutions, self-hosting n8n provides complete data control, unlimited executions, and the ability to create custom nodes using JavaScript when standard integrations aren't sufficient. This stack is ideal for businesses seeking cost-effective automation at scale, development teams building internal tools, and organizations with strict data governance requirements. Companies processing thousands of workflows monthly will find significant cost savings compared to per-execution pricing models, while maintaining the flexibility to customize workflows beyond what traditional SaaS platforms allow. The self-hosted approach particularly benefits enterprises that need to integrate with internal systems or handle sensitive data that cannot leave their infrastructure.

Key Features

  • 350+ pre-built integrations including Slack, Google Workspace, Salesforce, GitHub, and major databases
  • Visual workflow builder with drag-and-drop nodes for creating complex automation logic
  • Custom JavaScript node support for building integrations not available in the standard library
  • Webhook triggers for real-time workflow execution from external systems
  • Advanced error handling with retry mechanisms and branching logic for failed operations
  • Execution history with detailed logs and data inspection for debugging workflows
  • Credential management system with secure storage and sharing across workflows
  • Cron-based scheduling for time-triggered automation and recurring tasks

Common Use Cases

  • 1Sales pipeline automation syncing leads between CRM systems and marketing platforms
  • 2Customer support workflows triggering notifications and ticket routing based on priority
  • 3Data synchronization between e-commerce platforms and inventory management systems
  • 4Social media monitoring and automated response workflows for brand management
  • 5IT infrastructure monitoring with automated alerting and incident response procedures
  • 6Content publishing workflows connecting CMS platforms with social media and email marketing
  • 7Financial reporting automation pulling data from multiple sources into consolidated dashboards

Prerequisites

  • Minimum 512MB RAM recommended for stable operation with multiple concurrent workflows
  • Port 5678 available for the n8n web interface and API access
  • Basic understanding of API concepts and webhook functionality for advanced integrations
  • Environment variables N8N_USER and N8N_PASSWORD configured for basic authentication
  • Docker volume permissions properly configured for persistent workflow and credential storage
  • Network access to external services that workflows will integrate with

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 n8n:
3 image: n8nio/n8n:latest
4 container_name: n8n
5 restart: unless-stopped
6 environment:
7 N8N_BASIC_AUTH_ACTIVE: "true"
8 N8N_BASIC_AUTH_USER: ${N8N_USER}
9 N8N_BASIC_AUTH_PASSWORD: ${N8N_PASSWORD}
10 volumes:
11 - n8n_data:/home/node/.n8n
12 ports:
13 - "5678:5678"
14
15volumes:
16 n8n_data:

.env Template

.env
1N8N_USER=admin
2N8N_PASSWORD=changeme

Usage Notes

  1. 1Docs: https://docs.n8n.io/
  2. 2Access at http://localhost:5678 - login with N8N_USER/N8N_PASSWORD
  3. 3Visual drag-and-drop workflow builder with 400+ integrations
  4. 4Triggers: webhooks, cron schedules, app events
  5. 5Self-host with community edition or use n8n.cloud
  6. 6Export/import workflows as JSON for backup and sharing

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 n8n:
5 image: n8nio/n8n:latest
6 container_name: n8n
7 restart: unless-stopped
8 environment:
9 N8N_BASIC_AUTH_ACTIVE: "true"
10 N8N_BASIC_AUTH_USER: ${N8N_USER}
11 N8N_BASIC_AUTH_PASSWORD: ${N8N_PASSWORD}
12 volumes:
13 - n8n_data:/home/node/.n8n
14 ports:
15 - "5678:5678"
16
17volumes:
18 n8n_data:
19EOF
20
21# 2. Create the .env file
22cat > .env << 'EOF'
23N8N_USER=admin
24N8N_PASSWORD=changeme
25EOF
26
27# 3. Start the services
28docker compose up -d
29
30# 4. View logs
31docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/n8n/run | bash

Troubleshooting

  • Workflow executions failing silently: Check the execution log in the web interface and verify API credentials for connected services are still valid
  • Memory usage continuously increasing: Restart the container and review workflow complexity, consider breaking large workflows into smaller components
  • Webhook triggers not firing: Verify the webhook URL is accessible externally and check firewall rules for port 5678
  • Custom nodes not loading: Ensure the n8n_data volume is properly mounted and has correct file permissions for the node user
  • Authentication failures on service integrations: Refresh OAuth tokens in the credentials panel and verify API keys haven't expired
  • Database connection timeouts: Increase connection timeout values in database node configurations and verify network connectivity to target systems

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space