buildwithdew
Tutorials·9 min read·July 1, 2026

n8n self-hosted on a $5 VPS: a 2026 step-by-step guide

TL;DR

Self hosting n8n on a $5 VPS is viable for solo builders if you accept tighter RAM, some Linux/Docker work, and ongoing maintenance. This guide walks through choosing Hetzner/DigitalOcean, setting up Docker Compose, putting Caddy in front for automatic HTTPS, adding basic firewall and backups, and then doing honest cost math versus n8n Cloud so you know when to upgrade or switch.

a single dew-strand weaving through two constrained orbs into a wider glow — diagonal flow — disciplined expansion — cover for: n8n self-hosted on a $5 VPS: a 2026 step-by-step guide

Key takeaways

  • $5 VPS with 1 GB RAM can run n8n, but treat it as a starter tier.
  • Docker Compose plus Caddy is the most upgrade-friendly 2026 stack.
  • Self-hosting trades Cloud fees for your own time, security, and backups.
  • HTTPS with Caddy is effectively zero-config once DNS is set.
  • Plan backups and basic hardening on day one; VPS uptime isn’t data safety.
  • Upgrade to 2 GB RAM or managed hosting as workflows become critical.

Self host n8n VPS workflows on a $5 server by running n8n in Docker, fronting it with Caddy for automatic HTTPS, and adding basic security, backups, and cost checks so you know when to upgrade or switch to n8n Cloud.35

How should you think about self host n8n VPS on a $5 plan in 2026?

Self hosting n8n on a $5 VPS is feasible for a single user and light workflows, but you need to be realistic about RAM limits, maintenance time, and when to move beyond the starter tier.56

n8n’s Community Edition is open‑source and free, so your main cost is infrastructure: the VPS, storage, and your time.6 A typical budget plan at Hetzner or DigitalOcean gives you 1 vCPU, 1 GB RAM and around 20–25 GB SSD for about $4–$6/month.5 That is enough to run a modest n8n stack with Docker and Caddy, but 1 GB RAM is at the low end of what current hosting guides recommend.5

HostAdvice and other 2026 reviews note that 1 GB RAM works for light workloads, while 2 GB+ is safer for complex or multi‑user setups.5 A recent DigitalOcean tutorial, for example, picks a 2 GB RAM / 1 vCPU / 50 GB SSD droplet at $12/month as a production baseline.3 VPS or cloud hosting is preferred over shared hosting because n8n needs a persistent server process and direct HTTPS access, which typical shared plans don’t support well.5

If you’re a solo builder, the trade‑off is straightforward: you save cash versus n8n Cloud, but you pay in setup and maintenance time. A 2026 cost comparison puts the realistic self‑hosting picture at $4–$5/month for the VPS, 30–60 minutes for initial Docker setup, and recurring effort for OS and n8n updates, SSL, and backups.4

Which VPS should you pick to self host n8n VPS: Hetzner or DigitalOcean?

For self hosting n8n on a VPS, choose a low‑end Hetzner CX or DigitalOcean droplet with at least 1 GB RAM, ideally 2 GB+ if you expect growth.35

For EU‑centric workloads, Hetzner Cloud CX11/CX22 offers 1 vCPU, 1 GB RAM and ~20 GB SSD for roughly $4–$5/month, aligning with budget self‑hosting recommendations.54 A 2026 walkthrough demonstrates renting a Hetzner CX22 at about $4.51/month, installing Docker, and running n8n with Docker Compose as a minimal production setup.4

For US‑friendly regions and stronger documentation, a 2026 DigitalOcean guide recommends creating an Ubuntu 22.04 droplet with 2 GB RAM, 1 vCPU, and 50 GB SSD at $12/month, then configuring SSH keys and DNS before deploying n8n via Docker and Caddy.3 Community threads echo this pattern: start at 1 GB RAM for learning, upgrade toward 2 GB when you see memory pressure or add more users.75

