buildwithdew
Automation·7 min read·June 14, 2026

Self-host n8n on a 6-dollar VPS: the complete setup walkthrough

TL;DR

A 6-dollar VPS is enough for a small self-hosted n8n setup if you use Docker Compose, keep the workload modest, and treat DNS, HTTPS, backups, and persistence as part of the baseline. This walkthrough covers the practical stack: server, subdomain, `.env`, volumes, PostgreSQL, reverse proxy, and the update routine. It is aimed at solo operators who want control without overbuilding.

Converging masses threaded by upward bloom — layered organic strata orbiting a central axis — calm, focused mastery. — cover for: Self-host n8n on a 6-dollar VPS: the complete setup walkthrough

Key takeaways

  • A $6 VPS can handle a small n8n stack if you keep the workload modest.
  • Docker Compose is the safest default for VPS self-hosting.
  • DNS, HTTPS, and persistent volumes are part of the real setup, not extras.
  • Back up the database and mounted files before you rely on the instance.
  • Update with `docker compose pull`, then recreate the stack cleanly.

Self-host n8n vps is a practical setup for a small automation stack if you want control over data, DNS, HTTPS, and update timing without paying for a larger platform. n8n’s own docs say a single Linux server with Docker Compose is the standard path for cloud-provider deployments, and that this is aimed at expert users rather than beginners.12

What does a 6-dollar VPS actually buy you?

A 6-dollar VPS is enough for a small self-hosted n8n instance when the workload is modest and the stack stays simple. n8n’s Docker Compose guide is built around a single Linux server with separate containers for n8n, database, and reverse proxy, which is the right shape for a lightweight production setup.1

For this tutorial, think in terms of a solo operator or small team running a handful of workflows, not a queue-heavy automation engine. If you expect many parallel executions, large files, or heavy community-node use, the same docs point you toward the broader hosting guides for scaling beyond a starter VPS.3

What is the minimum safe stack?

The minimum safe stack is n8n + PostgreSQL + reverse proxy + persistent storage. The official cloud-provider walkthrough explicitly uses Docker Compose to orchestrate those moving parts, sets a DNS A record for a subdomain, and then terminates HTTPS through a proxy such as Traefik, Caddy, or Nginx with Let’s Encrypt.1

That matters because the cheapest mistake is treating n8n like a throwaway container. The docs warn that self-hosting requires server, container, security, and resource-management skills, and that mistakes can cause data loss, security problems, and downtime.2

How do you set up self host n8n vps step by step?

The standard setup is: provision a Linux VPS, point a subdomain at it, install Docker and Docker Compose, create the n8n project files, start the stack, and confirm HTTPS access on your subdomain.12

The official docs also make the workflow unusually explicit: create the project directory, add a .env file, define local-files, and keep critical settings in environment variables so the container can be recreated cleanly later.1

1) Provision the server and DNS first

Start with a basic Linux VPS from a provider such as Hetzner or DigitalOcean, then create a DNS A record for a subdomain like n8n.example.com pointing to the server IP.1

That DNS step is not optional window dressing. n8n’s Compose guide assumes the subdomain is in place before the reverse proxy and TLS flow are brought up, because HTTPS certificates need a stable hostname to terminate correctly.1

2) Install Docker and Docker Compose

Use Docker and Docker Compose rather than a bare-metal install. n8n explicitly recommends Docker for most self-hosting needs because it creates a clean isolated environment and makes updates and rollbacks easier.2

That recommendation is practical, not decorative. The same docs show the Compose-based update flow as a simple pull-down-recreate cycle, which is much easier to reason about than hand-updating packages across the machine.2

3) Create the project files

Inside your server project directory, create the files n8n expects: .env, compose.yaml, and a local-files directory for host-accessible files.1

The docs are direct about the reason: persistent volumes and host-mounted paths protect workflows, configuration, and execution data when containers are recreated or images change.12

4) Configure the environment file

Put your domain, subdomain, database credentials, encryption key, and host settings into .env instead of hardcoding them into the compose file.1

That setup usually includes values such as DOMAIN_NAME, SUBDOMAIN, N8N_HOST, and database secrets, which n8n then mounts into the container to control URLs, security, and persistence.1

5) Bring up the stack

Run the Compose stack after the DNS record has propagated and the files are in place.1

At that point, the reverse proxy should handle TLS and you should be able to reach the instance at https://n8n.example.com once certificates are issued.1

What should the Compose setup look like?

The Compose setup should separate concerns: one container for n8n, one for PostgreSQL, and one for the reverse proxy, with shared volumes and a common network where needed.1

That is the key advantage of Docker Compose on a cheap VPS: it keeps the entire deployment readable in one file while still preserving the isolation you want for production-ish use.12

Setup choiceWhy it mattersBest for
Docker ComposeSimple updates, rollback, isolated servicesMost small self-hosted n8n VPS setups
Bare-metal installMore manual dependency handlingRare, expert-only environments
Single docker runFast to start, weak on long-term maintainabilityShort tests, not production
Managed platformLess maintenance, higher recurring costTeams that want less ops work

