n8n Workflows11 min readJune 23, 2026

How to Self-Host n8n on a $5 VPS (Production-Ready)

A practical, security-conscious walkthrough for running n8n in production on a cheap VPS — Docker, HTTPS, backups and the gotchas nobody documents.

Who this is for: Technical operators and consultants who want unlimited executions and full data control without paying per-task fees.

Opsacea editorial
Updated June 23, 2026
n8n Workflows — How to Self-Host n8n on a $5 VPS (Production-Ready)

Self-hosted n8n on a $5–$10 VPS handles tens of thousands of executions a month for most service businesses. The free tier of cloud automation platforms can't compete on price — but only if you set it up right. Here's the production checklist.

What you need

  • A VPS with 1–2 GB RAM (Hetzner, DigitalOcean, OVH all work).
  • A domain name and an A record pointing to the VPS.
  • Docker + Docker Compose installed.
  • A managed Postgres or a second container for the database (don't use SQLite in production).

The minimal docker-compose architecture

Run three containers: n8n, Postgres, and Caddy (or Traefik) as a reverse proxy with automatic HTTPS via Let's Encrypt. Mount a volume for /home/node/.n8n so credentials and workflows survive restarts. Set N8N_ENCRYPTION_KEY explicitly — if it changes, all stored credentials become unreadable.

Get the strategy — Opsacea Playbook
The 200+ page operator's guide. Frameworks, prompts and reference workflows — $12.99, lifetime updates.
Get The Playbook

Production gotchas

  • Set EXECUTIONS_DATA_PRUNE=true or your DB will balloon in weeks.
  • Enable WEBHOOK_URL with your full HTTPS domain or webhook nodes will hand out localhost URLs.
  • Configure timezone (GENERIC_TIMEZONE) before scheduling cron triggers.
  • Move execution mode to 'queue' with Redis once you cross ~5 concurrent runs.
  • Back up the Postgres volume daily and the .n8n folder weekly to S3 or Backblaze.

Security baseline

  • Enable basic auth (N8N_BASIC_AUTH_ACTIVE) or, better, n8n's built-in user management.
  • Put the instance behind Cloudflare or a firewall — only expose 80/443.
  • Use a dedicated low-privilege OS user; never run Docker as root.
  • Rotate the encryption key only with a planned credential re-entry window.

Next step

Once your instance is up, the Opsacea Toolkit ships importable JSON workflows for the most common service-business patterns — intake, triage, drafting and support — that you can drop in and adapt in an afternoon.

Ship faster — Opsacea Toolkit
50 prompts, 20 n8n workflows, SOPs and templates. The implementation pack for $29.
Get The Toolkit

Start Automating Today

Get the tools, workflows and systems used by modern businesses.