n8n hosting: running self-hosted n8n on your own VPS
Published · updated
To host n8n yourself you need a Linux server with at least 2 vCPU and 4 GB of memory, Docker with Docker Compose, a domain name pointing at the server and a reverse proxy that serves n8n over HTTPS. On our price list a VPS of that size, with 80 GB of NVMe, costs $13.34 a month, and n8n's Community edition is free to self-host.
The n8n and Docker facts below come from their documentation as we read it on 20 November 2026. Our prices are from our own price list on the same day, per month and without tax.
What n8n asks for
n8n recommends a 64-bit Linux host for production. Its Docker Compose guide asks for at least 4 GB of memory and 2 vCPU. Those figures cover the guide's full stack, which includes a sandbox for running code, so a bare n8n container uses less, but they are the honest starting point.
n8n stores workflows, credentials and execution history in a database. Out of the box it uses SQLite, a single file. For production n8n recommends PostgreSQL, and SQLite does not work at all in queue mode, the setup where separate workers run the executions. Switching from SQLite to PostgreSQL later means a fresh instance, not an in-place migration, so if the instance will matter, start on PostgreSQL.
Docker is no longer optional: n8n says that from version 3.0 it no longer supports installing with npm. Docker supports both Linux versions most people pick for this, Ubuntu 24.04 and Debian 12, and we deliver both.
Which server size, and what it costs
Our VPS are priced per resource, so you pay for the size you choose rather than a fixed plan. These are four sensible sizes for n8n:
| Use | Server | Per month |
|---|---|---|
| Trying n8n, a few workflows, SQLite | VPS, 2 vCPU, 4 GB, 40 GB NVMe | $11.74 |
| Production with PostgreSQL | VPS, 2 vCPU, 4 GB, 80 GB NVMe | $13.34 |
| Many executions, AI nodes, larger files | VPS, 4 vCPU, 8 GB, 80 GB NVMe | $23.48 |
| Queue mode with workers and Redis | Dedicated Ryzen 5 5600H, 12 threads, 16 GB, 256 GB NVMe | $49 |
The first two rows follow n8n's own minimum. The other two are our suggestion, not n8n's. Memory is what runs out first: a workflow that loads a large file or a long AI response can need far more than the editor does. The vCPU on our VPS are shared with other virtual machines; if your workflows run on a tight schedule all day, a dedicated server gives you cores nobody else uses. There is no setup fee, 3 months cost 5% less and 6 months 10% less.
Docker, HTTPS and the public address
n8n's guide for cloud servers runs two containers with Docker Compose: n8n itself and Traefik, a reverse proxy that gets a free Let's Encrypt certificate for your domain and sends every plain HTTP request to HTTPS. Traefik listens on ports 80 and 443; n8n listens on port 5678, bound to 127.0.0.1 so that only Traefik can reach it. n8n says it plainly: do not expose the n8n process directly to the internet, put a reverse proxy in front of it.
Webhooks are the reason the public address matters. n8n builds the URL it gives to other services from its settings, so set N8N_HOST to your hostname, N8N_PROTOCOL to https, and N8N_WEBHOOK_URL to the full address, such as https://n8n.example.com/. On versions before 2.30.0 the last one is called WEBHOOK_URL. Without it, n8n hands out webhook links that point at localhost:5678 and nothing outside the server can call them.
The firewall we deliver, and the Docker trap
We deliver every Ubuntu and Debian server with ufw on and only SSH allowed in. For n8n you open ports 80 and 443, for Traefik and the certificate, and nothing else:
ufw allow 80/tcp
ufw allow 443/tcp
The trap is in the other direction. Docker's documentation warns that ports published by Docker bypass ufw: traffic to a published container port is routed before ufw's rules apply. If your Compose file publishes 5678:5678, n8n is reachable from the whole internet over plain HTTP even though ufw shows it closed. Publish it as 127.0.0.1:5678:5678, as n8n's own example does, and check from another machine that port 5678 does not answer.
The encryption key and backups
n8n encrypts the credentials it stores, such as API keys and passwords, with a key it creates on first start and saves in its .n8n folder, which in Docker lives in the n8n_data volume. n8n's documentation is clear about the consequence: without that key, a restored database or credential export cannot be decrypted. Copy the key somewhere safe on the day you install, or set your own with N8N_ENCRYPTION_KEY (openssl rand -hex 32 makes one).
Every one of our servers has one NVMe drive and no RAID, so a failed drive takes n8n with it unless the backup is on another machine. A full backup is the .n8n folder plus the PostgreSQL database if you use one; with SQLite, stop n8n before copying the folder. The n8n command line can also export workflows and credentials, but that export leaves out users, execution history and the encryption key.
n8n recommends updating often, at least once a month, after reading the release notes. Take a full backup first: going back to an older image does not undo the database changes a new version has made.
Self-hosted n8n or n8n Cloud?
The Community edition is free and, in n8n's words, has almost the complete feature set; features such as SSO, environments and projects come with the paid Business and Enterprise plans. n8n also runs its own paid cloud service. Self-hosting costs you the server and the upkeep: updates, backups and the firewall are yours. If you plan to offer n8n to clients rather than use it yourself, read n8n's Sustainable Use License first.
Questions
How much RAM does n8n need?
n8n's Docker Compose guide asks for at least 4 GB of memory and 2 vCPU. A VPS of that size with 80 GB of NVMe costs $13.34 a month on our price list. Workflows that handle large files or AI responses need more; 8 GB is the next step.
Is self-hosted n8n free?
The Community edition is free to self-host, and n8n says you can stay on it indefinitely. You pay for the server. Paid plans add features such as SSO, environments and projects.
Why can't other services reach my n8n webhooks?
Usually because n8n does not know its public address and hands out webhook links that point at localhost. Set N8N_HOST, N8N_PROTOCOL=https and N8N_WEBHOOK_URL, serve n8n through a reverse proxy with HTTPS, and open ports 80 and 443 in the firewall.
Sources, read on 20 November 2026: n8n production requirements, Install using Docker Compose, Docker Compose on a cloud server, Backup and restore, Update n8n, n8n editions, Docker and ufw.
Written and checked by the VPS Provider team.