Why Self-Host n8n?
Data Control
Keep all workflow data, credentials, and execution logs within your infrastructure
Customization
Install custom nodes, configure security policies, and integrate with internal systems
Scalability
Scale horizontally with worker nodes and queue mode for high-throughput workloads
Fair-Code License
Self-host with a sustainable fair-code license that protects both users and the project
Deployment Options
Single Instance (Regular Mode)
Perfect for development, testing, or small production workloads. n8n runs as a single process handling the UI, workflow execution, and webhooks. Best for:- Development and testing environments
- Small teams (< 10 users)
- Low to moderate execution volume
- Simple deployment requirements
Queue Mode (Scaling Mode)
For production workloads requiring horizontal scaling, queue mode distributes workflow execution across multiple worker processes using Redis as a message broker. Best for:- Production environments
- High execution volume
- Horizontal scaling needs
- Multiple concurrent workflows
Multi-Main Setup (Enterprise)
For high availability and load distribution, run multiple main processes behind a load balancer. Requires an Enterprise license. Best for:- High availability requirements
- Large enterprise deployments
- Geographic distribution
- Maximum uptime needs
Task Runners
n8n uses task runners to execute workflow nodes in isolated environments for enhanced security and stability.- Internal Mode
- External Mode
Task runners run as child processes spawned by n8n. This is the default mode and simplest to set up.Pros:
- Automatic lifecycle management
- No additional infrastructure
- Simple configuration
- Shares resources with main process
- Less isolation
Database Support
n8n supports two database systems:SQLite
Default database - File-based, no additional setup required.
- Perfect for development and testing
- Low to moderate workloads
- Single instance deployments
- Automatic backups with file copy
PostgreSQL
Recommended for production - Robust, scalable database.
- Production environments
- Queue mode deployments
- Multi-main setups
- High concurrency needs
- Advanced backup and replication
System Requirements
Minimum Requirements
Memory
- Single instance: 1GB RAM
- Main process: 2GB RAM
- Worker process: 512MB - 2GB RAM per worker
- Task runners: 256MB - 1GB RAM per runner
Storage
- Base installation: 500MB
- Database: Varies by execution history (plan for 1GB+)
- Binary data: Additional storage as needed
Recommended Production Setup
Security Considerations
Next Steps
Docker Deployment
Deploy n8n using Docker and Docker Compose
Configuration
Configure environment variables and settings
Scaling
Scale n8n with queue mode and workers