Guide
n8n hosting: run n8n properly on a VPS, or sell the servers it runs on
Installing n8n takes ten minutes. Keeping it fast, backed up and safe for years is the real job. Learn how to host n8n on a VPS the way production deserves, and how a hosting business can sell servers sized for it, inside the rules of n8n's license.
- 22 min read
- 8 chapters
- Updated October 2026
Every n8n tutorial ends at the same moment: the editor opens in your browser and you feel like a wizard.
Then real life starts. A webhook fails at 3 a.m. The disk fills with old executions. And the encryption key you never wrote down turns out to guard every credential you own.
Good n8n hosting is what happens after the install. This guide is for two readers. If you run n8n for yourself or your team, you will size, set up, scale, back up and lock down your server. If you run a hosting business, you will learn what n8n's license allows and how to sell n8n VPS plans under your own name. For agents, MCP servers and Ollama on the same kind of server, read the AI agent hosting guide.
Here's what you'll learn
- Where n8n should live: Cloud, a laptop or your own VPS
- How much RAM, CPU and disk an n8n VPS needs, and what eats it
- The production setup: Docker Compose, Postgres, HTTPS and the encryption key
- When queue mode helps, and when a single setting is enough
- Backups that restore, updates you can undo, and a lock-down checklist
- What n8n's license means for a hosting business, and how to sell n8n-ready plans
Chapter 1 of 8
Why self-host n8n on a VPS
Your workflows, your data, your server. Here is what that buys you, and what it costs in attention.
Say you run a three-person agency in Porto. Your n8n flows sync leads into a CRM, chase late invoices and post a sales summary every Monday.
One day you count what those flows cost on a per-run plan. Next day, you rent a server. That is the story behind most "self host n8n" searches.
What you get when you own the server
- Your data stays where you put it, on a machine in a country you chose.
- A flat monthly bill, whether your flows run a hundred times or a hundred thousand.
- Reach into private systems: an internal database is a network rule away.
- Your pace: you decide when to update and which version to pin.
The community edition runs without a license key, as n8n's hosting docs note. Paid Business and Enterprise keys unlock extra features on the same install.
What you take on
Self-hosting hands you four jobs that n8n Cloud does for its customers: updates, backups, security and capacity. Self-hosting n8n is not a cheaper plan. It is a different job, paid in attention. Each job is small once set up, and chapters 3 to 6 set them up.
n8n Cloud, a VPS or a laptop
| Home | Who runs it | Where data lives | Public webhooks | Best for |
|---|---|---|---|---|
| n8n CloudHosted by n8n | n8n | n8n's infrastructure | Ready on day one | People who never want to see a server |
| Your own VPSSelf-hosted | You | A country and provider you chose | Yes, once you add a domain and HTTPS | People who want control and a flat monthly bill |
| Laptop or home boxSelf-hosted | You | Your desk | Only through a tunnel | Learning and testing |
A laptop is a fine classroom and a poor office. Webhooks need an address that answers at night.
n8n belongs to a bigger family of always-on workloads, covered in the AI agent hosting guide.
Key takeaway
A VPS gives n8n an address that answers at night.
Chapter 2 of 8
n8n VPS sizing: how much RAM, CPU and disk
Pick a server that fits your workflows today and still fits them next spring.
Ask a forum how much RAM n8n needs and you will hear 1 GB, 2 GB and 8 GB in the same thread. Everyone is right about their own workflows.
Here's the deal: n8n itself is light. Your data is not.
How much RAM does n8n need?
There is one official anchor. n8n's Docker Compose guide asks for at least 4 GB of RAM and 2 vCPUs for its full stack. That stack includes a sandbox for the optional n8n Assistant, which runs Docker inside Docker and needs extra headroom.
A lean single-user setup without that sandbox can start smaller. A busy team with big payloads can need far more. The difference comes from six things the n8n memory guide names.
- Big JSONLarge payloadsEvery item a node fetches sits in memory while the run lasts.
- FilesBinary dataPDFs, images and exports stay in RAM unless you switch to filesystem mode.
- CodeThe Code nodeThe docs single it out as one of the heavy ones.
- TestingManual runsn8n keeps an extra copy of the data for the editor.
- OverlapParallel runsTen workflows firing at once need ten working sets.
- LengthLong workflowsMore nodes, more data held from step to step.
Notice what is missing: the number of workflows. Fifty flows that each move a few rows use less memory than one flow that pulls a 40 MB spreadsheet. So size for your heaviest run, and watch docker stats during a busy hour.
When memory runs out
The docs list the signs: "Connection Lost", a 503 page, or "JavaScript heap out of memory" in the logs. First make runs smaller with batches and sub-workflows. Then, if that is not enough, rent more memory.
One switch helps anyone who moves files. Binary data lives in memory by default; N8N_DEFAULT_BINARY_DATA_MODE=filesystem moves it to disk, as the binary data docs explain.
CPU and disk
Most workflows spend their lives waiting on other people's APIs, so RAM usually runs out before the processor does.
Disk grows quietly. n8n prunes executions by default once they are 14 days old or the count passes 10,000. On SQLite, pruned space is reused but not returned to the disk until a VACUUM runs.
Speed? The performance page reports up to 220 executions per second on one instance, for a simple webhook flow. A ceiling, not a promise.
Three example n8n VPS sizes
| Example plan | Good for | Database | Mode |
|---|---|---|---|
| Flow Solo2 GB, 1 vCPU, 30 GB disk | One person, a few dozen light workflows | SQLite, the built-in default | Regular mode |
| Flow Team4 GB, 2 vCPU, 50 GB disk | A small team with flows running day and night | PostgreSQL in its own container | Regular mode with a concurrency limit |
| Flow Scale8 GB, 4 vCPU, 100 GB disk | Heavy or bursty workloads, many webhooks | PostgreSQL plus Redis | Queue mode on one server |
Flow Solo sits below the 4 GB full-stack minimum, so leave the optional n8n Assistant sandbox off there. Flow Team meets n8n's own minimum; Postgres needs headroom on top, or leave the sandbox off. Flow Scale has room for queue mode on one server: the main process, two workers with a task runner sidecar each, Redis and Postgres.
Key takeaway
n8n is light and your data is heavy, so size RAM for the biggest run and let pruning keep the disk in check.
NextBuild the production setup
Chapter 3 of 8
The production setup: Docker Compose, Postgres and HTTPS
Five decisions that separate a demo from an n8n server you can trust.
The difference between a demo and a production n8n server is not the install command. It is five decisions you make in the first hour.
Decision 1: Docker Compose, not npm
n8n's hosting docs point production installs with databases and extra services to Docker Compose. The npm install is deprecated from n8n 3.0.
The fastest path is n8n's one-line setup, curl -fsSL https://get.n8n.io | sh. It checks Docker, writes a compose.yml and an .env with unique secrets, and upgrades n8n later too.
One catch: run as is, it starts right away on SQLite, together with a sandbox for the optional n8n Assistant that runs as a privileged Docker-in-Docker container.
For a production server, add --no-start to the end of the command. It writes the files without starting anything. Then edit compose.yml before the first start: add Postgres, set N8N_ENCRYPTION_KEY, publish n8n as 127.0.0.1:5678:5678, and drop the sandbox on plans under 4 GB. Prefer a full walkthrough? Follow n8n's Docker Compose guide instead.
Decision 2: SQLite or PostgreSQL
Out of the box, n8n keeps everything in SQLite, one file at ~/.n8n/database.sqlite. Perfect for trying things out.
For production, the Compose guide is direct: past a handful of users, or with workflows running around the clock, use Postgres. The database page lists PostgreSQL 17 and 18 as supported, plus 16 for compatibility, as of July 2026.
Choose early, because moving later means a fresh database plus an export and import. And with the Postgres 18 image, keep the PGDATA line from n8n's example, or the data lands outside your volume.
Decision 3: a reverse proxy with HTTPS
n8n listens on port 5678 in plain HTTP. Put Traefik, Caddy or nginx in front; n8n's SSL page recommends a proxy, which also renews certificates. Then tell n8n where it lives, as the reverse proxy docs ask:
N8N_WEBHOOK_URLset to your public address, so webhook links point to the right place. It replaces the olderWEBHOOK_URL.N8N_PROXY_HOPS=1, so n8n trusts the one proxy in front of it.- The
X-Forwarded-For,X-Forwarded-HostandX-Forwarded-Protoheaders, set on the last proxy.
Decision 4: own your encryption key
n8n encrypts every saved credential with a key it generates on first start and keeps in the .n8n folder. Lose the key and your credentials are unreadable, even with a perfect database backup.
So set N8N_ENCRYPTION_KEY yourself before the first start, as the encryption key docs describe, and keep a copy in your password manager. Changing it later locks you out of every credential saved under the old key. The encryption key is the one file you cannot rebuild. Treat it like the deed to the house.
Decision 5: pin the version and run task runners properly
Never let "latest" pick your version on a restart. Pin a version number in .env and change it on purpose.
Code nodes run inside task runners. For production, n8n's task runner docs recommend external mode, a separate sidecar container, and note that internal mode is deprecated from 3.0.
Public
- Reverse proxy on 443
- Certificates renew themselves
- The only open door
n8n
- Editor and webhooks on 5678
- Version pinned in .env
- Your own encryption key
Private
- PostgreSQL in its own container
- Task runner sidecar
- Never exposed
Watch outUpgrading Postgres is not a tag change
Jumping a Postgres major version, say from 16 to 18, cannot reuse the old data folder. Dump it first, then follow the PostgreSQL upgrade guide.
Key takeaway
Five first-hour decisions turn an install into a server.
Chapter 4 of 8
n8n queue mode: when one process is not enough
Know when to add workers, and when a single setting does the job instead.
Queue mode is the most talked-about n8n setting and the most misused. People switch it on to feel ready for scale, then spend weekends nursing Redis for forty runs a day.
Where regular mode strains, and the one-line fix
In regular mode one n8n process does everything: editor, timers, webhooks and every execution. The concurrency docs name the weak spot: by default there is no limit on production runs at once, so a burst of webhooks can crowd the process until the editor stops responding.
Set N8N_CONCURRENCY_PRODUCTION_LIMIT, for example to 20, and runs above the limit wait in line. For many small teams, that one line is the whole fix.
How n8n queue mode works
Queue mode splits the job. The queue mode docs describe the flow:
- The main process receives the triggerA timer fires or a webhook arrives. Main creates an execution but does not run it.
- Redis holds the queueMain passes the execution ID to Redis, the message broker.
- A free worker picks it upIt reads the workflow from the database and runs it.
- Results go to the databaseThe worker writes the outcome and tells Redis it is done.
- Main hears backRedis notifies the main process, and the editor shows the result.
| Aspect | Regular mode | Queue mode |
|---|---|---|
| Processes | One n8n process does everything | A main process plus one or more workers |
| Database | SQLite works; Postgres preferred | Postgres; SQLite is not supported |
| Extra services | None | Redis, as the message broker |
| Files in workflows | Filesystem mode is fine | Database or S3 storage, not filesystem |
| Encryption key | One instance holds it | Every worker needs the same key |
| How it grows | A bigger server | More workers, then more servers |
When queue mode is worth it
- The line keeps growing. With a concurrency limit set, runs still wait longer than your business can accept.
- Heavy jobs block light ones. A nightly import should not delay a customer's webhook.
- You need more than one server. Workers can run on other machines, as long as they reach Redis and the database.
Three details catch people out. Every worker needs the same N8N_ENCRYPTION_KEY as the main process. With task runners in external mode, every worker needs its own runner sidecar. And webhook replies travel through the queue, which adds a little latency.
Pro tipLearn it on one box
Queue mode runs fine on a single larger VPS: main, two workers with their runner sidecars, Redis and Postgres side by side. Spread to more servers only when that box is full.
Key takeaway
Try a concurrency limit before you try queue mode.
NextSet up backups and updates
Chapter 5 of 8
Backups and updates that let you sleep
A backup only counts if it restores. An update only counts if you can undo it.
Everyone has backups. Fewer people have restores. The gap between the two is where weekends go to die.
What a complete n8n backup includes
n8n's backup guide is clear that a full backup is more than an export. Here is the list, in plain words.
- The .n8n folderIt holds the encryption key and, on SQLite, the whole database. Stop n8n before you copy it.
- A Postgres dumpIf you moved to Postgres, back it up with Postgres's own tools.
- Your config filescompose.yml, .env and any custom N8N_ENCRYPTION_KEY. Without them a restore cannot reach its data.
- External storageS3 buckets or custom paths for files and execution data, if you use them.
- Custom nodesAny folders set in N8N_CUSTOM_EXTENSIONS. Workflows break without the nodes they call.
- A server snapshotTaken right before every update, so a bad morning is one click from yesterday.
In Docker, the .n8n folder lives in the n8n_data volume, mounted at /home/node/.n8n. Back up the volume, not the container.
What the CLI export misses
n8n export:workflow --backup and n8n export:credentials --backup write workflows and credentials to JSON. The docs list what they leave out: users and roles, execution history, variables and instance settings, including the encryption key. A CLI export is a moving box, not a backup.
Test the restore
Once a quarter, restore the .n8n folder and the database onto a fresh VPS with the same environment, start n8n, and time it. Until it has come back once, your backup is only a theory.
An update habit that does not bite
n8n's update guide says to update at least once a month, so you never leap many versions at once, and to test on a copy when workflows pay your bills.
- Step 1Read the notesScan the release notes between your version and the new one for breaking changes.
- Step 2Snapshot and back upTake a server snapshot and a fresh database dump before you touch anything.
- Step 3Change one numberRaise the pinned version in .env, or run the one-line setup with
--upgrade. - Step 4Check the flowsOpen the busiest workflows, watch the next runs, and keep the snapshot until the week is quiet.
ExampleThe Monday that did not happen
Back in Porto, an update changes how one node reads dates and Monday's sales summary comes out empty. Sunday's snapshot turns that into a ten-minute rollback, not a lost week.
Key takeaway
A backup counts only after it has restored.
Chapter 6 of 8
Lock down a self-hosted n8n server
Your n8n holds the keys to every app it touches. Guard it like that.
Think about what your n8n server holds. Keys to your CRM, your inbox, your accounting tool, maybe your bank feed.
It is the most connected machine you own. Guard it like one.
Close every door you are not using
A fresh VPS often arrives with every port reachable. Allow SSH and 443, close the rest, including 5678.
One trap: ports that Docker publishes skip the ufw rules you just wrote. So publish n8n as 127.0.0.1:5678:5678 so only the proxy can reach it.
Use SSH keys instead of passwords and keep the system patched; none of that is n8n-specific, and all of it matters.
- Only 443 and SSH openn8n listens on 5678. Publish it as 127.0.0.1:5678:5678 so only the proxy can reach it.
- HTTPS through a reverse proxyThe n8n docs recommend a proxy, which also renews certificates.
- A strong owner accountTurn on two-factor sign-in for every person with access.
- Task runners in external modeThe isolation layer for workflow code. In queue mode, every worker gets its own runner sidecar.
- Your own encryption key, stored twiceSet it on purpose and keep a copy outside the server.
- Nothing you do not useSwitch off the public API and nodes your team never needs.
Who can edit workflows matters
Anyone who can edit a workflow can run code through it. The task runner docs call runners the isolation layer between that code and the rest of your instance, which is why they belong in external mode wherever real credentials live. Keep the list of editors short.
Key takeaway
Your n8n server holds every key, so expose only the proxy.
NextRead the license as a host
Chapter 7 of 8
The n8n license, read by a hosting business
What you may sell, what you may not, and the clean product that sits between.
If you run a hosting business, this chapter keeps you out of trouble. Many guides skip it. That does not make it optional.
What the Sustainable Use License says
Self-hosted n8n is published under the Sustainable Use License, which n8n calls fair-code. It is free, and the source is public, but it is not open source in the OSI sense.
The license overview lists three limits. You may use or modify n8n only for your own internal business purposes, or for non-commercial or personal use. You may distribute it or provide it to others only free of charge, for non-commercial purposes. And you may not remove n8n's licensing or copyright notices.
For anything else, n8n offers a separate commercial agreement.
What the License FAQ allows, and what it rules out
n8n's License FAQ gives practical examples. Here they are, grouped for a hosting business.
Allowed
- Use n8n to run your own business
- Build automations for clients on your instance, if they cannot edit them
- Charge for workflow building, setup, maintenance and training on your own instance, or on a client's own server you don't also host
- Run several instances
What a host sells
- A VPS sized for n8n, which the customer installs from n8n's own installer
- Docker, a reverse proxy, a firewall and snapshots
- A guide that links to the official docs
- Support for the server, not for n8n
Needs an agreement
- Host n8n as a service where clients build workflows
- White-label n8n by removing its branding
- Fork the code into your own automation product
- Install n8n for a client while also hosting it for them
What this means for a hosting business
The line runs through one question: who provides n8n to the customer?
If you install n8n, run it and charge for access, you are hosting n8n as a service. The FAQ rules that out without an agreement, and it also says you may install n8n on a client's own server only if you are not hosting for them as well.
If you sell a server and the customer installs n8n from n8n's own installer, to run their own workflows, the customer is the one using n8n. Your product is the server. Sell the home, not the tenant.
That gives you a clean offer: n8n-ready VPS plans, with Docker installed, a proxy waiting, the firewall set, snapshots on, and a guide that points to n8n's own installer.
Four rules for an n8n-ready plan
- Do not preinstall or run n8n for customers without an agreement with n8n. That includes "managed n8n" and one-click installs.
- Name the plan, not the brand. "Sized for self-hosted n8n" describes a plan; a logo that suggests a partnership is another matter.
- Link to the license on your plan page.
- Support the server, not n8n.
Some hosts advertise n8n preinstalled. They may hold agreements you cannot see, so do not copy the offer without one.
Watch outThis is guidance, not legal advice
Read the license and FAQ yourself, and write to [email protected] if your plan sits near the line. n8n says a partner programme for hosts managing many instances is on the way. An email before launch costs less than a rebrand after.
Key takeaway
Hosting n8n as a service needs an agreement with n8n; a VPS sized for n8n that customers install themselves does not.
Chapter 8 of 8
Sell n8n VPS hosting plans under your own brand
Turn one dedicated server into a shelf of plans that n8n users are glad to rent.
Every month, people search for "n8n VPS hosting". They want a server that works the first time, a bill that stays put, and someone who answers when the disk fills up. You can be that someone.
Your first buyers: automation freelancers who build client flows on their own instance, small businesses leaving per-run pricing, and teams that outgrew a laptop.
Three plans with job-shaped names
Buyers do not think in gigabytes. They think "just me", "my team" and "a lot of traffic". Name the plans that way.
Flow Solo
RAM 2 GB, 1 vCPU, SSD 30 GB
One person, a few dozen light workflows. SQLite, the built-in default, regular mode.
Example: €6.90 per month
Flow Team
RAM 4 GB, 2 vCPU, SSD 50 GB
A small team with flows running day and night. PostgreSQL in its own container, regular mode with a concurrency limit.
Example: €12.90 per month
Flow Scale
RAM 8 GB, 4 vCPU, SSD 100 GB
Heavy or bursty workloads, many webhooks. PostgreSQL plus Redis, queue mode on one server.
Example: €22.90 per month
Behind every plan sits the chapter 3 setup minus n8n itself, plus a short guide that sends the customer to n8n's installer. The pillar guide applies the same idea to AI agent plans.
One server, three plan lines
Memory runs out first for each of these plans, so capacity is plain division once the host keeps a little RAM for itself. Here is each plan alone on a 128 GB server, with 80% of the slots sold.
| Plan | Slots | Customers to cover rent | Monthly result |
|---|---|---|---|
| Flow Solo2 GB at €6.90 | 62 | 38 | €54.96 |
| Flow Team4 GB at €12.90 | 31 | 17 | €77.31 |
| Flow Scale8 GB at €22.90 | 15 | 9 | €67.56 |
Real shelves are rarely one size. Say you lay out the 128 GB server as 15 Flow Solo, 10 Flow Team and 5 Flow Scale slots, 30 in all and 110 GB of memory. At the same 80% sold, that is 24 customers, €277.60 in monthly sales, and about €46 a month after rent, addresses and fees. Example numbers; try your own in the VPS hosting profit calculator.
Rent weighs more on small servers. A 64 GB server full of Flow Team plans keeps about €43 a month at 80% sold. The dedicated server guide explains why bigger boxes pay better.
The software line
Someone has to bill customers and hand them a control panel. Built yourself, that is typically WHMCS Plus plus a Virtualizor licence: $43.95 per month at list price for a single server (October 2026). At about 1.15 USD per EUR, the mixed shelf still keeps about €8 a month after that.
Prefer not to assemble it? Whitelify runs the shop, the customer panel and the invoices on dedicated servers you rent, in your colours, and customers pay straight into your own Stripe, PayPal or crypto wallet. Its free plan takes one server and your first five paying customers, on a Whitelify subdomain.
Support boundaries, written down
Before customer one, write it down: you look after the machine, its network, disk, snapshots and proxy. n8n, workflows and API keys belong to the customer; point those questions to the n8n docs and community forum.
Wondering what other small hosts charge? The anonymous State of Independent Hosting 2026 survey collects it. Ready to open your shelf? Get on the Whitelify waitlist for a founding place: early beta access, 30% off paid plans and a numbered badge.
Key takeaway
Sell a prepared server with a job-shaped name and let customers install n8n themselves.
NextQuick answers about n8n hosting
FAQ
Questions people ask about n8n hosting
What is the best way to host n8n?
For most people who want control, a VPS running n8n with Docker Compose behind an HTTPS reverse proxy. Run n8n's official one-line setup with --no-start, add PostgreSQL and your own encryption key before the first start, then add backups and a monthly update. If you never want to touch a server, n8n Cloud is the hosted alternative.
How much RAM does n8n need?
It depends on your workflows, not on n8n alone. n8n's Docker Compose guide asks for at least 4 GB of RAM and 2 vCPUs for its full stack, which includes a sandbox for the optional n8n Assistant. A lean single-user setup can start smaller. Large payloads, files, Code nodes and parallel runs push it up.
Can I self-host n8n for free?
Yes. The self-hosted community edition runs without a license key under the Sustainable Use License, for your own internal business purposes or for personal and non-commercial use. You pay only for the server. Some features need a paid Business or Enterprise license key.
Should I use SQLite or PostgreSQL for n8n?
SQLite is the default and fine for trying n8n out. For production with more than a handful of users, or workflows running around the clock, n8n's docs recommend PostgreSQL, and queue mode needs it. The one-line setup starts on SQLite, and switching later means an export and import, so add Postgres before the first start.
When do I need n8n queue mode?
When one n8n process cannot keep up: runs pile up, the editor slows, or heavy jobs delay light ones. Try a concurrency limit first. If that is not enough, queue mode splits the work between a main process and workers, with Redis in the middle and PostgreSQL behind them.
How do I back up a self-hosted n8n instance?
Back up the .n8n folder, which holds the encryption key and, with SQLite, the database. Dump PostgreSQL with its own tools if you use it, and keep your compose and environment files, external storage and custom nodes. The CLI export covers workflows and credentials only. Test a restore.
Can I sell n8n hosting to customers?
Not as hosted n8n without an agreement with n8n. Its Sustainable Use License FAQ rules out hosting n8n as a service where clients build workflows, and white-labeling it. A hosting business can sell VPS plans sized for n8n that customers install and run themselves. For anything more, write to [email protected]; n8n says a partner programme for hosts managing many instances is on the way.
Is n8n open source?
Not in the OSI sense. The source code is public, but the Sustainable Use License limits commercial use, so n8n calls itself fair-code. For self-hosters running their own workflows, that makes little practical difference.
Can I sell VPS plans without building billing and a panel myself?
Yes. Whitelify runs the shop, customer panel and invoicing for VPS plans on dedicated servers you rent, under your brand, and customer payments go straight to your own Stripe, PayPal or crypto account. Its free plan takes one server and your first five paying customers on a Whitelify subdomain. Waitlist members become founders, with 30% off paid plans.
Now it's your turn
Install in minutes. Host for years.
Good n8n hosting is a short list done well: a VPS with room for your heaviest run, Docker Compose on Postgres behind HTTPS, your own encryption key, backups you have restored, and a monthly update behind a snapshot. Queue mode waits until the line keeps growing.
Hosting businesses: sell the server, not n8n. Prepare it well, name it for the job, link the license, then grow one machine at a time.
Where to go now: the AI agent hosting guide for the wider picture, our start-up guide to launching a VPS hosting company, or the full Learn library.
Open an n8n-ready shelf under your name
Whitelify handles the storefront, panel and billing for VPS plans like these, on servers you rent and under your own brand. Money from customers lands in your accounts, not ours. Start free with one server and five paying customers on a Whitelify address.
Sign up today to claim a founding spot: early access, 30% off paid plans, and a badge with your number on it.
