Automation
Self-Hosting n8n: Costs, Security and When It's Worth It
Free to install, not to run. The n8n Community Edition is free to self-host for your own internal business use, but you take on the server, the database, the updates and the security. n8n’s own documentation says it recommends self-hosting for expert users. Self-host when you need control over where data lives or you run high volumes and have someone to look after it. Otherwise, n8n Cloud is usually the simpler choice.
This guide covers what the licence allows, how Cloud and self-hosted compare on price, what running n8n takes and what it costs beyond the server. It also looks at two serious security flaws and at when self-hosting is worth it. If you are still choosing between tools, start with our comparison of n8n, Zapier and Make, which covers the licence basics and where each tool stores data. This post is about what happens after you pick n8n and decide to run it yourself.
What does “free” cover?
The Community Edition has no licence fee, and the licence limits what you may do with it. n8n publishes its code under the Sustainable Use License. The licence text says you may use the software “only for your own internal business purposes”, and that you may distribute it free of charge for non-commercial purposes.
If you plan to offer n8n to your own customers, for example as part of a product or a hosted service, read the licence yourself before you build on it, and take legal advice if the wording is unclear to you. We are not giving a view on those cases here. For running your own company’s automations on your own server, the internal-use wording is the part that applies.
The Community Edition is what n8n runs without a licence key. According to n8n’s Community Edition features page, a free registered licence key adds a few extras: folders, debug in editor and custom execution data. The paid features are a separate list, covered below.
n8n Cloud vs self-hosted: what do the prices look like?
Cloud plans are priced by workflow execution, and self-hosting replaces that bill with your own infrastructure and time. At the time of writing (November 2026), n8n’s pricing page shows the plans below in euros, billed annually. We have not converted them, and prices change, so check the page before you budget.
| Plan | Price | Executions a month | Notes |
|---|---|---|---|
| Starter | €20 a month | 2,500 | Cloud |
| Pro | €50 a month | 10,000 | Cloud |
| Business | €667 a month | 40,000 | Currently self-hosted only |
| Enterprise | Custom | Custom | Contact n8n |
An execution is one run of a whole workflow, however many steps it has. That makes Cloud pricing easy to forecast if you know how often your workflows fire. Our n8n vs Zapier comparison shows a worked example of how that counting differs from other tools.
Some features are paid-only even on a self-hosted install. n8n’s features page lists these as not in the Community Edition:
- SSO through SAML or LDAP
- Git version control
- Environments
- External secrets
- Log streaming
- Multi-main mode
- Projects and sharing
Queue mode, with Redis and workers, is in the Community Edition according to the same documentation. Multi-main mode is the paid one. If a security review at your company requires SSO, or you need staged environments, free self-hosting will not cover it.
What does it take to run n8n yourself?
Running n8n in production means a server, a container setup, a database and a plan for growth. n8n documents a Docker Compose setup for running it on your own Linux server. The same page carries a plain warning: “n8n recommends self-hosting for expert users. Mistakes can lead to data loss, security issues, and downtime.”
Which database?
n8n’s database documentation says SQLite is the default and PostgreSQL is an optional alternative. A single small instance can start on the default. The choice matters once you scale, because n8n’s queue mode docs say a distributed setup over SQLite is not supported, and multi-main mode needs PostgreSQL.
Queue mode and workers
On one instance, n8n does everything in a single process. Queue mode splits the work. The main instance handles triggers and webhooks and puts jobs on a Redis queue. Worker processes pick up the jobs and run them, with a default concurrency of 10 per worker. To handle more volume, you add workers.
That architecture gives you headroom, and it also gives you more parts to run: Redis, several worker processes and a database that all of them can reach. Every added piece is something to monitor and update.
What are the hidden running costs?
The licence is free, and the running costs are mostly time. A fair budget has these lines:
- The server. Compute and storage for the main instance, plus workers if you use queue mode.
- The database and its backups. Test a restore, or you do not know the backup works.
- Monitoring. Something has to tell you when a workflow stops firing or the server fills its disk.
- Updates. n8n’s updating guide says to update “at least once a month”.
- Someone’s time. Whoever owns the box also owns the outages, the upgrades and the questions from colleagues.
The encryption key
n8n encrypts the credentials stored in workflows, such as API keys and passwords. Per the encryption key documentation, n8n generates a key on first launch and stores it in the ~/.n8n folder unless you set your own with N8N_ENCRYPTION_KEY. In queue mode, all workers need the same key.
Our reading is that if you lose the key, you probably cannot decrypt your saved credentials and would have to re-enter them. The documentation does not spell out the consequence in those words, so test your restore process rather than trusting this paragraph. Back the key up separately from the database, in a password manager or secrets store that your backup process does not share.
Exporting workflows
n8n’s command line can export workflows and credentials, with options such as export:workflow --backup and export:credentials --backup. The --decrypted flag writes credentials in plain text, so avoid it unless you have a specific reason and a safe place to put the file.
Why are updates not optional?
An exposed self-hosted n8n that nobody patches is a real security risk, and two published advisories show why. Both are on n8n’s GitHub security page.
CVE-2025-68613 is a critical expression-injection flaw that allows remote code execution. The advisory was published on 19 December 2025, and the fix shipped in n8n 1.122.0, with backports in 1.120.4 and 1.121.1. n8n’s workaround was to limit workflow editing to fully trusted users, which the advisory says does not fully remove the risk. Only an upgrade does.
CVE-2026-21858, nicknamed “Ni8mare” by the Cyera researchers who found it, has a CVSS score of 10.0, the maximum. Its advisory was published on 7 January 2026. It affected versions from 1.65.0 up to, but not including, 1.121.0. It needs no authentication, lets an attacker read arbitrary files through a Content-Type confusion, and is fixed in 1.121.0.
n8n’s advisory list also shows two more high-severity advisories published on 28 October 2026. Read the current list when you make your plan, because it will have moved on.
The lessons are practical ones:
- Patch quickly after a security release, and do not wait for the monthly cycle when the advisory is critical.
- Do not expose the editor to the public internet if you can avoid it. Put it behind a VPN or an access proxy.
- Limit who can edit workflows. Editing rights are close to code-execution rights.
- Subscribe to n8n’s security advisories so someone is told when a release matters.
On Cloud, n8n handles the platform side of these. That is a large part of what the Cloud price buys.
When is self-hosting worth it?
Self-hosting pays off when you have a concrete reason and a person to own it. It is likely worth it if most of these are true:
- Data must stay in your infrastructure. A contract, a regulator or a customer requires it.
- Execution volume is high. Your usage would push you into the larger paid tiers.
- You have DevOps cover. Someone is on the hook for patches, backups and uptime, including when they are on holiday.
- You need custom nodes. Our n8n comparison notes that custom nodes are a self-hosted option.
Cloud is likely the better fit if nobody can own patches, or if your volume is small. For a small team running a few workflows, the Starter or Pro price is often cheaper than the time spent on a server. If you are weighing up the broader question of how to automate, our workflow automation guide is a good place to start.
Can you build AI agents in n8n?
n8n can run AI agent workflows, and the hosting rules in this guide apply to them in full. An agent that calls models and tools runs on the same server, uses the same credentials and carries the same patching duty as any other workflow. Protect the credentials an agent holds at least as carefully as any others.
If the idea is new to you, our guide on what an AI agent is explains the basics. For budgeting, what an AI agent costs covers the cost side.
What can CodeLeap do?
CodeLeap is a software and AI studio founded in London in 2019. We build apps, AI agents, integrations and automation, and we look after them once they are live. Our AI and process automation projects typically run £2,000 to £10,000 (about $2,600 to $13,000) for a single process, and support starts from £400 (about $520) a month.
If you want your cloud environment looked after, our managed cloud hosting service covers that side. If you want n8n run for you, we would scope that as part of a project.
A sensible next step
Start with two questions. Who will own patches, backups and uptime for this server, and can they name the person who covers them on holiday? Is there a hard requirement that data stay on your own infrastructure? If both answers are weak, try n8n Cloud first. You can move to self-hosting later if the need becomes real.
If you do want to self-host, or want help choosing and building the automations themselves, our AI and process automation service is the place to start. Book a call and we will tell you plainly whether Cloud, self-hosting or a different tool fits your workflow.
Frequently asked questions
Is n8n free to self-host?
The Community Edition has no licence fee, and the Sustainable Use License allows it for your own internal business purposes. You still pay for the server, database backups and the time to run and patch it. If you plan to offer n8n to your own customers, read the licence itself first, because the free terms are limited to internal use.
How much does it cost to self-host n8n?
There is no fee for the software, so the cost is a server, a database, backups, monitoring and staff time for updates. We can't give a single figure because it depends on your volume and who does the work. For comparison, n8n Cloud Starter was €20 a month billed annually for 2,500 executions at the time of writing (November 2026).
Is self-hosted n8n secure?
It is as secure as you keep it. Two serious flaws were published against n8n in 2025 and 2026, CVE-2025-68613 and CVE-2026-21858, and both were fixed in later releases. An unpatched instance exposed to the internet is a real risk. Update promptly, keep the editor off the public internet and limit who can edit workflows.
What database should n8n use?
n8n uses SQLite by default, and PostgreSQL is a supported option. Queue mode, where workers run executions, is not recommended over SQLite, and multi-main mode needs PostgreSQL. If you expect to scale beyond one instance, plan for PostgreSQL from the start, and check n8n's database documentation for current settings.
Should I use n8n Cloud or self-host?
Choose Cloud when nobody on your team will own patches, backups and uptime, or when your volume is modest. Choose self-hosting when data must stay in your own infrastructure, volume is high or you need custom nodes, and you have DevOps cover. n8n itself recommends self-hosting for expert users.
Want to build something like this?
Book a free 30-minute consultation and we'll help you find where automation pays off.