Self-hosting n8n is genuinely worth doing — and about to become the only way to run it yourself. n8n’s changelog confirms that v3.0, expected October 2026, drops support for npm installs entirely: self-hosted n8n will require Docker. Good news: the Docker path is also the easiest one, and you can have a production-ready instance running in about an hour on a $10-25/month server.
We run self-hosted n8n instances for client automations at Builts AI, and this guide is the setup we actually use: Docker, a persistent volume, Postgres when volume justifies it, HTTPS via a reverse proxy, and a boring, reliable update routine. If you’re still deciding whether to self-host at all, read our n8n review first — this guide assumes you’ve decided and want it done right.
What Do You Need Before Installing n8n?
Four things: a small VPS, Docker, a domain name, and 30-60 minutes. A server with 2 GB RAM and 1-2 vCPUs handles typical small-business automation loads — that’s $10-25/month at Hetzner or DigitalOcean, per their public pricing. The domain matters because n8n’s webhook triggers need a stable HTTPS address that services like Stripe or your CRM can call.
Checklist before you start:
- VPS: Ubuntu 22.04 or newer, 2 GB RAM minimum. n8n’s own docs publish one-click guides for Hetzner and DigitalOcean.
- Docker + Docker Compose: current versions from Docker’s official install script.
- A subdomain: something like
automation.yourdomain.com, with an A record pointing at the server. - A password manager entry ready for the encryption key you’re about to create. This file is the difference between a recoverable server and a rebuild.
Skip the temptation to run n8n on a machine that also does other jobs. Automation servers accumulate credentials to your CRM, calendar, and inbox — isolation is a security feature, not overkill.
How Do You Install n8n With Docker?
One volume and one docker run command gets n8n live on port 5678. This is the current official installation from n8n’s Docker docs (2026):
docker volume create n8n_data
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-e GENERIC_TIMEZONE="America/Toronto" \
-e TZ="America/Toronto" \
-e N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \
-e N8N_RUNNERS_ENABLED=true \
-v n8n_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8n
Three details matter here. The image comes from n8n’s own registry (docker.n8n.io/n8nio/n8n), not Docker Hub mirrors. The volume mapping n8n_data:/home/node/.n8n is where n8n keeps its SQLite database and the credential encryption key — lose it and every stored login is gone. And the two timezone variables keep schedule-triggered workflows firing at your local time instead of UTC.
For production, convert this to a docker-compose.yml so the configuration lives in a file you can version-control. n8n maintains ready-made Compose files, including a Postgres variant, in its official hosting repository — start from those rather than hand-rolling one.
Should You Use SQLite or Postgres?
SQLite until it hurts, then Postgres. n8n defaults to SQLite inside the data volume with zero configuration, and for a handful of workflows running a few hundred executions a month it’s completely fine. We run early-stage client instances on SQLite deliberately — fewer moving parts to babysit.
| SQLite (default) | Postgres | |
|---|---|---|
| Setup | None | Second container + 6 env vars |
| Right for | A few workflows, light volume | Thousands of executions/month |
| Concurrency | Single-writer, fine for small loads | Handles parallel workflows properly |
| Backups | Copy the volume | pg_dump, point-in-time recovery |
When you outgrow SQLite, n8n switches databases through environment variables — DB_TYPE=postgresdb plus the DB_POSTGRESDB_HOST, DB_POSTGRESDB_DATABASE, DB_POSTGRESDB_USER, DB_POSTGRESDB_PASSWORD, DB_POSTGRESDB_PORT, and DB_POSTGRESDB_SCHEMA connection settings, per n8n’s Docker documentation. Export your workflows first, or migrate the volume; the database swap doesn’t move data for you.
How Do You Put n8n Behind HTTPS?
Run a reverse proxy in front of port 5678 and give n8n its public URL through environment variables. Don’t expose 5678 to the internet raw: webhook endpoints carry real business data, and browsers block parts of n8n’s UI on plain HTTP anyway.
The simplest stack is Caddy — it provisions and renews Let’s Encrypt certificates automatically with a two-line config. Nginx plus certbot works just as well if that’s what you already run. Either way, tell n8n about its public address:
N8N_HOST=automation.yourdomain.comWEBHOOK_URL=https://automation.yourdomain.com/
Without WEBHOOK_URL, n8n generates webhook addresses pointing at its internal port, and every external service you connect will call a URL that doesn’t resolve. This is the single most common self-hosting mistake we see in client audits — workflows that “worked in testing” because testing used the editor’s test URL, then silently never fire in production.
How Do You Back Up Self-Hosted n8n?
Back up the whole n8n_data volume, not just the database — the volume holds the credential encryption key. n8n’s docs are explicit that the .n8n directory “still contains other important data like encryption keys” even when your workflow data lives in Postgres. A backup that skips it restores your workflows with every credential locked.
A backup routine that has never lost us data:
- Nightly: snapshot the
n8n_datavolume (andpg_dumpif you’re on Postgres) to storage that is not the same VPS. - Before every update: manual snapshot, always. Thirty seconds of discipline beats an afternoon of forensics.
- Once: copy the encryption key into your password manager. If the server dies entirely, this key plus the database gets everything back.
- Quarterly: actually restore a backup to a scratch server. An untested backup is a hope, not a plan.
How Do You Update n8n Without Breaking Things?
Pin a version, back up, then pull and restart. With Compose the whole update is three commands, straight from n8n’s docs: docker compose pull, docker compose down, docker compose up -d. Using plain docker run, it’s docker pull docker.n8n.io/n8nio/n8n, stop, re-run.
Two rules keep updates boring. First, pin a specific version tag in your Compose file instead of latest, so upgrades happen when you schedule them — not whenever a container restarts. Second, read the release notes before any major-version jump. n8n ships breaking changes on majors; the v3.0 release expected October 2026 removes npm-based installs and is exactly the kind of change you want to meet on your own schedule.
What Does Self-Hosting n8n Actually Cost?
Around $85-175/month all-in, even though the software is free. The VPS is the small part — $10-25/month. The real line item is the 1-2 hours of monthly maintenance (updates, disk checks, the occasional broken node after an upgrade) that lands on whoever owns the server. At standard developer rates, that time dominates the budget. The full cost breakdown is in our n8n review, including when the math beats managed platforms like Make.
| Cost item | Monthly |
|---|---|
| VPS (2 GB, Hetzner/DigitalOcean) | $10-25 |
| Domain + backup storage | $2-10 |
| Maintenance time (1-2 hrs at $75-100/hr) | $75-150 |
| Realistic total | $85-175 |
The n8n software itself: $0, no execution limits, on a source-available license — the project reports nearly 200,000 GitHub stars on its site as of 2026, and the Community Edition is the same core engine the paid tiers run.
When Should You Use n8n Cloud Instead?
When nobody on your team wants to own a server — and that’s most small teams. n8n Cloud’s Starter plan runs €20/month for 2,500 executions, and Pro is €50/month for 10,000, per n8n’s pricing page as of August 2026. Compare that to the $85-175 realistic self-hosting total: unless maintenance hours are already paid for, the managed option is cheaper for light and moderate volume.
Self-hosting wins in three situations, and we hold clients to this list:
- Data residency: healthcare under PHIPA, legal privilege, financial services — workflow data can’t touch a third-party cloud.
- Volume: high execution counts where flat infrastructure cost beats per-execution tiers.
- Control: custom nodes, private network access to internal systems, or code the managed platforms won’t run.
If none of those apply, take the managed option — our comparison of Zapier, Make, and n8n covers which platform fits which workload.
Key Takeaways
- Docker is now the way: n8n v3.0 (expected October 2026) ends npm installs, per n8n’s changelog.
- One volume, one command: the official
docker.n8n.io/n8nio/n8nimage withn8n_datamounted at/home/node/.n8ngets you live on port 5678. - SQLite first, Postgres when volume demands it — the switch is six environment variables.
- Set
WEBHOOK_URLbehind your HTTPS proxy or external triggers will silently fail. - Back up the volume, not just the database: the encryption key lives there.
- Budget $85-175/month honestly; at low volume, n8n Cloud’s €20 Starter beats self-hosting on cost.
And if you’d rather have the outcome without owning the server: building and running n8n automations for small businesses is exactly what we do — see how we build custom workflows.