At provisioning time, you’ll:

  • Create the VPS (Ubuntu 22.04 or 24.04 LTS)
  • Add an SSH key, rather than using passwords
  • Note the public IP
  • Set an A record (e.g., n8n.yourdomain.com → VPS IP) so Caddy can issue certificates later37

How do you install Docker and Docker Compose for n8n on your VPS?

The most robust way to self host n8n VPS is to run n8n in Docker with Docker Compose, keeping your app, proxy, and database in isolated containers.13

Current self‑hosting guides converge on Docker‑based installs instead of bare Node.js, because upgrades become a matter of pulling new images and restarting the stack rather than chasing system‑wide dependency changes.15 On Ubuntu 22.04/24.04, you’ll typically:

  1. Update packages and install Docker Engine.
  2. Install Docker Compose plugin.
  3. Create a project directory, for example:
mkdir ~/n8n && cd ~/n8n
  1. Create docker-compose.yml and a dedicated data folder to store n8n’s persistent data and database files.7

A simple starting docker-compose.yml pattern:

version: "3.8"
services:
  n8n:
    image: n8nio/n8n:latest
    restart: always
    environment:
      - N8N_HOST=n8n.yourdomain.com
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - DB_TYPE=postgresdb
      - DB_POSTGRES_USER=n8n_user
      - DB_POSTGRES_PASSWORD=secure_password
      - DB_POSTGRES_DB=n8n
    volumes:
      - ./data:/home/node/.n8n
    ports:
      - "5678:5678"

You’ll refine this later with SMTP, user‑management, and secure secrets, but this skeleton gets you a running instance behind a reverse proxy.13

How do you set up HTTPS for self host n8n VPS using Caddy?

The simplest HTTPS setup for a self hosted n8n VPS in 2026 is to put Caddy in front of n8n; Caddy handles automatic TLS via Let’s Encrypt with minimal configuration.3

A widely‑cited 2026 DigitalOcean guide demonstrates using Caddy as the reverse proxy for n8n, taking advantage of its ability to obtain and renew certificates automatically once your domain points at the VPS.3 Unlike Nginx, which usually requires Certbot and explicit certbot --nginx -d n8n.yourdomain.com commands, Caddy’s default behaviour is essentially “zero‑config” TLS.3

You’ll add a caddy service to your docker-compose.yml:

  caddy:
    image: caddy:latest
    restart: always
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile

And a minimal Caddyfile:

n8n.yourdomain.com {
  reverse_proxy n8n:5678
}

Provided your DNS A record is in place and ports 80/443 are open, Caddy will pull and renew certificates without you touching Certbot.3

Caddy vs Nginx for n8n TLS

AspectCaddy (n8n‑docker‑caddy)Nginx + Certbot
TLS setupAutomatic, no extra CLIManual certbot steps
RenewalBuilt‑in, continuousCron or systemd timers
Config complexitySimple CaddyfileSeparate Nginx + Certbot
Good first choice?Yes for solo buildersBetter if you already use Nginx

For a $5 VPS and a single n8n instance, Caddy keeps operational overhead low without compromising on HTTPS.

What basic security should you add to a self hosted n8n VPS?

To keep a self hosted n8n VPS reasonably safe, you should lock down ports with a firewall and consider adding Fail2ban to block repeated login attempts.1

Self‑hosting guides recommend configuring UFW (Uncomplicated Firewall) to only permit SSH (22), HTTP (80), and HTTPS (443).1 Everything else should be denied by default, reducing exposure to opportunistic scans. On top of that, a 2025 n8n hardening guide suggests pairing UFW with Fail2ban, using a custom filter on the n8n access log to ban IPs after repeated failures against /rest/login.1

Beyond the firewall:

  • Use SSH keys rather than passwords.
  • Disable root SSH login or restrict it tightly.
  • Rotate your VPS provider console password and n8n owner credentials.
  • Keep Docker, n8n, and OS packages up to date during a monthly maintenance window.14

