Self-hosting n8n in 2026: Coolify vs Dokploy vs Railway vs a bare VPS


Self-hosting n8n looks free from the outside. The licence is where “free” first gets shaky, and the control plane is where the bill lands. This guide prices four deployment routes, shows the Railway arithmetic line by line, and names what walking away from each one would take.

What self-hosting n8n actually means, licence-wise

Self-hosting n8n means running n8n’s code on hardware you control. It does not mean you own unlimited rights to that code. n8n is fair-code: the source sits under the Sustainable Use License plus the n8n Enterprise License, and any file with .ee. in its name is Enterprise-licensed, per n8n’s Sustainable Use License page. Fair-code sits between open source and proprietary: the source is available and self-hosting is allowed, but the licence restricts offering the software as a competing hosted service, as faircode.io explains.

That distinction matters before you compare a single price. You are choosing where to run software whose licence already constrains what you can do with it, not choosing between “paid n8n” and “free n8n”. The fair-code licence walkthrough covers the terms themselves, and the n8n source repository is where the licence files live.

The price ceiling you are escaping is n8n Cloud. Starter is 20 EUR/month billed annually for 2,500 workflow executions, and Pro is 50 EUR/month billed annually for 10,000 executions, according to n8n’s pricing page. Every route below is judged against those two numbers, not against zero.

The baseline route: a bare VPS and one docker command

A bare VPS plus n8n’s documented Docker command is the price floor. The install creates one volume, n8n_data, mounted at /home/node/.n8n, and starts n8n from a single docker run, per the n8n Docker installation docs. Hetzner Cloud Cost-Optimized plans start from 5.99 EUR/month excluding VAT, per Hetzner Cloud pricing.

The documented sequence is short enough to paste:

docker volume create n8n_data
docker run -it --rm \
  --name n8n \
  -p 5678:5678 \
  -e GENERIC_TIMEZONE="<YOUR_TIMEZONE>" \
  -e TZ="<YOUR_TIMEZONE>" \
  -e N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \
  -v n8n_data:/home/node/.n8n \
  n8nio/n8n

Out of the box, n8n stores credentials, past executions and workflows in SQLite. You move to PostgreSQL by setting DB_TYPE=postgresdb plus the host, port, database, user, password and schema variables listed in the n8n database configuration docs. That is the whole baseline: one server, one container, one database choice.

If Hetzner is not your provider, the same shape of cost exists elsewhere: DigitalOcean’s Basic Droplets list 512 MiB RAM / 1 vCPU / 10 GiB disk at $4.00/month, 1 GiB RAM at $6.00/month and 2 GiB at $12.00/month, per DigitalOcean Droplet pricing. Whether a given plan is big enough for your workload is not verified here, and any guide that answers it without measuring your instance is guessing.

The one thing you must not lose: your encryption keys

Even after you move to PostgreSQL with DB_TYPE=postgresdb, the /home/node/.n8n directory still holds your encryption keys, instance logs and source-control assets. n8n’s docs therefore recommend keeping the persistent volume mapped, or setting N8N_ENCRYPTION_KEY explicitly, per the Docker installation docs.

This is the load-bearing fact of the article. Your database holds workflows and execution history; your volume holds the key that makes stored credentials readable. Copy the database and forget the volume and you have a working instance full of credentials nobody can decrypt. n8n’s own scaling overview adds the rest: prune execution data, external storage for binary data, concurrency limits, and queue mode with multiple workers. None of it changes the key point: the volume stays.

Route one: Coolify on your own server

Self-hosted Coolify is “Free forever” with full access to all features and community support, per Coolify’s pricing page. The repository is Apache-2.0 licensed and has 18,708 commits, per Coolify on GitHub. You pay for the VPS underneath and nothing for the platform.

Of the three platforms compared here, this is the cleanest licence position: permissive licence, no per-server fee, and a monthly cost equal to the Hetzner figure plus whatever backup storage you choose. The trade is that you run two things instead of one, so a Coolify failure is a layer between you and your workflows.

