n8n self-hosted is the open-source workflow automation platform that engineering teams choose when they need Zapier/Make capability with complete data privacy, unlimited executions, and native code integration β all within their own infrastructure. In 2026, n8n has added LangChain-native AI agent nodes, a visual canvas that rivals Make, and 400+ built-in integrations that cover the vast majority of enterprise use cases. This guide covers the production self-hosted deployment, the enterprise workflow patterns, and the AI agent use cases that distinguish n8n from its cloud-only competitors.
Self-Hosted Production Setup
01
Docker Compose
Production n8n Deployment
Production docker-compose.yml: n8n service with PostgreSQL backend (not SQLite β required for multi-user and high-volume production), Redis for queue mode (scales to multiple worker processes), and Nginx reverse proxy with SSL. Key environment variables: N8N_BASIC_AUTH_ACTIVE=true, N8N_ENCRYPTION_KEY (32-char random key for credential encryption), EXECUTIONS_MODE=queue (enables queue mode with Redis), N8N_HOST (your domain). Use the official n8nio/n8n Docker image. PostgreSQL for persistence: DB_TYPE=postgresdb; DB_POSTGRESDB_DATABASE=n8n. Deploy behind your internal network or with OAuth2 proxy for authentication. Our DevOps team handles production n8n infrastructure.
PostgreSQL backendQueue mode + RedisN8N_ENCRYPTION_KEY
02
Kubernetes
Kubernetes Deployment with Helm
For enterprise Kubernetes deployment: helm repo add n8n https://8gears.github.io/n8n-helm-chart && helm install n8n n8n/n8n -f values.yaml. Configure values.yaml: replica count (2+ for HA), PostgreSQL external connection, Redis for queue, ingress configuration with SSL. Enable Kubernetes autoscaling for worker replicas based on queue depth. Use Kubernetes Secrets for N8N_ENCRYPTION_KEY and database credentials β never in environment variables directly. This deployment handles 10,000+ workflow executions/day on a modest Kubernetes cluster (3-4 nodes). Connect to your monitoring platform via n8n's built-in metrics endpoint.
8gears Helm chartHA replica countK8s Secrets for credentials
Unlimited
n8n self-hosted workflow executions β no per-task pricing. For high-volume automation (100K+ monthly executions) that would cost $500β2,000/month on Zapier or Make, n8n self-hosted reduces this to infrastructure cost (typically $20β100/month)
Code nodes
n8n's native code nodes (JavaScript and Python) are first-class workflow components β not an escape hatch. Complex data transformations, API response parsing, and custom business logic all belong in code nodes, keeping complex workflows maintainable
LangChain
n8n's LangChain integration (AI Agent node) enables full agentic workflow automation β an AI agent that uses n8n's 400+ integrations as tools. The most powerful AI automation stack currently available in a visual workflow tool
π€
AI Agent Workflows (LangChain + n8n)
n8n's AI Agent node (built on LangChain) enables workflows where an LLM decides which tools to call: connect the agent to Slack, Gmail, database query, Jira, and CRM tools; give the agent a task ("process this customer inquiry and create appropriate tickets"); the agent calls the right tools in the right order. Unlike basic AI steps, the agent dynamically determines the workflow path. Use cases: intelligent support ticket routing, multi-system data enrichment, email-to-CRM automation, and report generation that pulls from multiple sources. This is n8n's largest advantage over Zapier and Make.
π
Private AI Pipeline
Deploy n8n on-premise + self-hosted Ollama/vLLM + n8n's LLM node: a completely private AI workflow pipeline with no data leaving your infrastructure. Process sensitive documents (contracts, medical records, financial reports) through AI workflows that never touch public API endpoints. This is the architecture for enterprises with strict data sovereignty requirements who need AI automation: n8n provides the orchestration; self-hosted Mistral/Qwen provides the AI capability; everything stays within your network. Our
DevOps team deploys these private AI stacks.
π
Enterprise Integration Patterns
n8n's most common enterprise patterns: (1) CRM-to-marketing sync β Salesforce opportunity updates trigger HubSpot campaign enrollment; (2) Alerting enrichment β PagerDuty alert + database context query + Slack message with enriched context; (3) Data pipeline triggers β S3 upload triggers data processing workflow; (4) HR automation β Workday offboarding triggers AD deactivation + Slack workspace removal + asset collection ticket; (5) Document approval routing β contract uploaded to SharePoint β AI risk scoring β appropriate approver notification β DocuSign envelope. Each pattern is 10β20 nodes in n8n, built in 1β4 hours.
π‘οΈ
Enterprise Security Configuration
Security for enterprise n8n: enable RBAC (role-based access control) β owners, admins, members with different workflow permissions; store all API credentials in n8n's encrypted credential store (never in workflow nodes); enable audit logging to external SIEM for compliance; configure network policy to restrict n8n's outbound connections to allowed domains; use 2FA for all admin accounts. For regulated industries: deploy n8n in a dedicated VPC with egress proxy that enforces allowed outbound domains β prevents data exfiltration via webhook workflows.