Quick answer: Self-hosting n8n means running it on your own server with Docker, a PostgreSQL database and HTTPS, which gives you unlimited workflows and full control of your data.
n8n has become one of the most popular automation tools among developers and technical teams. It connects APIs, databases, AI models and hundreds of apps in visual workflows, and unlike most automation platforms, you can run it on your own server.
That option is a big reason for its growth. When you self-host n8n, there are no execution limits, no per-task pricing and no third party holding your data or your API keys. But self-hosting also makes you responsible for the server, the security and the backups.
This guide explains what self-hosting n8n really involves in 2026, what kind of server you need, how the recommended setup works, and the mistakes that cause most problems. By the end you will know whether self-hosting is right for you and how to do it properly.
What is n8n?
n8n is a workflow automation platform. You build workflows by connecting nodes on a visual canvas. Each node does one job, such as receiving a webhook, calling an API, reading a database, sending a message or asking an AI model to summarize something.
What makes n8n different from tools like Zapier or Make is its flexibility for technical users:
- You can write custom JavaScript inside workflows when a built-in node isn’t enough.
- It handles complex logic, including branches, loops, error handling and sub-workflows.
- It has strong AI features, so teams use it to build AI agents and assistants that connect to their own data.
- It can be self-hosted, so the whole platform runs on infrastructure you control.
The self-hosted Community edition is free to use under n8n’s Sustainable Use License. You pay only for the server it runs on.
Why developers self-host n8n
No execution limits
Cloud automation platforms usually price by the number of tasks or executions. That works for light use, but costs grow quickly once workflows run every few minutes or process large batches of data. A self-hosted instance runs as many workflows as your server can handle, for the same monthly server cost.
Full control of your data
Every workflow passes data through the platform, and many touch sensitive information such as customer records, payment events or internal documents. With self-hosting, that data stays on your server. For teams with privacy requirements or clients who ask where their data goes, this is often the deciding factor.
Freedom to customize
Self-hosting lets you install community nodes, set your own environment variables, connect to private databases on the same network and run n8n next to your other tools. You decide when to update and which version to run.
Predictable costs
A server has a fixed monthly price. Once your automations grow, that predictability is easier to plan around than usage-based billing.
Self-hosted n8n vs n8n Cloud
Both options run the same core product. The difference is who manages it and how you pay.
| Self-hosted n8n | n8n Cloud | |
|---|---|---|
| Who runs the server | You | n8n |
| Pricing model | Fixed server cost | Plan based, with execution limits |
| Execution limits | Only your server’s capacity | Depends on your plan |
| Data location | Your own server | n8n’s infrastructure |
| Updates | You choose when to update | Handled for you |
| Backups and security | Your responsibility | Handled for you |
| Best for | Developers and teams who want control and scale | Teams who want zero maintenance |
If you are comfortable with a Linux server and want room to grow, self-hosting usually wins on cost and flexibility. If nobody on your team wants to look after a server, n8n Cloud is the simpler choice.
What you need to self-host n8n
1. A server with enough memory
n8n is light when idle, but memory use rises during large executions, file processing and AI workflows. Memory is usually the first limit you hit, so size your server for RAM first.
| Use case | CPU | RAM | Storage |
|---|---|---|---|
| Testing and personal workflows | 1 vCPU | 2 GB | 20 GB |
| Production for a small team | 2 vCPU | 4 GB | 40 GB |
| Heavy files, browser automation or many AI nodes | 4 vCPU or more | 8 GB or more | 80 GB or more |
A virtual private server is the most common choice because it gives you a dedicated environment at a predictable price. If you don’t have one yet, a Linux VPS with full root access running Ubuntu is the easiest starting point, since most n8n guides and tools assume Ubuntu. Fast NVMe storage also helps once your execution history grows.
2. A domain or subdomain
Most services that send webhooks, such as Stripe, GitHub, Slack and Telegram, require a public HTTPS address. A subdomain like n8n.yourcompany.com pointed at your server solves this. An IP address alone is fine for testing but not for real workflows.
3. Basic Linux comfort
You don’t need to be a system administrator, but you should be comfortable connecting to a server over SSH, editing a configuration file and reading logs when something goes wrong.
The recommended setup in 2026
There are many ways to install n8n, but one setup has become the standard for good reason. It has four parts.
Docker. n8n runs inside a Docker container, managed with Docker Compose. This is now the official way to self-host. With n8n 3.0, installing through npm is no longer supported, so Docker is the only path forward.
PostgreSQL. n8n can use a simple built-in SQLite database, but PostgreSQL is the better choice for anything you plan to keep. It handles growth better, and moving from SQLite to PostgreSQL later does not carry your data across automatically. Starting with PostgreSQL saves you a migration.
A reverse proxy with HTTPS. A reverse proxy such as Caddy or Nginx sits in front of n8n, handles HTTPS with free Let’s Encrypt certificates and forwards traffic to n8n. Caddy is popular for n8n because it requests and renews certificates automatically with almost no configuration.
A pinned n8n version. n8n releases new versions almost every week. Instead of always pulling the newest one, production setups lock a specific version and update on purpose. This prevents surprise changes from breaking working workflows.
In this setup, only the reverse proxy is reachable from the internet. n8n and the database communicate privately inside the server, which removes many security risks from the start.
Security basics you should not skip
An n8n instance usually holds API keys and passwords for many services, which makes it a valuable target. These steps cover the essentials.
Create the owner account right away. The first person who opens a new n8n instance becomes its owner. Finish this step as soon as the site is online.
Turn on two-factor authentication. n8n supports it in the personal settings. Your automation account deserves the same protection as your email.
Keep n8n’s port private. n8n listens on port 5678 by default. It should only be reachable through the reverse proxy. One detail catches many people: ports that Docker publishes can bypass the server’s firewall, so a firewall rule alone does not protect an exposed container port. Keep n8n off the public network entirely.
Use SSH keys and a firewall. Turn off password logins for SSH and allow only the ports you need, normally SSH, HTTP and HTTPS.
Check your server’s IP before going live. Server IP addresses are often reused, and an address that was misused by a previous owner can still sit on spam blacklists. That can cause your outgoing emails and API calls to be rejected for reasons that are hard to trace. Before you build email or outreach workflows, check your server’s IP against blacklists so you know you are starting clean.
Protect the encryption key. n8n encrypts all stored credentials with a single encryption key. Set it yourself and store a copy somewhere safe outside the server. Without it, your saved credentials cannot be restored from a backup.
Backups: what you actually need to save
Many self-hosters discover too late that their backup was incomplete. A working n8n backup has three parts:
- The database, which holds your workflows, credentials and execution history.
- The n8n data folder, which holds settings and the encryption key file.
- The configuration, including your environment file with the encryption key.
Back these up automatically every night and copy them to a second location, not only the same server. Then test a restore once. A backup you have never restored is only a hope.
It also helps to limit how long n8n keeps execution history. n8n saves a record of every run by default, and without pruning the database can grow until the disk is full.
Updating n8n and preparing for n8n 3.0
Because n8n changes quickly, updates deserve a simple routine: take a backup, read the release notes for the versions you are skipping, change the pinned version, then restart. If something breaks, you can roll back to the previous version and restore your backup.
This matters more than usual right now. n8n released version 3.0 as a beta on 27 October 2026, with the stable release planned for early December. It is a major release with breaking changes:
- Self-hosted n8n must run on Docker. Installs through npm are no longer supported.
- Several legacy nodes are removed, including the old Function, Cron and Item Lists nodes.
- Some defaults are stricter, for example unverified community packages are turned off.
- There is no direct upgrade from 1.x to 3.x. You need to move to the latest 2.x first.
Before upgrading, open the Migration Report in your instance settings. It lists every workflow and setting that needs attention. Fix those, take a full backup and test the upgrade on a copy of your server first. A pinned version gives you the time to do this calmly, because nothing changes until you decide.
Common self-hosting mistakes
- Running n8n on HTTP only. Webhooks from most services fail, and login cookies may not work properly without HTTPS.
- Webhook URLs showing “localhost”. When n8n runs behind a proxy, you have to tell it its public address in its settings, or every webhook URL it shows will be unusable.
- Using the “latest” image tag in production. One automatic update can introduce breaking changes overnight.
- Starting on SQLite and planning to switch later. The move is harder than it sounds, so start with PostgreSQL.
- Forgetting the timezone. Scheduled workflows run at the wrong hour if the server and n8n timezones are not set.
- Choosing a server that is too small. Out-of-memory crashes often look like random restarts with no clear error.
- No tested backup. Most data loss stories with n8n start here.
When self-hosting is not the right choice
Self-hosting is powerful, but it isn’t for everyone. n8n Cloud may be the better choice if:
- Nobody on your team is comfortable managing a Linux server.
- You run only a few simple workflows that fit well inside a cloud plan.
- You need the platform managed and monitored for you, with no time spent on updates.
For most developers and technical teams, though, the trade is worth it. A few hours of setup gives you unlimited automations on a server you fully control.
Frequently asked questions
Is self-hosted n8n free?
Yes. The Community edition is free to self-host under n8n’s Sustainable Use License, with no limits on workflows or executions. You only pay for your server. Some advanced team features, such as single sign-on, require a paid license.
How much RAM does n8n need?
2 GB is enough for testing and personal use, and 4 GB is a comfortable starting point for production. Plan for more if you process large files, use browser automation or run many AI workflows.
Can I run n8n on a cheap VPS?
Yes, for light workloads. A small VPS with 2 GB of RAM handles personal automations well. Just keep an eye on memory use as your workflows grow, and upgrade before crashes start.
Do I need Docker to self-host n8n?
Yes, going forward. From n8n 3.0, Docker is the only supported way to self-host. It also makes updates, backups and moving to a new server much simpler.
Is self-hosted n8n secure?
It can be very secure if you follow the basics: HTTPS, a firewall, SSH keys, two-factor login, a private n8n port and regular updates. Most security problems come from skipped steps, not from n8n itself.
Can I move my n8n instance to another server later?
Yes. If you have the database backup, the data folder and the encryption key, you can restore everything on a new server and point your domain at it. Your workflows and credentials come back exactly as they were.
Final thoughts
Self-hosting n8n gives you something most automation platforms can’t: unlimited workflows, full ownership of your data and a fixed monthly cost. The key is to set it up properly from the start, with Docker, PostgreSQL, HTTPS, a pinned version and tested backups.
Get those basics right, prepare calmly for n8n 3.0, and your automation server will quietly do its job for years while saving you hours every week.
