Hands-on VPS & self-hosting Monday, June 1, 2026
VPS.app
Hands-on VPS benchmarks and self-hosting guides — tested, not theorized.
Self-Hosting Guides

How to Self-Host n8n on a VPS (2026, Docker)

Some links below are affiliate links: if you buy through them I may earn a commission at no extra cost to you. I only recommend what I have actually tested, and it never changes my verdict.

Workflow automation on a self-hosted server

n8n is an open-source workflow automation tool: connect APIs, databases, webhooks and AI into automations, with a visual editor. Self-hosted, there’s no per-task bill — you run as much as your VPS can handle.

Prerequisites

  • A VPS with 1–2 GB RAM (options).
  • A domain like n8n.yourdomain.com (point it at the VPS).
  • Docker + Docker Compose, plus a reverse proxy for HTTPS.

Step 1 — Compose file

services:
  n8n:
    image: n8nio/n8n:latest
    restart: always
    ports:
      - "5678:5678"
    environment:
      - N8N_HOST=n8n.yourdomain.com
      - N8N_PROTOCOL=https
      - WEBHOOK_URL=https://n8n.yourdomain.com/
      - GENERIC_TIMEZONE=Asia/Shanghai
      - N8N_SECURE_COOKIE=true
    volumes:
      - n8n_data:/home/node/.n8n

volumes:
  n8n_data:

Step 2 — Start it

docker compose up -d

Step 3 — HTTPS

Webhooks need a real HTTPS URL, so put Nginx Proxy Manager in front and map n8n.yourdomain.com to the container on port 5678, with a Let’s Encrypt cert: Nginx Proxy Manager setup.

Step 4 — First login & workflows

Open https://n8n.yourdomain.com, create the owner account, and build your first workflow. For production use, set up Postgres and regular backups of the n8n_data volume.

Which VPS to run it on

n8n is light to start. A 1–2 GB Hetzner or Vultr box is plenty; Cloudways if you want it managed. See Best VPS for Self-Hosting.

Frequently asked questions

Why self-host n8n instead of using Zapier?

Self-hosted n8n has no per-task pricing — you run unlimited workflows and executions for the cost of a small VPS. The trade-off is you maintain it and secure it yourself.

What VPS does n8n need?

1–2 GB RAM is enough for personal automations. Heavy workflows or many concurrent executions benefit from 2–4 GB and an external Postgres database.

Do I need a database for n8n?

Not to start — it uses SQLite by default, which is fine for personal use. For heavier or team use, switch to Postgres.