Can you run n8n on Docker?
Quick Answer: Yes. n8n provides an official Docker image (n8nio/n8n) that can be run with a single command, supports persistent volumes for workflow data, and works with Docker Compose for production setups including PostgreSQL. Self-hosted n8n on Docker is free under the Sustainable Use License and is the recommended deployment path.
Running n8n on Docker
Docker is the recommended deployment method for self-hosted n8n. The official image is maintained by the n8n team and updated with each release.
Quick Start — Single Container
Run n8n with one command, storing data in a named volume:
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
n8nio/n8n
Access the editor at http://localhost:5678.
Production Setup — Docker Compose
For production, use Docker Compose with PostgreSQL for data storage:
services:
postgres:
image: postgres:15
environment:
POSTGRES_USER: n8n
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: n8n
volumes:
- postgres_data:/var/lib/postgresql/data
n8n:
image: n8nio/n8n
restart: always
ports:
- "5678:5678"
environment:
DB_TYPE: postgresdb
DB_POSTGRESDB_HOST: postgres
DB_POSTGRESDB_USER: n8n
DB_POSTGRESDB_PASSWORD: ${POSTGRES_PASSWORD}
N8N_ENCRYPTION_KEY: ${N8N_ENCRYPTION_KEY}
volumes:
- n8n_data:/home/node/.n8n
depends_on:
- postgres
Recommended Environment Variables
N8N_ENCRYPTION_KEY: Encrypts credentials at restN8N_HOST: External hostname (for webhooks)WEBHOOK_URL: Full URL for webhooks (important behind reverse proxy)N8N_BASIC_AUTH_ACTIVE: Enables basic auth for the editor
Reverse Proxy
For public deployments, place n8n behind Caddy, Nginx, or Traefik for TLS termination. This is required for webhooks from external services.
Backup
- Back up the PostgreSQL database nightly
- Export workflows with the n8n CLI:
n8n export:workflow --all --output=/backups - Store encryption key securely (loss = inability to decrypt credentials)
Scaling Considerations
- Default single-instance runs webhook and worker processes together
- For high throughput, enable "queue mode" with Redis and separate worker containers
- Worker containers use the same image with
--workerflag
Resource Requirements
- Minimum: 1 vCPU, 1 GB RAM
- Recommended for production: 2 vCPU, 4 GB RAM
- Disk: 10 GB for database and logs
Related Questions
Related Tools
Activepieces
No-code workflow automation with self-hosting and AI-powered features
Workflow AutomationAutomatisch
Open-source Zapier alternative
Workflow AutomationBardeen
AI-powered browser automation via Chrome extension
Workflow AutomationCalendly
Scheduling automation platform for booking meetings without email back-and-forth, with CRM integrations and routing forms for lead qualification.
Workflow AutomationRelated Rankings
Best Open-Source Workflow Engines for Engineers in 2026
A ranked list of the best open-source workflow engines for engineers in 2026. This ranking evaluates code-first workflow orchestration platforms that engineers can self-host, extend, and embed inside existing software stacks. The ranking differs from the broader Best Open-Source Automation 2026 list by focusing specifically on workflow engines intended for developers: platforms that prioritize SDK coverage, durable execution, scalability, and operational controls over visual SaaS-connector automation. It includes durable execution engines (Temporal), data and task orchestrators (Apache Airflow, Prefect), low-code workflow builders with strong self-host stories (n8n, Windmill, Activepieces), and historical agent-based tools (Huginn).
Best Automation Tools for Healthcare in 2026
A ranked list of the best automation tools for healthcare organisations in 2026. This ranking evaluates platforms across HIPAA readiness, audit logging, PHI handling, on-premise or private-cloud deployment options, and integration with clinical and administrative systems. The ranking includes enterprise RPA (UiPath, Automation Anywhere), Microsoft-native automation (Power Automate), general-purpose workflow automation (Zapier on Business tier, Make, n8n self-hosted), and enterprise iPaaS (Boomi). Each entry is evaluated against the specific compliance, data-residency, and clinical-integration requirements that distinguish healthcare from other industries.
Dive Deeper
Temporal vs Apache Airflow 2026: Durable Workflows vs DAG Orchestration
Temporal and Apache Airflow are open-source workflow engines that solve different problems. Temporal is a durable execution platform for long-running backend workflows written in application code, while Apache Airflow is a Python-based DAG scheduler for batch data pipelines. This 2026 comparison covers execution models, pricing, and when each engine is the correct choice.
Temporal vs n8n 2026: Code-First Workflows vs Visual Automation
Temporal and n8n are workflow tools with different audiences. Temporal is a durable execution SDK for backend engineers building fault-tolerant distributed systems in Go, Java, TypeScript, Python, and .NET. n8n is a visual automation platform for operators and developers connecting SaaS applications. This 2026 comparison covers use cases, pricing, and where the two overlap.
Camunda vs Zeebe 2026: Camunda 7 Platform vs Camunda 8 Cloud-Native Engine
Zeebe is the cloud-native BPMN workflow engine that powers Camunda 8, while Camunda 7 is the mature JVM-based platform that preceded it. Both are maintained by Camunda Services GmbH. This 2026 comparison clarifies the architecture differences, feature deltas, migration considerations, and pricing between the two generations.