Skip to content

Self-host n8n

updated Jul 2026prices checked · Jul 2026Install verified on Ubuntu 26.04 · Sep 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →

A fair-code workflow automation tool — connect APIs and build automations visually, self-hosted so your data and credentials never leave your server.

Key facts

LicenseSustainable Use License
StackTypeScript, Node.js
Min RAM1024 MB
Official imageyes
Measured idle RAM396 MB
Difficulty
Our recommendation

Pick n8n when you want a visual workflow builder with a Code node and hundreds of integrations, and you have read the licence: it is fair-code under the Sustainable Use License — free for internal business, personal and non-commercial use, but you may not host it and charge people for access or white-label it, and files with `.ee.` in the name need an Enterprise licence. One container (`n8nio/n8n`, TypeScript on Node.js) with SQLite in `/home/node/.n8n` is a complete install; PostgreSQL is an environment-variable switch. Upstream publishes no RAM figure, ships a new minor most weeks, and says self-hosting is for expert users. If the licence terms are a blocker, Huginn is the other workflow-automation entry in the catalog.

Follow the n8n deploy guide →

What you need

  • Any VPS with at least 1024 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • About an afternoon — budget time for troubleshooting
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + US
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + Asia
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + Asia
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install

Run these commands on your server:

# n8n — single container (set a real encryption key in production)
docker run -d --name n8n \
  -p 5678:5678 -v n8n_data:/home/node/.n8n \
  docker.n8n.io/n8nio/n8n
# open http://SERVER_IP:5678

What you take on

n8n's hosting docs are frank that self-hosting is expert territory; these are the parts that bite:

non-negotiableSet N8N_ENCRYPTION_KEY yourself and keep it: otherwise n8n generates a random key on first launch, stores it in ~/.n8n, and uses it to encrypt every credential in the database. Lose the volume without the key and the credentials are gone; in queue mode every worker needs the same key. Our snippet's n8n_data:/home/node/.n8n volume is what holds it — upstream says keep that mount even when you move to PostgreSQL.
non-negotiableBehind a reverse proxy set N8N_WEBHOOK_URL (it replaces WEBHOOK_URL, deprecated from 2.35.0) and N8N_PROXY_HOPS=1, and pass X-Forwarded-For, X-Forwarded-Host and X-Forwarded-Proto; otherwise webhook URLs are built from N8N_PROTOCOL, N8N_HOST and N8N_PORT and point at port 5678. N8N_SECURE_COOKIE defaults to true, meaning session cookies are only sent over HTTPS — put TLS in front rather than turning it off.
non-negotiableTask runners are the only isolation between Code-node scripts and n8n's database, encryption key and credentials. They are on by default since 2.0 (N8N_RUNNERS_ENABLED is deprecated), but the default internal mode runs as the same user as n8n and is deprecated from 3.0; production means N8N_RUNNERS_MODE=external with the separate n8nio/runners sidecar at the same version. 2.0 also blocked environment-variable access from the Code node, disabled the ExecuteCommand and LocalFileTrigger nodes, and dropped MySQL/MariaDB as a backend.
non-negotiableA new minor ships most weeks (stable 2.39.8 as of September 2026); upstream says update at least monthly and read the release notes, and the 2.0 breaking-changes page says to pin your n8n version rather than pull latest. 3.0, scheduled for October 2026, will drop npm installs entirely (Docker only), rename ~/.n8n/binaryData to ~/.n8n/storage, cut the Code-node task timeout default from 300 s to 60 s, and turn unverified community packages off. Supported PostgreSQL is the two newest majors plus one (16–18 as of July 2026); Aurora is experimental.
non-negotiableThe 1 GB floor is our estimate; n8n publishes no RAM requirement. Its memory page says usage scales with JSON and binary size, node count and manual executions (which copy data for the UI), that the fix is more memory or smaller batches and sub-workflows, and that JavaScript heap out of memory calls for --max-old-space-size via NODE_OPTIONS.

An alternative to

Head-to-head

More in Workflow automation

Workflow automation

Activepieces

A no-code automation builder positioned as an open-source replacement for Zapier: a visual flow editor, a large library of 'pieces' (connectors) written in TypeScript, and MCP servers in the open core (its AI agents and Chat are paid-layer features). The Community Edition core is MIT-licensed; access control, audit logs, Git sync and multi-project features are sold as paid editions. Runs as one container for hobby use or a four-service compose stack for production.
TypeScriptNode.jsPostgreSQLRedis
easyRead guide →
Workflow automation

Huginn

A system for building agents that perform automated tasks for you online — they read the web, watch for events and take actions on your behalf, in the IFTTT/Zapier mould but with the data on your own server. A Ruby on Rails application under the plain MIT license, in continuous development since 2013, with official Docker images that bundle MySQL so a single container is a complete install. Agents are configured as JSON, not dragged onto a canvas — the most hands-on tool in this hub.
RubyRailsMySQL
easyRead guide →
Workflow automation

Node-RED

A flow-based programming tool for event-driven applications: a browser editor where you wire together nodes from a palette, on a light Node.js runtime that is equally at home on a Raspberry Pi and in the cloud. Originally built by IBM's Emerging Technology Services team, now an OpenJS Foundation project under Apache-2.0 with thousands of community-contributed nodes. It is the pick for MQTT, hardware and event plumbing more than for SaaS-to-SaaS automation — and its editor ships with no login until you configure one.
Node.js
easyRead guide →
Workflow automation

Windmill

A code-first developer platform that turns scripts in Python, TypeScript, Go, Bash, SQL and more into webhooks, scheduled jobs, flows and internal UIs — the self-hostable alternative to Retool, Pipedream and Temporal rather than a Zapier-style connector catalogue. The core is AGPL-3.0 and the free Community Edition has no execution cap, but it is capped at 50 users and lacks SAML/SCIM, Enterprise-grade audit logs, autoscaling and the forms/prompts layer of approval steps, and the shipped CE image also contains proprietary code.
RustSveltePostgreSQL
moderateRead guide →

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.