Self-hosted n8n with Docker: the complete guide.

Unlimited executions for the price of a VPS, data that stays on your server, no integration limits. Self-hosting is the reason n8n wins with SMBs that automate seriously. Here's why, how to install it properly, what it actually costs, and what you need to know before you start.

01 · Why self-host

The three reasons that tip the scale.

n8n comes in two versions: the official cloud (n8n.cloud, run by the publisher) and self-hosting on your own server. Same product, same workflow editor, same integrations. Three differences tip the balance.

The cost model. Cloud bills by execution tiers: €20/month for 2,500 executions at the first tier, rising with volume from there. Self-hosted costs the price of your server, full stop. A workflow running every 15 minutes already generates 2,900 executions a month on its own: as soon as you're automating seriously, the cloud meter becomes the topic, while the VPS doesn't move.

Data location. Your workflows handle leads, invoices, customer data. Self-hosted, everything flows through your server, at the European host you chose. Your data-processing register gets simpler, and so do your enterprise clients' vendor security questionnaires.

No cap. No execution limit, no limit on active workflows, full access to technical features (code, HTTP requests, queues). Your instance grows with your needs, not with a pricing grid.

n8n Cloud Self-hosted n8n
Entry price €20/month (2,500 executions) €5 to €20/month (VPS, unlimited executions)
Data location Publisher's infrastructure Your server, host of your choice (EU)
Volume Paid tiers Limited only by your server
Maintenance None 1 to 2h/month (or delegated)
Updates Automatic On your schedule, controlled
Best for Fast start, small volume Growing volume, sensitive data, controlled cost

To place n8n against the alternatives: neither Make nor Zapier offer self-hosting. Our full comparison n8n vs Make vs Zapier breaks down the match tool by tool. For a full overview of the tool (use cases, pricing, AI agents), see the n8n guide.

02 · Docker

Install n8n with Docker: the official commands.

n8n's official documentation, checked on September 27, 2026, is clear: Docker is becoming the only way to install n8n. From n8n 3.0, announced for October 2026, n8n is distributed only through Docker, and the old npm install n8n / npx n8n approach no longer works for a new install.

To try it on your machine: one command

With Docker installed and running (Docker Desktop on Mac or Windows, Docker Engine on Linux), n8n provides an install script:

curl -fsSL https://get.n8n.io | sh

The script checks that Docker is running, creates an n8n folder with the configuration (compose.yml, and a .env with generated secrets), downloads n8n and starts it on http://localhost:5678. It is safe to run again: if n8n is already set up in that folder, it changes nothing. If you would rather read a script before running it, the documentation suggests downloading it first (curl -fsSL https://get.n8n.io -o get-n8n.sh). On Windows, run it from WSL.

To Command
Stop n8n docker compose -f ./n8n/compose.yml down
Start it again docker compose -f ./n8n/compose.yml up -d
Upgrade curl -fsSL https://get.n8n.io | sh -s -- --upgrade

This install uses SQLite, a built-in database stored in a file. Perfect to explore, not for a team.

For production: Docker Compose, a domain and HTTPS

On a server, the documentation describes a Docker Compose install in a few steps: a project folder, an .env file, a local-files folder to exchange files with n8n, and a compose.yaml that runs n8n behind Traefik, a proxy that handles the HTTPS certificate and renews it on its own. The .env fits in four lines:

DOMAIN_NAME=yourdomain.com
SUBDOMAIN=n8n
GENERIC_TIMEZONE=Europe/London
SSL_EMAIL=you@yourdomain.com

Then sudo docker compose up -d, and n8n answers on https://n8n.yourdomain.com, over HTTPS only. Copy the full compose.yaml from the Docker Compose page of the n8n documentation: it is the reference version, kept up to date by the publisher.

Two production settings not to forget, according to the same documentation:

  • PostgreSQL rather than SQLite as soon as several people work on the instance or workflows run around the clock. SQLite data is not carried over automatically: better to start on PostgreSQL from day one.
  • The stable version, not beta. n8n ships a new minor version most weeks; as of September 27, 2026, stable is 2.40.7.

n8n says it itself: self-hosting is meant for people comfortable with servers, and a mistake can cost data or uptime. That is what the steps below are for.

03 · Before you install

License, limits, prerequisites: the honest picture.

The fair-code license

