
You want to run n8n on your own VPS and need to know what it requires before you pick a plan: RAM, CPU, database, disk and software. n8n's docs answer most of it, spread over a dozen pages. This guide collects what n8n says for 2.45.7, the current stable release, turns it into a VPS size and ends with a production setup. Still choosing between n8n Cloud and your own server? See our cost comparison.
Quick answer: n8n's system requirements come down to Docker Engine with Docker Compose v2 on Linux, a database and enough memory for the data your workflows load. n8n sets no hard RAM minimum, because it "doesn't restrict the amount of data each node can fetch and process", but its own figures give a range: its Kubernetes guides list 320 MB to 1,280 MB of RAM per instance for n8n's Cloud plans, and its Compose guide asks for at least 4 GB of RAM and 2 vCPUs once you add the n8n Assistant sandbox. SQLite is the default database; for production with more than a handful of users or round-the-clock workflows, n8n says to use PostgreSQL 16, 17 or 18. Add the operating system (Ubuntu needs 1 GB, 3 GB suggested) and measure your heaviest workflow with docker stats before you settle on a size.
n8n System Requirements in n8n's Docs
| Requirement | What n8n's docs say |
|---|---|
| Software | Docker Engine and Docker Compose v2; check with docker compose version |
| Operating system | Linux or macOS for the one-line setup, WSL on Windows |
| RAM and CPU | No hard minimum; n8n's Cloud plans give each instance 320 MB to 1,280 MB of RAM; at least 4 GB of RAM and 2 vCPUs for the Compose stack with the n8n Assistant sandbox |
| Database | SQLite by default; PostgreSQL 16, 17 or 18 for production |
| Queue mode | Redis and PostgreSQL; queue mode with SQLite "isn't recommended" |
| Disk | Grows with saved executions and binary files; pruning is on by default |
| Network | A reverse proxy with TLS in front of n8n for public webhooks |
The 4 GB figure is for the sandbox that runs code for n8n Assistant: it "uses Docker-in-Docker, which needs more headroom than a typical container". The one-line setup, curl -fsSL https://get.n8n.io | sh, starts that sandbox next to n8n, even though the assistant stays off until you add an AI provider key. Without the sandbox, n8n needs far less.
How Much RAM Does n8n Need?
n8n's Kubernetes guides for AWS, Azure and Google Cloud give the clearest numbers. Their example deployment requests 250 MB of memory per n8n container with a 500 MB limit, and "as a guide" they list what n8n's own Cloud plans get:
| n8n Cloud plan | RAM | CPU |
|---|---|---|
| Starter | 320 MB | 10 millicore, burstable |
| Pro (10k executions) | 640 MB | 20 millicore, burstable |
| Pro (50k executions) | 1,280 MB | 80 millicore, burstable |
Those values are for the n8n container alone; the operating system, the database and the Assistant sandbox come on top. Inside that budget, memory follows what your workflows load, not how many workflows you have. n8n lists what raises it per execution: the amount of JSON data, the size of binary data, the number of nodes, the Code node and the older Function node, manual runs from the editor (n8n copies the data for the frontend) and other workflows running at the same time. In regular mode, n8n doesn't limit how many production executions run at once; N8N_CONCURRENCY_PRODUCTION_LIMIT, off by default, queues the ones above a limit you set.
When an execution needs more memory than the server has, n8n shows errors such as "Execution stopped at this node (n8n may have run out of memory while executing it)", and the server log can show Allocation failed - JavaScript heap out of memory. n8n's docs give two ways out: more memory, or less data per execution. Process data in smaller chunks (their example: 200 rows per execution instead of 10,000), move heavy work into sub-workflows that return little, avoid the Code node where you can and don't run large jobs by hand. For heap errors, raise V8's old space with --max-old-space-size in NODE_OPTIONS.
Files mostly cost disk in n8n 2.x: since 2.0, n8n writes binary data to the filesystem by default in regular mode, under ~/.n8n/storage, and to the database in queue mode. Some reference pages still name the old in-memory mode as the default, but the 2.45.7 source picks filesystem.
Size Your VPS From These Figures
| Part | What its docs say |
|---|---|
| Ubuntu Server 24.04 | 1 GB RAM minimum for cloud images, 3 GB or more suggested; 25 GB of storage or more suggested |
| n8n container | No hard minimum; n8n's Cloud plans give it 320 MB to 1,280 MB of RAM |
| Compose stack with the Assistant sandbox | At least 4 GB of RAM and 2 vCPUs in total |
| PostgreSQL on the same server | shared_buffers is "typically 128 megabytes" by default |
| n8n's benchmark machine | 4 GB RAM, one n8n instance with PostgreSQL |
Add up the parts you run, then measure. Start your heaviest workflow from its trigger, not from the editor, and watch the n8n container in docker stats, a live view of each container's memory use against its limit (--no-stream prints one sample). Our RAM guide explains the numbers, our small business automation stack works the sum through for n8n, Baserow and PostgreSQL, and our guide to n8n and a Discord bot on one VPS caps n8n's memory.
For disk, start from Ubuntu's suggested 25 GB and add what n8n keeps. Pruning is on by default: n8n deletes finished executions, with their binary data, once they are older than 336 hours (14 days) or when there are more than 10,000. On SQLite, pruned space is reused for new data instead of being freed until you run VACUUM, for example with DB_SQLITE_VACUUM_ON_STARTUP=true.
Space-Node's VPS plans for n8n and AI agents come with full root access and dedicated RAM, from 2 GB to 48 GB.
Docker or npm
n8n's docs call Docker Compose "Best for: Production deployments with databases and additional services" and npm "Best for: Local development or testing". npm installs are deprecated from n8n 3.0, and from that version "n8n is only distributed through Docker". npm also needs Node.js: 20.19 to 24.x according to the npm guide, while the 2.45.7 package declares 24 or newer. On a VPS, use Docker: the image tag pins the version and a volume keeps the data. n8n releases a new minor version most weeks; the stable release, 2.45.7 on 31 October 2026, is the one for production.
SQLite or PostgreSQL
SQLite is the default and keeps everything in one file, ~/.n8n/database.sqlite, inside the n8n volume. n8n's Compose guide draws the line: "SQLite is fine for trying things out, but for a production instance that must handle more than a handful of users or workflows running around the clock use Postgres instead." n8n supports the two newest PostgreSQL majors, 17 and 18, plus 16, and that range shifts each year. MySQL and MariaDB support ended with n8n 2.0. Even with PostgreSQL, keep a volume for /home/node/.n8n: the folder still holds the encryption key for your credentials. Our SQLite or PostgreSQL guide covers the choice and the migration.
Production Setup on a VPS
A minimal Compose file for n8n with SQLite behind a reverse proxy looks like this; change the host name and time zone:
services:
n8n:
image: n8nio/n8n:2.45.7
restart: unless-stopped
ports:
- "127.0.0.1:5678:5678"
environment:
- GENERIC_TIMEZONE=Europe/Amsterdam
- TZ=Europe/Amsterdam
- N8N_HOST=n8n.example.com
- N8N_PROTOCOL=https
- N8N_WEBHOOK_URL=https://n8n.example.com/
- N8N_PROXY_HOPS=1
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
Then work through these steps in order:
- Install Docker Engine and the Compose plugin with Docker's guide for Ubuntu or Debian.
- Start n8n. Save the file as
compose.yamlin a folder such as~/n8nand runsudo docker compose up -dthere. With127.0.0.1in the mapping, only the server itself reaches port 5678 (on Docker 28.0.0 and newer), which matters because Docker's published ports skip UFW, as our Docker and UFW guide explains.GENERIC_TIMEZONEsets the time zone for the Schedule Trigger,TZthe system time zone. - Claim the owner account before any proxy forwards traffic: a new instance opens on its owner setup screen, so create the account yourself through an SSH tunnel. Our n8n security guide shows how, plus two-factor and webhook authentication.
- Put a reverse proxy with TLS in front. n8n recommends one, which "should also take care of certificate renewals".
N8N_WEBHOOK_URLsets the public webhook address and replacesWEBHOOK_URL, which is deprecated from n8n 2.35.0;N8N_PROXY_HOPS=1tells n8n that one proxy sits in front. Our n8n reverse proxy guide has complete Nginx and Caddy configurations. - Back up the
.n8nvolume, which holds the encryption key, the SQLite database and binary files, plus the PostgreSQL database if you use one. Stop n8n before you copy a SQLite volume. Our n8n backup guide has the commands. On Space-Node, backups are not included in the plan price; arrange them through a support ticket or run your own. - Update at least once a month, as n8n advises, after reading the release notes and taking a full backup. Our update and rollback guide shows each step.
For PostgreSQL, add a postgres service and set DB_TYPE=postgresdb with the DB_POSTGRESDB_ variables for host, database, user and password, as our small business stack does.
Scaling Past One Instance
n8n's docs say a single instance can handle up to 220 workflow executions per second, so limit concurrency and prune execution data before you add instances. When one instance still can't keep up, queue mode sends each execution through Redis to worker processes. n8n doesn't recommend SQLite for it, every worker needs the main instance's N8N_ENCRYPTION_KEY, and binary data goes to the database, because filesystem mode doesn't work in queue mode.
If Something Goes Wrong
- Webhook URLs show
localhost:5678: n8n builds them fromN8N_PROTOCOL,N8N_HOSTandN8N_PORT, which default tohttp,localhostand5678. Behind a proxy, setN8N_WEBHOOK_URLandN8N_PROXY_HOPSas in the reverse proxy guide. - "n8n may have run out of memory": smaller batches, sub-workflows and fewer Code nodes, or more memory (see the RAM section).
- PostgreSQL won't start after you raised its image tag:
database files are incompatible with servermeans a new major version can't open the old data directory. Your data stays intact: go back to the old tag, back up withpg_dumpalland follow PostgreSQL's upgrade guide.
FAQ
How much RAM does n8n need?
n8n sets no hard minimum, because memory follows the data, nodes and parallel executions of your workflows. As a guide, its Cloud plans give one n8n instance 320 MB to 1,280 MB of RAM. The stack with the n8n Assistant sandbox needs at least 4 GB and 2 vCPUs, and Ubuntu needs 1 GB of its own. Measure your heaviest workflow with docker stats and leave room above the peak.
Is 2 GB of RAM enough for n8n? Without the Assistant sandbox, it can be. Ubuntu's minimum takes 1 GB, which leaves room for n8n at the sizes of its Starter and Pro 10k Cloud plans (320 MB and 640 MB), but little for PostgreSQL or large executions. With the sandbox, n8n asks for at least 4 GB. Test your heaviest workflow first.
Should I use SQLite or PostgreSQL? SQLite for trying things out and small setups; PostgreSQL 16, 17 or 18 for production with more than a handful of users or round-the-clock workflows, and for queue mode. Starting on PostgreSQL spares you a migration later.
Does n8n need Redis? Only in queue mode, where Redis keeps the queue of pending executions that the workers pick up. A single n8n instance in regular mode runs without it.
Can I run n8n without a domain name?
For workflows that only call out, such as schedules and API polling, yes: reach the editor through an SSH tunnel to 127.0.0.1:5678. Webhooks from outside services need an address those services can reach, and n8n builds webhook URLs from N8N_HOST or N8N_WEBHOOK_URL, so a domain behind a reverse proxy with TLS is the usual setup.
Sources
All opened on 31 October 2026:
- n8n docs: Host n8n, One-line setup, Install using Docker Compose, Install with Docker, Install with npm, Deploy to AWS, Deploy to Azure, Deploy to Google Kubernetes Engine, Choose n8n's database, Database variables, Fix memory issues, Measure performance, Scaling, Manage execution data, Executions variables, Control concurrency, Enable queue mode, Handle binary data, Binary data variables, v2.0 breaking changes, Deployment variables, Endpoint variables, Webhook URLs with a reverse proxy, Set up SSL, User management, Back up and restore, Update n8n
- n8n code and releases: binary data config at 2.45.7, Compose file at 2.45.7, npm registry, image tags
- Ubuntu: Ubuntu Server system requirements
- Docker: Install on Ubuntu, Install on Debian, Port publishing, Restart policies, docker stats
- PostgreSQL: Resource consumption