Security isn’t a one‑off task; it’s part of the ongoing cost of self‑hosting, and it should factor into your time budget.

How do backups and persistence work when you self host n8n VPS?

Self hosting n8n on a VPS means you own backup and recovery; you need a plan for both the n8n database and external storage from day one.1

Tutorials repeatedly stress that the VPS provider mainly guarantees VM uptime, not the integrity of your data.1 If a misconfiguration, provider incident, or accidental rm -rf wipes your volume, n8n won’t magically re‑create your workflows. A standard approach is to:

  • Store n8n’s persistent data and database in named volumes or a dedicated data directory.7
  • Run regular database dumps (PostgreSQL or MySQL) to off‑site storage.
  • Use provider snapshots for quick rollbacks, but don’t treat them as your only backups.1

A cautious schedule is weekly backups for hobby use and daily backups once your automations touch live customer or financial data. This is part of why self‑hosting is never just “set and forget”.1

How do you configure user management and SMTP on self hosted n8n?

Modern self hosted n8n deployments rely on environment‑based user management and SMTP settings so the instance can invite users and send password resets automatically.7

n8n’s 2026 docs describe configuring SMTP credentials with environment variables: you specify the SMTP host, port, username, and password so the instance can send email notifications and onboarding links.7 For team setups, you can bypass the in‑app owner wizard entirely by setting N8N_INSTANCE_OWNER_MANAGED_BY_ENV=true and providing the owner’s email and credentials in the Docker environment.7

This pattern fits well with Docker Compose: you keep sensitive values in an .env file, reference them from docker-compose.yml, and rotate secrets without editing the core stack file. For a solo $5 VPS, you might keep owner management simple, but it’s worth wiring SMTP early if you plan to invite collaborators later.

What does self hosting on a $5 VPS really cost vs n8n Cloud?

Self hosting n8n on a $5 VPS is cheaper than n8n Cloud in pure dollars, but the real comparison must include your hourly rate and maintenance time.459

In mid‑2026, reviews describe n8n Cloud as a convenience service: you’re paying for managed infrastructure, scaling, and support on top of the core (free) platform.56 Typical Cloud pricing starts around $22–$24/month for ~2,500 executions, with higher tiers at $58/month and per‑1,000‑execution add‑ons.26

On the self‑host side, credible guides place basic VPS costs in the $4–$10/month range for small workloads, scaling with CPU, memory, and storage as your usage grows.64 A widely shared 2026 walkthrough comparing “$600/year n8n Cloud vs VPS” argues that the real break‑even must factor in your setup and maintenance hours at your own billing rate, not just headline VPS prices.9

Cost comparison: $5 VPS vs n8n Cloud

OptionMonthly infraSoft costs (time)When it wins
$5 VPS self‑host$4–$6 VPS3–6 hours/year for ops & updates4Solo, technical, cost‑sensitive
n8n Cloud Starter$22–$24 plan26Near‑zero opsNon‑technical, uptime‑sensitive

If you’re comfortable with Docker and Linux, a $5–$12 VPS is usually more cost‑effective for personal and early‑stage business automations. If your priority is delegating responsibility and avoiding ops work, n8n Cloud’s premium can be rational.

When should you upgrade beyond a $5 VPS or switch to managed hosting?

You should upgrade your self hosted n8n VPS or consider managed hosting once memory pressure, multi‑user access, or critical workloads make 1 GB RAM and DIY ops feel fragile.356

HostAdvice notes that while 1 GB RAM is workable for light workloads, 2 GB+ is recommended once workflows grow or more users join.5 DigitalOcean’s n8n tutorials explicitly choose a 2 GB droplet for production deployments.3 If you see frequent OOM kills, delayed executions, or slow editor performance, it’s time to move up.