n8n isn't open source in the strict sense: it's fair-code (Sustainable Use License). In practice: internal use at your company is free, including commercial use. The restriction: you can't resell n8n itself as a service. For an SMB automating its own operations, the license costs nothing and constrains nothing.

What stays reserved for paid tiers

The free self-hosted version covers the essentials: every integration node, unlimited workflows, custom code, webhooks. Some team features stay reserved for the publisher's paid tiers: SSO, advanced per-project permissions, log streaming, externalized secrets management. For most SMBs, nothing blocking; at the scale of a mid-market company with several teams, it becomes a real question worth costing out.

The technical prerequisites

  • A VPS from a European host: Hetzner, OVHcloud, Scaleway. 1 vCPU and 2GB of RAM to start, 2 vCPU and 4GB for comfort.
  • A dedicated subdomain (for example n8n.yourdomain.com) pointing to the server.
  • A Docker install, the only method from n8n 3.0: clean, isolated, easy to update.
  • One person comfortable with a terminal, in-house or at your partner. Nothing more is needed.
04 · Installation

n8n in production in 5 steps.

The sequence below is what we deploy for our clients. The commands are in the previous part; here, what matters for deciding is the real effort of each step. The guiding principle never changes: secure access and backups from day one.

01

Rent the VPS and point the subdomain

At Hetzner, OVHcloud, or Scaleway, a 2 vCPU / 4GB machine costs €5 to €15/month. Point your subdomain at it (n8n.yourdomain.com) and turn on the firewall your host provides. An hour, DNS included.

02

Install n8n

Installation goes through Docker Compose, with a PostgreSQL database: n8n runs in an isolated environment, with dedicated storage for your workflows and credentials, set to your timezone. Half an hour, and the application is running.

03

Secure access over HTTPS

n8n should never be directly exposed to the internet. We put the application behind a secure HTTPS address on your subdomain, with an encryption certificate that renews automatically. From the outside, that's the only door that exists.

04

Back up from day one

Your workflows and encrypted credentials are backed up daily, off the server, the encryption key is kept somewhere safe, and the restore is tested at least once: a backup that's never been restored isn't a backup.

05

Update and monitor

Once a month: the update, a few minutes, after a glance at the release notes. On the monitoring side: failed executions, disk space, certificate. An alert channel (email, Slack) wired to failures closes the loop: your instance tells you when something's wrong.

Total time for a clean install: half a day, security and backups included. For the step-by-step technical detail, n8n's official documentation (docs.n8n.io) covers every variant, command by command.

05 · The real cost

Under €30/month, maintenance included.

Infrastructure
€5 to €20/month

European VPS + externalized backups. Unlimited executions, whatever the volume.

n8n license
€0

Fair-code: free internal use, including commercial. You're not reselling n8n, you pay nothing.

Maintenance
1 to 2h/month

Updates, backup checks, tracking failures. In-house or delegated.

The three-year comparison makes the point: a self-hosted instance costs around €900 over 3 years (VPS + monitoring), while the same workload on per-operation billed platforms runs into the thousands of euros. As your automations multiply, the gap widens: every new workflow is free on self-hosted, billed by usage elsewhere.

This microscopic infrastructure cost is also what makes more ambitious systems viable: a 24/7 AI agent orchestrated by n8n runs on the same machine, and the full budget breakdown for an agent is in How Much Does an AI Agent Cost.

06 · Data & compliance

Your data stays with you.

This is the deciding argument for many of our clients, and it's simple to understand: an automation workflow sees everything it processes pass through it. Incoming leads, supplier invoices, HR data, customer exchanges. The question "where does this data actually go" deserves a precise answer.

Self-hosted, the answer fits in one line: on your server, at the European host you chose, under contract with you. You choose the location, you keep the list of subprocessors, you control the logs and retention periods. When an enterprise client sends you their security questionnaire, every answer is in your hands.

Three practices round out the setup, and we apply them systematically:

  • Encrypted credentials, a key kept safe. n8n encrypts the login credentials to your tools; the encryption key is kept off the server.
  • Named accounts and a secure connection. One account per person, never shared, and the interface accessible only over HTTPS.
  • Controlled execution retention. Execution logs contain the data that was processed: we configure automatic purging to keep only what's necessary.