Why use PostgreSQL instead of just files?

Use PostgreSQL because production self-hosting needs a database that survives container recreation and handles growth more predictably than ad hoc local state.12

The official docs’ emphasis on volumes and mounts is the real signal here: if the stack is recreated, the data should still exist outside the container boundary.1

Why does HTTPS matter on day one?

HTTPS is part of the normal deployment path, not a nice-to-have later step.1

n8n’s guide explicitly expects the instance to be reached through the subdomain you defined in .env, and the reverse proxy handles certificate termination so the public URL is secure from the start.1

How much does self hosting n8n cost each month?

A small self-hosted n8n VPS usually lands near $6 to $7 per month for the server itself, with the precise number depending on the provider and plan.1

Hostinger’s current self-hosted n8n page lists a KVM 1 VPS at $6.49/month, which is a useful real-world benchmark for the low end of the market.6

A simple cost breakdown

Here is a practical way to think about the bill:

  • VPS: about $6 to $7/month for a starter plan6
  • Domain: typically annual, not monthly, but required for HTTPS and a clean subdomain setup1
  • Backups: either provider snapshots or your own off-server backup target
  • Time: initial setup, then update and monitoring time each month

That last line matters more than the VPS price. n8n’s docs are clear that self-hosting is for people who can manage servers, containers, security, and updates without relying on the platform to do the operational work for them.2

How do you keep it reliable after launch?

Reliability comes from persistence, backups, and a disciplined update routine, not from the cheapest host alone.12

The docs show persistent volumes and a host-side local-files directory so that workflows and execution data survive container changes, and they describe a simple update process that pulls the new image before recreating the stack.12

What backup routine is sane on a small VPS?

A sane backup routine is to back up the database, the n8n config files, and any mounted file directories to a separate location on a schedule.

That is the operational implication of n8n’s persistence guidance: if the data only lives inside the container, an update or failure becomes a recovery exercise instead of a restart.12

How do updates work in practice?

The official update flow is straightforward: docker compose pull, then docker compose down, then docker compose up -d.2

That sequence matters because it keeps the same environment variables and volumes in place while replacing the container image, which is the main reason Docker Compose is the recommended path for self-hosting.2

When is a 6-dollar VPS the wrong choice?

A 6-dollar VPS is the wrong choice when you need high concurrency, lots of execution history, large file handling, or a setup that non-technical users must operate alone.

n8n’s own wording is the strongest warning here: self-hosting requires technical knowledge, and mistakes can create data loss, security issues, and downtime.2

What should you upgrade first?

If the instance starts feeling tight, upgrade in this order:

  • Storage if executions or file workflows are growing
  • RAM if workflows start stalling or the database feels sluggish
  • Managed database if you want easier reliability and less local maintenance
  • More CPU only when actual load demands it

That matches n8n’s modular hosting docs, which exist specifically to help users move from a basic cloud-provider setup into more advanced hosting patterns when needed.3

What’s the cleanest final architecture for most solopreneurs?

The cleanest architecture is a single Linux VPS with Docker Compose, PostgreSQL, a reverse proxy, HTTPS, persistent volumes, and an off-server backup routine.12

That setup is boring in the best way. It is small enough to understand in one sitting, but structured enough to survive updates, certificate renewals, and the occasional workflow mistake without turning into a full-time infrastructure hobby.12

Frequently asked questions

Is a 6-dollar VPS enough for n8n?+

For a small, low-traffic setup, yes. n8n’s docs describe self-hosting on a single Linux server with Docker Compose, and they note that the cloud-provider path is suitable for modest requirements. If you expect heavier usage, more storage, or lots of parallel runs, move up to a larger VPS or a more managed architecture.

Why use Docker Compose instead of a bare-metal install?+

Docker Compose is n8n’s recommended default for most self-hosting needs because it gives you isolated services, clearer updates, and easier rollbacks. It also matches the official deployment flow, which assumes a multi-container stack rather than a single all-in-one container.

Do I need a domain and HTTPS to self-host n8n?+

No. The official deployment flow assumes a DNS A record pointing to a subdomain such as n8n.example.com, and HTTPS is normally terminated by a reverse proxy like Traefik, Caddy, or Nginx with Let’s Encrypt. That is part of the standard setup, not an optional extra.

How do I avoid losing workflows when I update?+

Use persistent volumes and host-mounted directories. n8n’s docs specifically show a local-files directory and volume-backed storage so workflows, files, and execution data survive container recreation or image updates. Without that, a restart can become a data-loss event.

How do I update a self-hosted n8n instance?+

The official update flow is `docker compose pull`, then `docker compose down`, then `docker compose up -d`. That keeps your environment variables and volumes in place while replacing the running image with the latest version.

Sources

  1. Use Docker Compose | Deploy - n8n Docsdocs.n8n.io
  2. Install with Docker | Deploy - n8n Docsdocs.n8n.io
  3. Host n8n | Deploydocs.n8n.io
  4. Self-hosted n8n | Secure and scalable automation - Hostingerhostinger.com
#automation#n8n#self-hosting#docker-compose#vps

Keep reading