Tutorial Research

How to Self-Host n8n in 2026 (VPS Setup, Costs, Pitfalls)

Self-host n8n on a VPS: which server size to pick, the setup steps with Docker, real monthly costs, license limits and the mistakes that break workflows.

To self-host n8n, you rent a small Linux server (a VPS), run n8n in Docker, point a subdomain at it with HTTPS, and keep it backed up and updated. The software is free under n8n's Community edition. Your real cost is the server: roughly $6 to $15 a month for a setup that handles a freelancer's or small team's workflows, with no limit on how many workflows or executions you run.

The fastest route is a VPS that ships with n8n already installed, such as Hostinger's n8n template. The more flexible route is a plain Ubuntu server where you set up Docker Compose yourself. Both are covered below, along with the license rules and the pitfalls that cost people their data.

A quick note on how I wrote this. I'm Anna, a web designer and developer. I haven't run n8n myself, so this is a research piece based on n8n's official docs and pricing page, Hostinger's VPS pages and independent tests. Figures are as of November 2026. Some links here are affiliate links.

Do you actually need to self-host?

Self-hosting makes sense when one of these is true:

  • You run a lot of executions. n8n Cloud charges by monthly executions (2,500 on Starter, 10,000 on Pro). A self-hosted Community instance has no such cap. Your server is the only limit.
  • You want your data on your own server. Client data, API keys and logs stay on a machine you control.
  • You want long-running workflows. Cloud Starter stops a single run after 5 minutes. On your own server, you set the timeout.

It doesn't make sense if you have never used a terminal and don't want to learn. Then n8n Cloud is the calmer choice. We compare both in detail in n8n Cloud vs self-hosted: real costs compared.

What server size to pick

n8n itself is light. What eats RAM is the data your workflows move around: big JSON payloads, files, AI agent memory. Here are Hostinger's n8n VPS plans as a reference point.

PlanIntro priceYou pay todayRenews atvCPURAMNVMe
KVM 1$6.49/mo$155.76 for 24 months$11.99/mo14 GB50 GB
KVM 2$8.79/mo$210.96 for 24 months$14.99/mo28 GB100 GB
KVM 4$12.99/mo$311.76 for 24 months$28.99/mo416 GB200 GB
KVM 8$25.99/mo$623.76 for 24 months$49.99/mo832 GB400 GB

Prices from hostinger.com/self-hosted-n8n, November 2026, during their Black Friday sale. Check the checkout before you pay.

A sensible rule of thumb:

  • KVM 1 (4 GB RAM): a personal setup, a few dozen workflows, light webhooks and scheduled jobs.
  • KVM 2 (8 GB RAM): a freelancer running client automations, AI agents, or n8n plus Postgres and a couple of other containers on one box. This is the plan most people should start with.
  • KVM 4 and up: heavy file processing, many parallel webhooks, or queue mode with several workers.

You can upgrade a VPS later without reinstalling, so starting small is fine.

Option 1: a VPS with n8n preinstalled

Hostinger offers an "Ubuntu 24.04 with n8n" template. You pick it while setting up the VPS, and n8n is installed in Docker for you. The same page lists a queue mode template and a starter pack of ready-made workflows, though it's not fully clear from the sales page which of those cost extra.

The steps look like this:

  1. Buy the VPS and choose the n8n template during setup. Pick a data center close to you or to the services you call.
  2. Set the root password or, better, add an SSH key.
  3. Open n8n from the VPS panel and create the owner account.
  4. Connect your own domain. Add an A record such as n8n.yourdomain.com pointing to the VPS IP. Webhooks from Stripe, Telegram or a form tool need a stable HTTPS address, so don't skip this.
  5. Turn on automatic backups or snapshots in the VPS panel.

This route takes minutes and suits people who want n8n running today. The trade-off: you still own the server. Updates and backups are your job.

Option 2: Docker Compose on a plain Ubuntu server

