Cross-posted from the PickYourApp blog. This tutorial is app-agnostic — it works with any VPS.
If you've been building automations with n8n, you already know the pain: n8n Cloud starts at roughly $20/month for 2.5k executions, and your workflows — your actual business logic — live on someone else's servers. Self-hosting n8n fixes both problems. You pay for a VPS instead of per-seat SaaS pricing, and your data stays on hardware you control.
This guide walks through what self-hosting n8n actually involves in 2026: the honest manual setup path, the real costs, and the shortcuts available if you just want it running today.
Why self-host n8n at all?
Three reasons keep coming up in the self-hosted community:
- Cost. n8n Cloud charges per execution tier. A $7–15/month VPS runs n8n (and a handful of other apps — more on that later) with effectively unlimited executions. For most solo builders and small teams, the VPS wins by a wide margin within the first month.
- Data ownership. Workflows frequently touch customer data: CRM records, emails, payment webhooks. Self-hosting keeps that traffic inside infrastructure you govern.
- No execution anxiety. When you're not counting executions against a quota, you build differently. You automate the small annoying things too — that's where most of the value hides.
What you need before starting
- A VPS with at least 2 GB RAM (4 GB is comfortable once you add databases and other apps)
- A domain name pointed at your server
- Docker installed (that's the standard n8n deployment method)
- 30–90 minutes of your time, depending on your Linux comfort level
The manual setup: what it really takes
Here's the honest version of the process most tutorials gloss over.
1. Get a server and Docker
Provision your VPS, SSH in, and install Docker plus the compose plugin:
curl -fsSL https://get.docker.com | sh 2. Create the compose file
n8n's official Docker image is well-maintained, but a production-ready compose file needs more than the bare minimum. You'll want persistent volumes, health checks, and a dedicated Docker network:
services: n8n: image: docker.n8n.io/n8nio/n8n restart: unless-stopped ports: - "5678:5678" volumes: - n8n_data:/home/node/.n8n environment: - GENERIC_TIMEZONE=UTC - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true - N8N_HOST=n8n.yourdomain.com - N8N_PROTOCOL=https - WEBHOOK_URL=https://n8n.yourdomain.com/ volumes: n8n_data: 3. Configure environment variables properly
This is where most self-hosters get burned. n8n has hundreds of environment variables, and a few are security-critical for production: webhook URLs (N8N_HOST, WEBHOOK_URL), encryption keys (N8N_ENCRYPTION_KEY — lose this and your stored credentials become unreadable), and basic auth settings. Miss one and you'll discover it later as mysterious webhook failures or, worse, an unauthenticated instance exposed to the internet.
4. Put it behind HTTPS
n8n must never run bare on port 5678 facing the internet. You need a reverse proxy — Caddy or Traefik are the common choices — with automatic Let's Encrypt certificates. That's another container, another config file, another set of DNS records.
5. Wire up updates and backups
Self-hosting is a commitment, not a weekend. You're now on the hook for: pulling new n8n images without losing credentials, backing up the data volume (workflows, credentials, execution history), and having an answer when the disk fills up with execution logs.
Realistically, steps 1–5 take 30–90 minutes if everything goes smoothly, and a few hours the first time it doesn't. None of it is exotic — it's just DevOps, and DevOps done at 11pm when your webhook integration silently broke is nobody's idea of fun.
The one-click path
If your goal is using n8n rather than administering it, there's a middle ground between n8n Cloud's pricing and full manual ops.
PickYourApp is a one-click installer for open-source apps: you pick n8n from a catalog of 2,748 apps, it sizes the VPS, points your domain, handles HTTPS, and hands you a running instance. Plans start at $7.15/month — metered hourly at $0.013/hr, so you can test an instance for pennies and stop it whenever you like.
The setup that takes an evening above becomes about a minute: choose app, click deploy, log in. The same applies to the rest of your stack — Uptime Kuma for monitoring, Gitea for git, Ghost for a blog — so you're not repeating the reverse-proxy dance per app.
Full disclosure: that link goes to our own product. The manual tutorial above is genuinely complete — use it if you enjoy the process or want maximum control. The one-click option exists for everyone else.
FAQ
Is self-hosted n8n really free?
Yes. The Community Edition is free to run for internal business use (it's released under a sustainable-use license, so you can't resell it as-is — but running your own automations on it costs nothing but the server).
How much RAM does n8n need?
n8n doesn't publish a hard minimum. Light, single-user setups run happily on 2 GB; give it 4 GB once you add production workloads, AI nodes, or other apps on the same box.
Can I move my workflows from n8n Cloud to self-hosted?
Yes — export workflows as JSON from the Cloud UI and import them on your instance. You'll re-enter credentials (those are encrypted with your instance's N8N_ENCRYPTION_KEY, which is exactly why backing that key up matters).
Quick checklist either way
- [ ] VPS with 2+ GB RAM
- [ ] Domain DNS pointed at the server
- [ ] HTTPS via reverse proxy (never expose port 5678 directly)
- [ ]
N8N_ENCRYPTION_KEYgenerated, stored in a password manager - [ ] Data volume backed up on a schedule
- [ ] Update routine: pull image, check release notes, restart
Wrapping up
Self-hosting n8n is one of the highest-ROI moves for builders in 2026: a few dollars of VPS replaces a growing SaaS line item, and your workflows become portable infrastructure you actually own. The only real cost is the setup and maintenance time.
Pay the time, or pay a few dollars to skip it — either way, own your automation stack.
Ready to skip the DevOps? Deploy n8n in one click →



