n8n Self-Hosted Automation Stack
Escape Zapier pricing — self-host n8n with Postgres, Caddy, and automatic SSL in one compose file.
Stop Paying Per Workflow
Zapier and Make costs spiral fast once you start automating seriously. n8n self-hosted is the escape hatch — same visual workflow builder, full code mode when you need it, and zero per-execution fees. Getting it production-ready (persistent storage, SSL, webhook routing, backups) is the part that takes an afternoon. This stack skips that afternoon.
What Is Included
- docker-compose.yml — n8n + Postgres + Caddy in one file, production-ready out of the box
- Caddy reverse proxy — automatic SSL, handles webhook URLs correctly, no NGINX config to write
- Postgres persistence — all workflows, credentials, and execution history survive container restarts
- backup.sh — daily Postgres dump to a local volume, ready to plug into any offsite sync
- .env.example — every tunable in one place: domain, timezone, basic auth, encryption key, Postgres creds
- README.md — setup guide, DNS configuration, webhook URL notes, and upgrade path
How It Works
Point a domain at your server, fill in the .env file, and run docker compose up -d. Caddy handles SSL automatically. n8n is available at your domain within 60 seconds. Webhooks work immediately — no tunneling required.
What You Get Immediately
- n8n on HTTPS with a real SSL cert at your domain
- Postgres-backed storage — no SQLite file corruption on container restart
- Webhook endpoint that actually works from the internet
- Daily backup script and restore instructions
- Basic auth pre-configured to keep your instance private
Requirements
A Linux server (VPS or bare metal) with Docker and Docker Compose installed. A domain name pointing at the server. Port 80 and 443 open for Caddy to handle SSL. 1 GB RAM minimum, 2 GB recommended.