How to Self Host n8n: A Complete Guide
Self hosting n8n means running the open-source n8n workflow automation engine on infrastructure you own and control — a private VPS, an on-premise server, or a local machine — instead of paying for the managed n8n Cloud subscription. With self hosting, your workflows, credentials, and execution data stay entirely on your own servers.
Three common self-hosting setups:
- VPS (e.g., DigitalOcean, Hetzner): from $5–$10 per month
- On-premise server: full data control for enterprise compliance
- Local machine: ideal for testing via Docker
n8n is licensed under the Sustainable Use License, which permits free self hosting for internal business use. You can review the exact terms and what counts as “internal business purposes” before deploying in production; the official n8n hosting documentation outlines the supported installation paths and licensing context. The official Docker image typically runs in under 5 minutes with a single command.
Self hosting eliminates per-execution fees. n8n Cloud charges based on workflow executions, while self-hosted instances run unlimited executions on hardware you already pay for. For teams running thousands of monthly automations, self hosting can reduce recurring platform costs substantially — though the exact figure depends on your task volume and how you account for maintenance time, which we break down transparently later in this guide.
Published: 20 June 2026 · Last reviewed: 20 June 2026. This guide reflects n8n’s hosting documentation and community practice as of mid-2026; verify current pricing and license terms on the official pages linked throughout, as both change over time.
n8n ships in two flavors: n8n Cloud, the hosted SaaS where the company manages servers and bills per execution tier, and the self-hosted edition, which you deploy yourself via Docker Compose, npm, or a one-click VPS image. The official n8n documentation supports both paths, but only self-hosting gives you full control over where data lives and what it costs. With self-hosting, you trade a monthly invoice for the responsibility of provisioning, securing, and backing up your own instance — a trade that tends to pay off for SMEs running serious automation volume, provided the team can absorb basic Linux administration.
Data Sovereignty and Cost Control
Data sovereignty is the primary technical reason businesses self-host workflow automation tools like n8n. Data sovereignty means your organization retains full legal and physical control over where data is stored and processed, keeping it within a specific jurisdiction. When you run n8n on your own server, API keys, customer records, and webhook payloads stay on hardware you control — relevant for GDPR compliance, regional data-residency laws, and any workflow handling sensitive financial or health data.
The cost case is the second driver. Cloud-based automation platforms typically charge per execution or per workflow, while self-hosted n8n runs on a server costing as little as $5–$20 per month, regardless of execution volume. n8n Cloud and competitors like Zapier route your data through their infrastructure; self-hosting on your own VPS or on-premise hardware keeps that processing in-house. The community-maintained self-hosting walkthroughs covering installation, security, webhooks, and remote access reflect how widely practitioners adopt this model specifically to keep data and credentials on owned hardware.
Cost control pairs naturally with this. n8n self-hosted has no per-task fees and no execution caps — you pay only for the underlying server, often a $5–$20/month VPS. Pair that with a local LLM via Ollama, and you run private AI workflows at near-zero marginal cost. The r/n8n community has documented exactly this setup since November 2024: users running n8n connected to local Ollama specifically to escape recurring cloud and per-task bills.
| Factor | Self-Hosted n8n | n8n Cloud / Zapier |
|---|---|---|
| Data location | Your hardware | Vendor servers |
| Per-task fees | None | Yes (Zapier “tax”) |
| Execution limits | Unlimited | Tiered caps |
| Monthly cost | ~$5–$20 VPS | $20–$100+ scaling |
| Maintenance burden | You manage it | Vendor manages it |
Why 2026 Adoption Is Shifting Away From Zapier Dependency
Open-source automation adoption is shifting away from Zapier dependency because per-task pricing scales faster than business value. SMEs running high-volume workflows face what engineers informally call the “Zapier tax.”
What is the Zapier tax? It is the compounding cost of per-task pricing, where a single workflow firing thousands of times monthly becomes a four-figure annual expense.
Here is why 2026 adoption is accelerating toward open-source tools like n8n:
- Cost predictability: A high-frequency workflow on metered per-task plans can become a four-figure annual line item, versus a flat self-hosting fee under $20/month.
- No execution caps: Open-source platforms charge for infrastructure, not per-task.
- Data ownership: Workflows run on your own servers.
The core driver is simple: convenience pricing penalizes scale. As workflow volume grows, the marginal cost of each automation rises on Zapier but stays flat on self-hosted, open-source alternatives. A single workflow firing thousands of times a month turns per-task pricing into a recurring expense that grows precisely when automation should be saving money.
Open-source platforms like n8n flip that equation. Because self-hosted n8n decouples cost from volume, a startup automating 50,000 executions a month pays the same flat server bill as one running 500. Search demand for tutorials on Docker Compose, PostgreSQL pairing, and DNS configuration reflects this migration — practical SME founders are moving from rented automation to owned automation, and reclaiming both their data and their margins in the process.
Which n8n Hosting Option Should You Choose?
Choosing the right n8n hosting model is a core pillar of sustained, predictable automation cost.
The right n8n hosting option depends on workflow volume and technical capacity: a VPS suits most SMEs running under 10,000 executions monthly, Docker adds deployment portability, AWS handles enterprise-scale queue processing, and bare metal serves high-throughput operations needing dedicated hardware. In a typical implementation, a $6–$12 VPS handles production loads for a small team without strain.
Many teams over-provision because they assume self-hosted automation demands enterprise infrastructure. In practice, a single DigitalOcean or Hetzner VPS with 2GB RAM can process thousands of workflow executions daily. Practitioners commonly deploy n8n on entry-tier instances such as a Hetzner CX22 (roughly €4.51/month as of 2026) to replace metered cloud automation plans, with the savings depending entirely on the prior plan’s task volume.
n8n Hosting Comparison Table
n8n hosting options can be ranked by cost and scalability. The right choice depends on your monthly execution volume and team size. Quick answer: a VPS is the cheapest option at $5–$12/month, ideal for SMEs running under 10,000 executions monthly.
| Option | Typical Monthly Cost | Best For | Scaling Path |
|---|---|---|---|
| VPS (Hetzner/DigitalOcean) | $5–$12 | SMEs and simple workflows under 10,000 executions | Vertical (resize instance) |
| Docker | $5–$20 (runs on VPS) | Teams needing portability, version control, easy rollback | Vertical + container orchestration |
| AWS (ECS/EC2) | $30–$200+ | High-volume, queue mode, multi-worker setups | Horizontal (auto-scaling workers) |
| Bare Metal | $80–$300+ | 50k+ executions, data residency, heavy compute | Manual hardware expansion |
Key takeaway: self-hosting on a VPS costs far less than AWS for small workloads. Choose AWS only when monthly executions surpass roughly 100,000 or you require automatic horizontal scaling.
When Do You Need Queue Mode?
Queue mode is an n8n execution architecture that separates the main process from dedicated execution workers, distributing workflow processing across multiple instances using Redis as a message broker. Standard single-instance n8n runs workflows in the main process, which becomes a bottleneck at roughly 220 concurrent executions.
You typically need queue mode once you consistently exceed around 200 concurrent executions, run workflows longer than 5 minutes, or require high availability with zero downtime during restarts. Three signals indicate it’s time to switch: execution latency rising under load, CPU sustained above ~80% on the main process, and queued executions backing up during traffic spikes. For deployments processing fewer than ~100 executions per minute, single-instance mode remains simpler and sufficient. The n8n documentation describes queue mode and scaling configuration in detail — see the official hosting and scaling guides before committing to a multi-worker architecture.
For most SMEs, queue mode is premature optimization. A startup processing 5,000 daily workflow runs rarely needs it; a single VPS in regular mode handles the load. AWS with ECS becomes worthwhile when scaling past roughly 100,000 monthly executions or running latency-sensitive workflows that can’t tolerate queuing delays during traffic spikes.
Choosing Based on Your Stage
- Pre-revenue / early startup: Hetzner or DigitalOcean VPS — lowest cost, fastest setup, generally sufficient for validating automation ROI.
- Growing SME: Docker on a VPS — adds deployment hygiene, environment isolation, and one-command upgrades without rebuilding infrastructure.
- High-volume operations: AWS ECS with queue mode and dedicated Redis — horizontal scaling and high-availability targets.
- Regulated or data-resident workloads: Bare metal — full hardware control, no shared tenancy, easier compliance posture for finance or healthcare data.
A reasonable default for most teams: start with Docker on a $6 VPS. Docker gives you VPS economics with production-grade portability, so migrating to AWS later requires no workflow rebuilds — you redeploy the same container. Skipping straight to AWS rarely pays off until execution volume justifies the operational overhead and added monthly spend.
How Do You Set Up an n8n Server Step by Step?
how to self host n8n is a core pillar of sustained growth.
A clean n8n server setup pays off over time through predictable cost and full data control.
Setting up an n8n server takes roughly 30 minutes on a $6/month VPS using Docker Compose, a reverse proxy, and a handful of environment variables. The core sequence is: provision a server, install Docker, deploy n8n behind Nginx or Caddy, secure it with SSL, and configure backups. The n8n community’s step-by-step self-hosting thread walks through the DNS and A-record portion in detail, and is a useful cross-reference if you hit a DNS snag.
Docker remains the recommended deployment method in 2026 because it isolates dependencies and makes upgrades a single command. The walkthrough below assumes a Linux VPS (Ubuntu 24.04 LTS) from providers like Hetzner, DigitalOcean, or Vultr.
The Installation Walkthrough
- Provision the server. Spin up a VPS with at least 2GB RAM and 2 vCPUs. Hetzner’s CX22 instance (around €4.51/month) handles thousands of executions daily for most SMEs.
- Install Docker and Docker Compose. Run the official Docker convenience script, then verify with
docker --version. - Point a domain. Create an A record (e.g.,
n8n.yourcompany.com) pointing to your server’s IP. As the community guide notes, you set this in your domain provider’s DNS settings — enter the subdomain (such asn8n) in the Name field and your server IP as the value. - Create a docker-compose.yml. Define the n8n service, a PostgreSQL container for persistent storage, and a reverse proxy.
- Launch. Run
docker compose up -dand confirm the container is healthy.
A Working docker-compose.yml Example
A typical production-oriented Compose file pairs n8n with PostgreSQL and persistent volumes. The example below is representative of the pattern documented across the n8n hosting guides — adapt the secrets and domain to your own values, and never commit real credentials to version control:
services:
postgres:
image: postgres:16
restart: always
environment:
- POSTGRES_USER=n8n
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=n8n
volumes:
- pgdata:/var/lib/postgresql/data
n8n:
image: docker.n8n.io/n8nio/n8n
restart: always
ports:
- "5678:5678"
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_USER=n8n
- DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
- N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
- WEBHOOK_URL=https://n8n.yourcompany.com/
volumes:
- n8ndata:/home/node/.n8n
depends_on:
- postgres
volumes:
pgdata:
n8ndata:
Confirm the exact image tag and any updated environment-variable names against the current n8n hosting documentation before deploying, since variable names occasionally change between major versions.
Environment Variables and Security Hardening
Environment variables control authentication, database connections, and webhook behavior in n8n. Skipping security hardening is one of the most common mistakes in self-hosted deployments — an exposed n8n instance with no authentication is a live attack surface.
Configure these essentials in your .env file:
- N8N_BASIC_AUTH_ACTIVE=true with a strong username and password (or migrate to the built-in user management for multi-seat access). Note that basic-auth variable behavior has shifted across recent versions — verify the supported authentication method for your version in the docs.
- DB_TYPE=postgresdb with credentials — avoid the default SQLite for production, which degrades and can lock under concurrent writes past a few thousand records.
- N8N_ENCRYPTION_KEY set to a fixed 32-character secret so saved credentials survive container restarts. Lose this key and you lose access to every stored credential.
- WEBHOOK_URL=https://n8n.yourcompany.com/ so webhook nodes generate correct external URLs.
Firewall hardening matters too. Close all ports except 80, 443, and SSH (22), and disable password-based SSH login in favor of key authentication.
SSL, Webhooks, and Backups
SSL is non-negotiable for any n8n instance handling webhooks from Stripe, WhatsApp, or third-party APIs that refuse unencrypted callbacks. Caddy is the fastest path — its automatic HTTPS provisions and renews Let’s Encrypt certificates with no manual steps. A short Caddyfile reverse-proxies traffic to n8n on port 5678 with full TLS:
n8n.yourcompany.com {
reverse_proxy localhost:5678
}
Webhook configuration depends on your WEBHOOK_URL matching your public HTTPS domain exactly. Mismatched URLs are a leading cause of “webhook not triggering” failures.
Backups protect your workflows and credentials. Schedule a nightly pg_dump of the PostgreSQL database plus the n8n data volume, and push the archive to off-site object storage like Backblaze B2 or S3. A daily cron job costing under $1/month prevents the loss of automations that took weeks to build.
Test the full stack by importing a sample workflow, triggering a manual execution, and confirming the webhook fires end to end. A clean deployment should pass all three checks on the first run.
Why Does Self-Hosting n8n Save SMEs Money?
Applying how to self host n8n delivers measurable results over time.
Understanding how to self host n8n is one of the most relevant cost-optimization trends shaping 2026 automation budgets.
Self-hosting n8n eliminates per-task pricing entirely, replacing variable subscription costs with a fixed server bill that typically runs $5–$20 per month. For an SME executing high monthly workflow volumes, that single change can cut automation spend substantially compared to a tiered “per-task” model — the exact savings depend on the prior plan and task count, which we make concrete in the table below.
The savings compound because n8n’s self-hosted Community Edition is open-source and free of execution caps under its Sustainable Use License (review the terms via the official hosting documentation). Per-task platforms charge by the operation — every step in every workflow ticks the meter. A self-hosted n8n instance on a $12/month VPS can process executions limited only by your server’s CPU and memory, not by an artificial pricing tier.
3-Year TCO: Self-Hosted n8n vs Zapier
Total cost of ownership over three years exposes the real gap. The table below compares a mid-volume SME running roughly 100,000 tasks per month — a realistic figure for a company automating CRM updates, invoicing, and lead routing. Figures are illustrative; confirm current tier pricing directly with each vendor, as plans change frequently.
| Cost Factor | Self-Hosted n8n | Zapier (Professional tier) |
|---|---|---|
| Monthly platform cost | $15 (VPS) | $289+ (100k tasks) |
| Per-task fees | $0 | Included, then overage |
| Setup (one-time) | $0–$2,000 | $0 |
| 3-Year Total | ~$2,540 | ~$10,404 |
Across 36 months in this scenario, the self-hosted route saves roughly $7,860 — even after accounting for an upfront implementation cost at the high end of the setup range. As task volume grows, the gap widens, because the VPS bill stays flat while metered tiers escalate. This is the “Zapier tax” in concrete numbers: a recurring penalty for renting infrastructure you could own. The trade-off, made explicit below, is the maintenance time you take on.
How Real SME Implementations Compare
Per-task pricing tends to penalize exactly the businesses that benefit most from automation — high-volume SMEs running repetitive operations. Practitioners migrating from Zapier or Make to self-hosted n8n commonly report large reductions in monthly automation costs, with the magnitude driven by how many tasks they were running on the metered plan.
Where the savings originate:
- No execution caps: Unlimited workflow runs on fixed infrastructure, versus metered tasks that scale your bill with your growth.
- No premium-step surcharges: n8n treats every node equally — no “premium app” tiers that gate integrations behind higher plans.
- Data ownership: Workflows and credentials live on your server, removing vendor lock-in and the cost of migrating off a proprietary platform later.
- Predictable budgeting: A flat monthly server cost makes forecasting trivial, unlike usage spikes that blow past per-task overage thresholds.
One honest caveat for 2026: the savings calculation assumes basic Linux administration and monitoring are handled — either in-house or through a partner. Factor in 2–4 hours of monthly maintenance, and self-hosting still wins decisively for any SME processing more than roughly 5,000 tasks per month, the threshold where a metered model starts charging more than a managed VPS would. Below that volume, the maintenance overhead may outweigh the savings, and a managed plan can be the more rational choice.
Frequently Asked Questions
how to self host n8n is one of the most relevant trends shaping 2026.
Understanding how to self host n8n plays a pivotal role in controlling long-term automation cost and data ownership.
What are the minimum server specs to self-host n8n?
The minimum viable n8n server requires 1 vCPU, 2GB RAM, and 20GB SSD storage, which runs comfortably on a $6–$12/month VPS from Hetzner, DigitalOcean, or Contabo. Workflows with heavy concurrency or large payloads benefit from 2 vCPU and 4GB RAM.
RAM is the constraint that matters most for n8n, because each active workflow execution holds data in memory until completion. A single-user setup running 20–50 workflows per day operates fine on 2GB, but teams pushing 1,000+ executions daily should provision 4GB and consider switching the execution mode from regular to queue mode with Redis. Hetzner’s CX22 instance (2 vCPU, 4GB RAM, €4.51/month as of 2026) handles the vast majority of SME automation loads. Pair the instance with PostgreSQL instead of the default SQLite for any production deployment — SQLite locks under concurrent writes and can corrupt execution history past a few thousand records.
Is self-hosting n8n hard for non-developers?
Self-hosting n8n is moderately accessible for non-developers using Docker Compose, typically requiring 30–60 minutes for a first deployment. The harder parts are not the install — they are SSL certificates, reverse proxy configuration, and ongoing security patching.
Non-developers often succeed with managed platforms like Coolify, Railway, or Elestio, which wrap the Docker setup behind a one-click installer and handle HTTPS automatically. Coolify in particular has become a popular 2026 choice for self-hosting on a cheap VPS, removing the command-line friction that deters many founders. The genuine technical debt arrives later: backups, version upgrades, and node-level debugging when a workflow silently fails. A non-developer can launch n8n in an hour, but maintaining a reliable production instance is where many DIY setups quietly decay — which is why some teams hand off the hardening and monitoring to a partner while keeping the cost advantage of self-hosting.
Is self-hosted n8n as reliable as the cloud version?
Self-hosted n8n can match cloud reliability when configured with queue mode, PostgreSQL, automated backups, and uptime monitoring — but reliability is your responsibility, not n8n’s. A properly engineered self-hosted instance can achieve high uptime; a neglected one will not.
n8n Cloud provides managed uptime, automatic updates, and infrastructure redundancy for $20–$50+/month. Self-hosting trades that guarantee for control and cost savings, which is often the correct trade for SMEs running high-volume automation where cloud execution limits get expensive fast. Reliability gaps in self-hosted setups almost always trace to three avoidable mistakes: no health monitoring, SQLite in production, and skipped version upgrades. Add Uptime Kuma for monitoring, schedule nightly database dumps, and patch on a regular cadence — your self-hosted instance becomes close to cloud in practical reliability while costing substantially less at scale.
The honest takeaway: self-hosting n8n is less about saving $20 a month and more about owning your automation layer outright instead of renting per-execution pricing that grows with you. A €4.51/month Hetzner box can run the same 100,000 monthly executions that would cost hundreds on a metered cloud plan. Build it right once, monitor it, and the math compounds in your favor every month — provided you account for the maintenance time the model requires.
Sources & References
how to self host n8n plays a pivotal role in this context.
- n8n Hosting Documentation and Guides — n8n Docs (installation, environment variables, authentication, scaling, and licensing context)
- An easy step-by-step guide on how to self-host n8n — n8n Community (DNS / A-record configuration)
- How to Self-Host n8n: Complete Guide to Installation, Security, Webhooks, and Remote Access
- Best setup for self hosting n8n locally without cloud/server costs — r/n8n (Reddit), Nov 2024 (local Ollama + n8n cost-driven setup)
This guide draws on general topical expertise in self-hosted infrastructure and the official n8n documentation. Pricing, version-specific environment variables, and license terms change over time — always verify against the linked official sources before deploying to production.
Last updated: 2026-06-20
Note: This article is for general informational purposes; verify specifics against your own context.
