n8n Self-Hosting: The Complete Production Setup Guide
Self-hosting n8n is one of the best decisions a business with moderate-to-high automation volume can make. The economics are compelling: a $30/month VPS can handle hundreds of workflow executions per minute, compared to $100+/month on n8n cloud for the same volume. This guide covers how to set up a production-grade self-hosted n8n deployment.
Why Self-Host n8n
Cost economics: n8n cloud pricing is based on workflow executions. At 10,000+ executions per month, self-hosting saves $50-500+ per month versus the equivalent cloud plan. A Hetzner VPS capable of handling high n8n volumes costs €5-20/month.
Data control: All workflow data stays on your infrastructure. For businesses with GDPR compliance requirements, customer data sensitivity, or internal security policies, self-hosting ensures data never leaves your environment.
No usage limits: Cloud plans have execution limits. Self-hosted n8n has no built-in execution limits — the only limit is server capacity, which you can scale.
Custom nodes: Self-hosted n8n can install community nodes and custom-built nodes. These extend n8n's capability in ways not possible on the cloud version.
Customisation: Environment variables and configuration options available in self-hosted n8n give you control over database settings, encryption, external hooks, and other parameters.
Prerequisites
- A Linux VPS (Ubuntu 22.04 LTS recommended): Hetzner CX21 (€5.92/month, 2 vCPU, 4GB RAM) handles typical SMB workflows
- SSH access to the server
- A domain name (for SSL) — optional but strongly recommended
- Basic Linux command line familiarity
Simple Docker Setup
For development or low-volume use, the simplest n8n deployment:
Access n8n at http://your-server-ip:5678.
Production Docker Compose Setup
For production use with a domain, SSL, and a proper database:
Deploy with SSL using a reverse proxy (Caddy is the simplest option):
Queue Mode for High Volume
For high-volume deployments, n8n's queue mode separates the workflow execution from the web interface. This allows horizontal scaling (multiple worker processes) and more stable performance under load.
Queue mode requires: Redis, a main n8n process, and one or more worker processes.
Add Redis to your Docker Compose and a worker service pointing to the same n8n image with CMD: n8n worker.
Backup and Maintenance
Export workflows: Regularly export all workflows via n8n's Settings → Export → All workflows. Store the JSON export in a git repository or cloud storage. This is your workflow backup.
Database backup: Set up automated PostgreSQL backups. A daily pg_dump to S3 or Backblaze B2 is sufficient for most use cases.
n8n updates: When n8n releases a new version (frequently), update by pulling the new Docker image: docker pull docker.n8n.io/n8nio/n8n && docker restart n8n. Check the release notes for breaking changes before updating production.
Recommended Tools
- n8n — The platform itself
- Hetzner — Best-value VPS for European/global deployments
- DigitalOcean — US-focused VPS, good n8n deployment guides available
- Caddy — Simplest reverse proxy with automatic SSL
- Claude API — AI integration for self-hosted n8n workflows
“Self-hosting n8n is a one-day project that pays dividends for years. The time investment in setup is small compared to the cost savings and data control it provides.”
Related articles
n8n vs Make.com vs Zapier: a 2026 honest comparison
No affiliate fluff — where each tool wins, where it breaks, and what we actually run.
Self-hosting n8n: a production-grade setup guide
Queue mode, workers, backups, and the security defaults you should never skip.
Complete n8n Guide: Everything You Need to Build Powerful Automations
The definitive n8n guide — nodes, credentials, triggers, and production-grade patterns.