Quick Start
Simple Docker Run
The fastest way to get n8n running:1
Create a Docker volume
2
Run n8n container
3
Access n8n
Open your browser to http://localhost:5678
Docker Compose Deployments
Single Instance with PostgreSQL
A production-ready single instance setup:Generate a secure encryption key:Store this key securely! If lost, you cannot decrypt existing credentials.
With External Task Runners
Deploy n8n with isolated task runners for enhanced security:Queue Mode (Scaling Setup)
Deploy n8n in queue mode with Redis and multiple workers:Worker Scaling: Adjust
deploy.replicas based on your execution volume. Monitor CPU and memory usage to determine the optimal number of workers.Docker Image Options
n8n provides multiple Docker images:- Main Images
- Task Runners
- Custom Builds
ghcr.io/n8n-io/n8n
Official n8n image from GitHub Container Registry.Tags:latest- Latest stable release1.x.x- Specific version (e.g.,1.25.0)next- Latest unstable/beta release
Environment Variables for Docker
Key environment variables for Docker deployments:Database Configuration
Database Configuration
Queue Mode (Redis)
Queue Mode (Redis)
Task Runners
Task Runners
Security & Access
Security & Access
Volume Mounts
Recommended Mounts
Updating n8n
1
Pull the latest image
2
Stop and remove old containers
This preserves your data volumes. Your workflows and credentials remain safe.
3
Start with new image
4
Verify the update
Health Checks
n8n exposes a health check endpoint at/healthz:
Health Check Components
Health Check Components
The health endpoint checks:
- Database connectivity
- Redis connectivity (queue mode)
- Application readiness
Timezone Configuration
Configure timezone for scheduled workflows:GENERIC_TIMEZONE- Used by n8n’s Schedule nodeTZ- System timezone for container commands
Custom SSL Certificates
Trust custom SSL certificates:c_rehash on the certificate directory.
Troubleshooting
Container won't start
Container won't start
Cannot decrypt credentials
Cannot decrypt credentials
This happens when:
- Encryption key changed or lost
/home/node/.n8nvolume not mounted- Different encryption key between containers
N8N_ENCRYPTION_KEY and persistent volumes.Workers not picking up jobs
Workers not picking up jobs
High memory usage
High memory usage
- Reducing
N8N_CONCURRENCY_PRODUCTION_LIMIT - Adding more workers instead of increasing main process memory
- Enabling execution data pruning
Next Steps
Configuration
Deep dive into all configuration options
Scaling
Learn about scaling with queue mode