Route two: Coolify Cloud, where you pay for the control plane

Coolify Cloud is $5/month to connect two servers plus $3/month per additional server, and you bring your own servers: Coolify runs on its managed server, your apps run on yours, per Coolify’s pricing page.

The vendor’s own comparison table is the honest way to read the price. Hosting moves from “Self-managed” to “Managed”, and the “Coolify backups” row moves from “Self-managed (but automated)” to “Managed” — so the $5 does cover backups of the Coolify installation itself. What that row does not settle is your n8n data: the table’s separate FAQ entry “Does Coolify Cloud back up my application data?” is the question that matters for your /home/node/.n8n volume, and its answer is not captured in the pages this guide reviewed.

Route three: Dokploy, and the mixed-licence catch

Dokploy Cloud Hobby is $4.50/month per server, with unlimited deployments, databases and applications, but limited to 1 server, 1 organization, 1 user, 2 environments, 1 volume backup per application, 1 backup per database and 1 scheduled job per application, per Dokploy’s pricing page. Startup starts at $15/month for up to 3 servers and unlimited users, environments, backups and scheduled jobs, with basic RBAC, 2FA and email and chat support.

The caveat sits in the repository. Dokploy ships both a LICENSE.MD and a LICENSE_PROPRIETARY.md file, so it is a mixed-licence repository rather than a single-licence one, per Dokploy on GitHub. What those two files mean for a self-hosted install is not verified here beyond the fact that both exist, so read both and the self-hosting installation docs before you commit. Dokploy offers an Enterprise tier in both a Cloud form and a Self Hosted form for on-premises or your own cloud, per the Dokploy pricing page. The Hobby limits are the other thing to price honestly: one backup per application and one per database is the kind of ceiling you notice the week after you need it.

Route four: Railway, where usage pricing is the lock-in

Railway Hobby is $5/month including $5 of monthly usage credits, after which you pay metered rates: memory at $0.00000386 per GB per second, CPU at $0.00000772 per vCPU per second, volumes at $0.00000006 per GB per second, egress at $0.05 per GB, and object storage at $0.015 per GB-month, per Railway’s pricing page. Hobby allows up to 48 vCPU and 48 GB RAM per service and 5 GB of storage.

The important property of a per-second meter is that it does not pause when you are not looking. An n8n instance kept up to receive webhooks holds memory continuously, so the credit is consumed by existing rather than by executing. Railway also bills sandboxes at VM rates of about $50 per GB-month of memory and about $50 per vCPU-month, active use only, per the same Railway pricing page — if you use code sandboxes, that line is larger than the n8n line.

The flat-rate alternative worth one paragraph: Render

Render’s “Less than 1 CPU” web service instance is a flat $7/month with 512 MB RAM, and persistent disk costs $0.25 per GB per month, per Render’s pricing page. There is no usage meter to watch, which is the exact opposite of Railway’s billing model.

That flatness is the feature: you can write the number into a budget and stop thinking about it. The limit is equally flat, and whether 512 MB of RAM and under one CPU is enough for your n8n workload is not verified here.

Where the lock-in hides, route by route

Lock-in in n8n self-hosting lives in four separate places: n8n’s own fair-code licence, the /home/node/.n8n encryption-key volume, the platform’s licence, and who owns the control plane and the backups. Each route fails a different one of those tests, and most comparisons only check the second.

Take them in order. The n8n licence applies to every route equally, so it is not a differentiator, but it is a constraint you accept once: fair-code with .ee. files locked, per n8n’s licence page. The encryption-key volume is the practical one, because it is the thing you can lose accidentally, per the Docker docs. The platform licence separates Coolify, Apache-2.0 per Coolify’s repository, from Dokploy’s mixed-licence repo per Dokploy’s repository. Control-plane ownership separates self-hosted Coolify, whose table row reads “Self-managed (but automated)” for backups per Coolify’s pricing page, from Coolify Cloud, which reads “Managed” for the same row, and from Dokploy Cloud, whose Hobby tier caps you at one backup per application per Dokploy’s pricing page.

