Self-host n8n with Docker: automation without the Zapier bill

Published 2026-10-07 · tested on Ubuntu 24.04, Intel Core Ultra 7 255H, Docker 29

TESTED — we actually deployed this

n8n is the self-hosted Zapier alternative: visual workflow automation with 400+ integrations, except the per-task pricing is replaced by your own hardware. Zapier’s free tier caps you at 100 tasks/month; a self-hosted n8n runs unlimited workflows for the cost of ~450 MB of RAM.

We deployed the current version (2.x), hit two real problems worth knowing about, and built a first workflow that’s actually useful. All numbers measured on our hardware.

What you need

Step 1: the Compose file

services:
  n8n:
    image: docker.n8n.io/n8nio/n8n:latest
    container_name: n8n
    ports:
      - "5678:5678"
    environment:
      - N8N_SECURE_COOKIE=false
      - GENERIC_TIMEZONE=Asia/Kolkata
      - TZ=Asia/Kolkata
      - N8N_RUNNERS_ENABLED=true
    volumes:
      - n8n-data:/home/node/.n8n
    restart: unless-stopped

volumes:
  n8n-data:

Line-by-line of the non-obvious parts:

docker compose up -d

Open http://localhost:5678, create the owner account (local — nothing is sent to n8n cloud), and skip the license-key promo if you don’t want it.

Step 2: a first workflow that’s actually useful

Most n8n tutorials end with a hello-world HTTP call. Here’s one that solves a real problem: free database tiers pause when idle. Supabase pauses after 7 days of inactivity. A scheduled n8n workflow keeps it alive:

  1. Schedule Trigger node → every 3 days
  2. Postgres node → your database credentials → query: SELECT 1 AS keepalive;
  3. Publish (n8n 2.x renamed “Activate” — workflows now ship as published versions)

n8n workflow with schedule trigger connected to a Postgres query node, executed successfully

That’s a real cron job with a UI, execution history, and failure visibility — the thing you’d otherwise write as a crontab line and forget about until it silently breaks.

The two snags we actually hit

1. “self-signed certificate in certificate chain” — our first Postgres connection to Supabase’s pooler failed with this TLS error. n8n’s Postgres node verifies the full certificate chain by default, and many managed poolers (Supabase included) present chains that fail strict verification. Fix: in the Postgres credential, enable “Ignore SSL Issues” (or supply the provider’s CA cert if you want strict verification — the right call for production).

2. The publish model confuses old tutorials. n8n 2.x replaced the simple active/inactive toggle with a publish flow — you publish a named version of the workflow. Tutorials showing an “Active” toggle in the header are describing 1.x. Same concept, different button.

What it costs to run (measured)

Metric Measured value
Image size 259 MB
RAM at boot 652 MB
RAM settled (1 active workflow) 442 MB
CPU idle ~0.5% of one core
Data volume (2 workflows, SQLite) 5.7 MB
Restart to ready 3 s

RAM is the real cost: at ~450 MB settled, n8n wants a machine with headroom. It runs on a 1 GB VPS but it’s tight once workflows do real work. 2 GB is comfortable.

Gotchas

docker run --rm -v n8n-data:/data -v "$PWD":/backup alpine \
  tar czf /backup/n8n-backup-$(date +%F).tar.gz -C /data .

When NOT to self-host n8n

What we actually ran this on