n8n Workflow: Complete Self-Hosted Deployment Guide
Deploy n8n on your own infrastructure. Docker, PostgreSQL, Nginx, and SSL configuration. Includes 27,000+ pre-built workflow templates.

How This Blueprint Works
Deploy n8n on your own infrastructure for complete control over data, costs, and scaling. This blueprint provides the Docker Compose configuration, PostgreSQL setup, Nginx reverse proxy with SSL, and production-hardening steps needed for a self-hosted n8n instance.

The Execution Sequence
- Docker Setup — Create a docker-compose.yml with three services: n8n (docker.n8n.io/n8nio/n8n:latest), PostgreSQL 15, and Traefik for reverse proxy. Mount volumes for n8n_data, postgres_data, and traefik_data for persistence.
- Database Configuration — n8n uses SQLite by default. For production, configure PostgreSQL with environment variables: DB_TYPE=postgresdb, DB_POSTGRESDB_DATABASE=n8n, DB_POSTGRESDB_USER=n8n, DB_POSTGRESDB_PASSWORD=strong_password, DB_POSTGRESDB_HOST=postgres.
- Nginx + SSL — Traefik auto-proxies and provisions Let’s Encrypt TLS certificates. Configure labels on the n8n container: traefik.enable=true, traefik.http.routers.n8n.rule=Host(
n8n.yourdomain.com). Certificates renew automatically. - Backup Strategy — Add a cron job on the host that runs pg_dump and tar-s the SQLite .n8n directory. Upload backups to S3-compatible storage using rclone. Retain 7 daily, 4 weekly, and 12 monthly snapshots.
- Security Hardening — Set N8N_ENCRYPTION_KEY (32-byte hex), enable N8N_METRICS=false, configure N8N_ALLOW_UNAUTHORIZED_EMITTER_CONNECTIONS=false, and set N8N_BLOCK_FILE_ACCESS_TO_N8N_FOLDER_FILES=true in production.
FAQ
What are the minimum server requirements for self-hosted n8n?
1 vCPU, 2 GB RAM, 20 GB SSD for light usage. For production with 10+ concurrent executions: 2 vCPU, 4 GB RAM, 50 GB SSD. Use AWS EC2 t3.medium or equivalent.
Can I scale n8n horizontally?
Yes. n8n supports worker nodes for parallel execution. Configure N8N_EXECUTORS_PROCESS=1 and add additional n8n-worker containers. Share a single PostgreSQL and Redis instance.
How do I update my self-hosted n8n instance?
Pull the latest image (docker compose pull), restart (docker compose up -d), and run database migrations automatically. Check the changelog for breaking changes before upgrading major versions.
The JSON Blueprint Structure
{
"name": "n8n Docker Compose Stack",
"nodes": [
{ "name": "Load Balancer", "type": "infra", "position": [250, 300] },
{ "name": "PostgreSQL DB", "type": "infra", "position": [450, 300] },
{ "name": "n8n Core", "type": "infra", "position": [650, 300] },
{ "name": "n8n Workers", "type": "infra", "position": [850, 300] }
]
}
What You Get Inside Your SynthOperator System
This workflow is one of 27,400+ blueprints included in the n8n Business Automation OS ($17, one-time). When you deploy the complete system, you get:
- 27,400+ pre-built workflow JSON files across every business domain
- 15 elite AI agents integrated into your automation pipelines
- Lifetime updates, offline operation, and zero recurring fees
**Deploy your complete automation infrastructure today.
System Requirements
Operational Benefits
Trusted by Operators
"Deployed the full OS across 7 client accounts in week one. The 27K template library meant I stopped building workflows from scratch — I search, import, configure credentials, and deploy. Estimated 80+ hours/month saved in workflow development alone. The 15 AI agents replaced $12K/month in contractor overhead."
"The infrastructure architecture is production-grade. I've run 15,000+ workflow executions over 90 days with zero critical failures. The error-handling patterns (retry logic, dead-letter queues, Slack alerting) are already wired in. I spent 3 years building similar tooling in-house — this saved me 6+ months of engineering."
Free: Top 10 n8n Workflows
Get 10 industrial-grade n8n blueprints — ready to import into any instance. Save 10h/week with these ready-to-deploy automations.
- Industrial-grade n8n blueprints
- Recursive Claude subagent instructions
- Localhost deployment guide
- Lifetime update protocol