Managed platforms like Northflank and others position themselves in the $5–$20/month band for average n8n deployments, offering autoscaling and built‑in backup tooling while still undercutting the n8n Business Cloud tier.6 This “middle path” keeps you out of raw VPS administration while retaining control over your data and workflow architecture.

For professionals and solopreneurs, a pragmatic path looks like:

  • Learn n8n locally.
  • Self host on a $5–$12 VPS once you need webhooks and 24/7 uptime.8
  • Upgrade RAM or move to managed hosting as soon as your automations touch critical revenue or customer data.

This keeps the economics honest and the risk profile aligned with what your workflows are actually worth.

Frequently asked questions

Is a $5 VPS really enough to self host n8n?+

A $5 VPS with 1 GB RAM can run a single n8n instance with Docker and Caddy, but it’s best framed as a starter or hobby tier. Hosting guides state that 1 GB is the minimum for light workloads, while 2 GB or more is recommended for complex or multi‑user setups.[5] If you’re building revenue‑critical automations, treat 1 GB as temporary and plan to upgrade to 2 GB+ as soon as usage grows.[3]

Should I use Caddy or Nginx for HTTPS on my n8n VPS?+

Caddy is usually the simplest choice for TLS in 2026 because it handles Let’s Encrypt certificates automatically once your DNS points to the VPS.[3] You configure a small Caddyfile that reverse‑proxies to the n8n container and Caddy obtains and renews certificates with no Certbot commands.[3] Nginx gives more granular control but requires Certbot setup and renewal management, which adds operational overhead for solo builders.

How do I handle backups for a self hosted n8n VPS?+

Use Docker volumes or a `data` directory for n8n’s persistent storage, then back up the database regularly to off‑site storage.[1][7] A common pattern is daily or weekly PostgreSQL dumps plus provider snapshots, depending on how critical your workflows are.[1] Tutorials emphasise that VPS providers mainly guarantee uptime, not data safety, so you own the backup strategy end‑to‑end when you self host.

How do I set up user management and SMTP on self hosted n8n?+

For a solo instance, you configure SMTP via environment variables so n8n can send invite and password reset emails.[7] To automate owner creation, set `N8N_INSTANCE_OWNER_MANAGED_BY_ENV=true` and define the initial account in environment variables within your Docker Compose file.[7] This is useful for CI or repeatable deployments where you don’t want to click through in‑app setup every time.

Is self hosting n8n on a VPS cheaper than n8n Cloud in practice?+

In pure cash, a $5–$10 VPS is cheaper than n8n Cloud plans starting around $22–$24/month for a few thousand executions.[2][6] The honest comparison must add your setup and maintenance time, which one 2026 breakdown estimates at 30–60 minutes initially plus ongoing patching, SSL, and backups.[4][9] Self hosting wins when you’re comfortable with ops and prefer control; Cloud wins when you want to pay to avoid responsibility.

Sources

  1. N8N Self-Hosted Installation Guide 2025: Complete Setup + ...latenode.com
  2. Self Host n8n on VPS in 2026 | Smart Process AI posted on the topiclinkedin.com
  3. n8n on DigitalOcean 2026: Full Install Guide - OpenHosstopenhosst.com
  4. The Real Cost of Self-Hosting n8n in 2026 - ExpressTechexpresstech.io
  5. 10 Best n8n Hosting Providers: (Jun 2026) - HostAdvicehostadvice.com
  6. How to self-host n8n: Setup, architecture, and pricing guide (2026)northflank.com
  7. User management | Deploy - n8n Docsdocs.n8n.io
  8. An easy step-by-step guide on how to self-host n8n - n8n Communitycommunity.n8n.io
  9. Six hundred dollars a year on n8n cloud is the number that sent me ...instagram.com
  10. How to Self-Host n8n in 2026: VPS vs Managed Hosting - Agntableagntable.com
#n8n#self-hosting#vps#workflow-automation#devops

Keep reading