Route Platform licence Base monthly cost Variable or usage costs Control plane Backups Key limits Exit friction
Bare VPS + Docker None beyond n8n’s fair-code terms From 5.99 EUR/month ex. VAT (Hetzner) None from a platform You Your job You manage OS, Docker, database, volume Lowest: documented Docker command
Coolify self-hosted Apache-2.0, 18,708 commits $0 platform + VPS None You “Self-managed (but automated)”, per Coolify’s table You also operate Coolify Low: data stays in your volume
Coolify Cloud Self-hosted repo is Apache-2.0; Cloud terms not stated $5/month for 2 servers $3/month per extra server Coolify hosts it; apps on your servers “Managed” (Coolify’s own backup; your n8n data not verified) 2 servers included Low on data, medium on tooling
Dokploy Cloud Hobby Mixed repo: LICENSE.MD + LICENSE_PROPRIETARY.md $4.50/month per server Same per-server rate Dokploy 1 backup per app, 1 per database 1 user, 1 org, 2 environments Self-hosted terms not verified
Dokploy Cloud Startup Mixed repo From $15/month Per-server rate beyond 3 servers: not verified Dokploy Unlimited Up to 3 servers, 3 orgs Self-hosted terms not verified
Railway Hobby Not verified $5/month incl. $5 credits Memory ~$10.01/GB-month, CPU ~$20.01/vCPU-month (own arithmetic), egress $0.05/GB, volumes $0.00000006/GB/sec, object storage $0.015/GB-month Railway Not verified 48 vCPU / 48 GB per service, 5 GB storage Export and redeploy
Render Not verified $7/month flat $0.25/GB-month disk Render Not verified 512 MB RAM, under 1 CPU Export and redeploy

What a year actually costs: the arithmetic

The worked comparison uses one always-on n8n service holding 1 GB of memory continuously and averaging 0.2 vCPU across a 30-day month of 2,592,000 seconds. Egress, volume storage and sandbox usage are excluded, VAT is excluded from Hetzner prices, and no claim is made that any specific Hetzner plan fits this workload.

Railway Hobby, using the rates on Railway’s pricing page:

  • Memory: $0.00000386 per GB-second × 2,592,000 seconds = about $10.01 per GB-month.
  • CPU: $0.00000772 per vCPU-second × 2,592,000 seconds = about $20.01 per vCPU-month.
  • Usage total: $10.01 + (0.2 × $20.01) = about $14.01/month, on the rates published at Railway’s pricing page.
  • Out of pocket: $14.01 of usage minus the $5.00 credit included in Hobby, plus the $5.00 base fee = about $14.01/month, per those same Railway’s pricing page figures.

That is this article’s own arithmetic from Railway’s published per-second rates, not a quote from Railway.

Now the flat routes. A Hetzner VPS from 5.99 EUR/month excluding VAT per Hetzner Cloud, plus Coolify self-hosted at $0 per Coolify’s pricing page, is the whole stack for the VPS price. The same server plus Dokploy Cloud Hobby at $4.50/month per Dokploy’s pricing page, or plus Coolify Cloud at $5/month per Coolify’s pricing page, gives the managed-control-plane variants.

The comparison to draw is not a currency conversion, which this article does not do. It is the shape of the number. Railway’s metered route lands around $14.01/month under these assumptions, before egress and volumes, and it moves whenever your usage does, per the rates on Railway’s pricing page. The flat VPS floor starts at 5.99 EUR/month excluding VAT per Hetzner Cloud and does not move.

The Bottom Line

There is no single best route, only a best route for a stated situation. If your priority is a flat, defensible monthly number and an easy exit, a bare VPS with the documented Docker command, optionally with Coolify self-hosted on top, is the baseline every other route has to justify itself against. If you want a hosted control plane but insist on keeping your own servers, Coolify Cloud at $5/month for two servers and Dokploy Cloud Hobby at $4.50/month per server are the two priced options, with Dokploy’s mixed-licence repository a caveat to read rather than a reason to reject it. If server administration is the thing you cannot staff, Railway Hobby and Render are the managed answers: Railway charges by the second, Render a flat $7/month.