For balance: n8n Cloud is a serious offering from a European publisher (German), with its own commitments. Self-hosting doesn't win by default against the other option; it wins through the level of control it gives you.

07 · The other option

When n8n Cloud is still the right choice.

Honesty first: self-hosting isn't the right answer for everyone. Three situations where we recommend the cloud without hesitation.

  • No one to run the server. No terminal skills in-house, no partner: the cloud removes the question entirely. A poorly maintained instance is worse than a subscription.
  • Small volume, fast start. A handful of workflows, under 2,500 executions a month: €20/month with zero management is a good deal for validating use cases before industrializing.
  • Need for managed team features. SSO, separate environments, vendor support under SLA: if these requirements arrive before the infrastructure skills do, the managed paid tier answers directly.

The typical trajectory we see: start on cloud to validate, switch to self-hosted once volume and data stakes rise. The migration is simple (workflows transfer as-is, credentials get recreated) and takes half a day to a full day.

08 · Our setup

What AUTOMATE ALL runs in production.

n8n is one of the pillars of our orchestration stack, alongside custom Python and PostgreSQL. Across 25+ systems in production, our deployment standard has settled into:

  • Hardened instance: access only over an encrypted connection, nothing exposed unnecessarily, named accounts, minimal firewall.
  • Tested daily backups: volume + database, externalized, restore verified.
  • Active monitoring: alerts on workflow failures, disk space, certificates. Grafana dashboards when volume justifies it.
  • Separated environments: a staging space, a production one. A workflow never ships to production without a dry run.
  • 100% client ownership: server, workflows, credentials, documentation. You keep everything if our paths ever separate.

The method for deciding what to automate first is detailed in How to Automate a Business Process in 2026, and the full set of our disciplines is on the Services page.

09 · Frequently asked questions

Self-hosted n8n: what people ask us.

How do I install n8n with Docker?

To try it, the official documentation provides one command: curl -fsSL https://get.n8n.io | sh. It creates an n8n folder with its configuration and starts n8n on http://localhost:5678. For production, use Docker Compose with a domain name, HTTPS and a PostgreSQL database.

Can I still install n8n with npm?

Not for a new install from n8n 3.0, announced for October 2026: n8n will only be distributed through Docker. An existing npm install keeps working for now, but the documentation recommends Docker for new installs and future upgrades.

Is n8n free to self-host?

Yes for the license: n8n is distributed under a fair-code license (Sustainable Use License), free for internal use at your company, including commercial use. You only pay for your infrastructure: a €5 to €20/month VPS is enough for most SMBs, with unlimited executions. The main restriction: you can't resell n8n itself as a service to your own clients.

What server do you need to self-host n8n?

A VPS from a European host (Hetzner, OVHcloud, Scaleway) with 1 vCPU and 2GB of RAM is enough to start; 2 vCPU and 4GB gives comfortable room for dozens of active workflows. Beyond that, you simply scale the server up. The starting point costs €5 to €10/month.

What's the difference between n8n Cloud and self-hosted n8n?

n8n Cloud starts at €20/month for 2,500 executions, with no server to manage, and pricing tiers that rise with volume. Self-hosted costs the price of your VPS (€5 to €20/month), with unlimited executions, data on your own server and access to every integration. In exchange, maintenance is on you: 1 to 2 hours a month for an SMB instance.

Can Make or Zapier be self-hosted?

No. Make and Zapier are cloud-only services: your workflow data passes through their servers and cost scales with operation volume. n8n is the only one of the three to offer full self-hosting, which makes it the default option as soon as data control or volume becomes a criterion. The detail is in our full comparison.

Can you migrate from n8n Cloud to a self-hosted instance?

Yes. Workflows export and reimport as-is onto your instance. Credentials to your tools need to be recreated on the new instance for security reasons, and webhook addresses updated with the services that call them. A typical SMB migration takes half a day to a full day.

How much maintenance does a self-hosted n8n need?

A monthly update that takes a few minutes, checking backups, and keeping an eye on failed executions. Budget 1 to 2 hours a month for an SMB instance. It's the only real hidden cost of self-hosting, and it can be delegated: it's exactly what we operate for our clients.

What's next

Want us to look
at your case?

A 20 minute call, free. We look at what eats your time and tell you plainly what is worth automating. And if nothing is, we say that too.

Book a 20 min call → See our automation services
Free · 20 minutes · Reply within 24 h