This is the route n8n's docs recommend for production. It works on any VPS provider.

  1. Create an Ubuntu server and log in over SSH.
  2. Install Docker and Docker Compose. n8n's docs also list a one-line install script that needs Docker; Compose gives you more control.
  3. Create a project folder with a docker-compose.yml and an .env file. A typical stack has three services: n8n, Postgres and a reverse proxy (Traefik or Caddy) that gets free SSL certificates from Let's Encrypt.
  4. Set the key variables in .env:
  5. your domain and WEBHOOK_URL, so webhook links show the real address instead of localhost;
  6. N8N_ENCRYPTION_KEY, a long random string that encrypts your saved credentials;
  7. your timezone, so scheduled workflows fire at the right hour;
  8. Postgres user, password and database name.
  9. Point DNS for your subdomain to the server IP.
  10. Start the stack with docker compose up -d and open your subdomain.
  11. Close everything else. Only ports 80, 443 and SSH should be open in the firewall.

n8n's docs also have step-by-step server guides for DigitalOcean, Hetzner, AWS, Azure and Google Cloud if you prefer one of those.

SQLite or Postgres? n8n uses SQLite by default, which is a single file and fine for a personal instance. For anything with real traffic, or if you plan to use queue mode later, start with Postgres. Migrating later is more work than starting right.

What the free Community edition includes

Running n8n without a license key gives you the Community edition. You get the full workflow editor, all integrations, AI nodes, unlimited workflows and executions, logging and queue mode.

According to n8n's docs, these features are not included: projects, sharing workflows and credentials with other users, SSO (SAML, LDAP), environments, Git version control, external secrets, log streaming, custom variables, external storage for binary data and multi-main mode. A few extras (folders, debug in editor, custom execution data) unlock for free when you register your email.

For a solo builder this is rarely a problem. For a team of five that needs shared credentials and SSO, it is, and that's when the paid Business license comes in. n8n lists it at €667/mo billed annually, with a 50% discount for companies under 20 people.

The license: what you're allowed to do

n8n is "fair-code" under the Sustainable Use License. In plain terms:

  • Allowed: using n8n for your own business, including workflows whose results your customers see (a form that sends a welcome email, a CRM sync).
  • Allowed, per n8n's license FAQ: a consultant building and maintaining workflows for a client, as long as the client doesn't build or edit workflows in your instance.
  • Not allowed: selling access to n8n itself, hosting n8n so clients can build their own workflows, or white-labeling it inside your product. That needs an Embed or Enterprise license.

If your setup sits in a grey area, for example hosting many clients' credentials in one instance, read the FAQ and ask n8n. Their support has said that case may need an Enterprise license.

Pitfalls that break self-hosted n8n

  • Losing the encryption key. Every saved credential is encrypted with N8N_ENCRYPTION_KEY. If you rebuild the server without it, all credentials become unreadable. Store it in a password manager.
  • No backups. Back up the Postgres database (or the SQLite file) and the n8n data folder. VPS snapshots are good; an off-server copy is better.
  • Webhook URLs pointing at localhost. If WEBHOOK_URL isn't set, n8n shows internal addresses and outside services can't reach you.
  • Updating blindly. n8n ships updates often, and some versions change node behaviour. Read the release notes, take a snapshot, then pull the new image.
  • The execution log filling the disk. Every run is stored by default. Turn on execution data pruning so old runs are deleted after a set number of days.
  • An open editor. Your n8n login page is on the public internet. Use a strong password, turn on two-factor login, and keep the server patched.
  • Running out of RAM. Workflows that load large files or long AI conversations into memory crash small servers. Process files in batches or move to a bigger plan.

What it costs per month

ItemTypical cost
VPS (KVM 2 class)$8.79/mo intro, $14.99/mo after renewal
Domain~$10–15/year, or a subdomain of one you own
n8n Community licenseFree
Your time1–2 hours to set up, ~30 min a month for updates and checks

Compare that with n8n Cloud Pro at €50/mo billed annually for 10,000 executions. The server wins on price once you pass a few thousand executions a month. Cloud wins if your time is worth more than the difference.

If you also host websites, keep them on separate hosting. A busy n8n instance and a client's landing page shouldn't fight for the same RAM. Our hosting and domains guide covers the website side, and the Hostinger review explains where VPS fits next to shared and cloud plans.

Which route to pick

  • You want n8n running tonight: a VPS with the n8n template, KVM 2.
  • You're comfortable in a terminal and want full control: a plain Ubuntu VPS with Docker Compose, Postgres and Caddy or Traefik.
  • You never want to think about servers: n8n Cloud.
  • Your team needs SSO and shared credentials: self-host with a Business license, or Enterprise.