The mistake to avoid is drifting into a managed layer without pricing it. Every managed layer here is a premium over the 5.99 EUR/month floor, worth paying only if you can name what it buys. Still deciding whether self-hosting is worth it at all? The self-hosted n8n versus Activepieces comparison and the Docker install walkthrough cover the ground this article assumes, and the cost decision guide handles metered-versus-flat.

Your exit plan, written before you deploy

Because your n8n data lives in the /home/node/.n8n volume and in whatever database you configured, the exit test for every route is the same: can you copy that volume and that database out, then run the documented Docker command somewhere else and have a working instance. The command is in the n8n Docker installation docs, and the volume contents that matter are listed there too.

Write these down before you deploy:

  1. Where the volume lives and how you copy it, including the encryption keys per the Docker docs.
  2. Which database you chose, and how you dump it, per the n8n database configuration docs.
  3. Which platform licence you accepted: Apache-2.0 for Coolify per its repository, or the mixed terms in Dokploy’s repository. This article does not characterise Dokploy’s self-hosted terms beyond their existence.
  4. Who owns backups: for Coolify Cloud the “Coolify backups” row reads “Managed” per Coolify’s pricing page, but whether that covers your n8n data is a separate question the reviewed pages do not answer.

If you want a structured version of this exercise, the platform exit audit walks through what you can actually export.

How This Guide Was Built

This guide is based on official documentation and vendor pricing pages fetched on 4 November 2026 — we did not run these platforms hands-on. Every price, licence claim and rate in this article traces to a linked page from that fetch: n8n’s licence page, n8n Cloud pricing, the n8n Docker install docs, the n8n scaling overview, Coolify’s pricing page, Coolify’s repository, Dokploy’s pricing page, Dokploy’s repository, Railway’s pricing page, Render’s pricing page, Hetzner Cloud and DigitalOcean’s Droplet pricing.

Two gaps stay open on purpose: Hetzner’s per-plan vCPU and RAM specs were not captured, so no claim is made that any plan suits this workload, and Dokploy’s self-hosted licence terms were not read beyond confirming both files exist.

FAQ

Is n8n actually open source?

No. n8n is fair-code: its source is under the Sustainable Use License plus the n8n Enterprise License, and files with .ee. in the name are Enterprise-licensed, per n8n’s licence page. You can self-host it, but the licence restricts offering it as a competing hosted service, as faircode.io explains.

Can I self-host n8n without losing my credentials?

Only if you keep the /home/node/.n8n volume. Even with PostgreSQL configured via DB_TYPE=postgresdb, that directory still holds encryption keys, instance logs and source-control assets, so n8n’s Docker docs recommend keeping the volume mapped or setting N8N_ENCRYPTION_KEY.

Is Railway cheaper than a VPS for n8n?

Under this article’s stated assumptions, no. Holding 1 GB of memory and averaging 0.2 vCPU comes to about $14.01/month in total on Railway — usage minus the $5 credit, plus the $5 base fee — per Railway’s rates, against a Hetzner floor of 5.99 EUR/month excluding VAT per Hetzner Cloud. The currencies are not converted here.

Does Coolify Cloud manage my n8n backups?

Not verified. Coolify’s comparison table moves the “Coolify backups” row from “Self-managed (but automated)” to “Managed” for Cloud on Coolify’s pricing page, but that covers the Coolify installation. Whether n8n application data is backed up is the table’s separate FAQ question, and its answer was not captured in the pages this guide reviewed.

What licence does Dokploy use?

Dokploy’s repository contains both a LICENSE.MD and a LICENSE_PROPRIETARY.md file, making it a mixed-licence repository per Dokploy on GitHub. What those terms mean for a self-hosted install is not verified here beyond the existence of both files, so read them before committing.

  • ToolBrain — tool reviews, LLM comparisons, and AI workflow guides

Cross-links automatically generated from NoCode Insider.