Disclosure: some links in this article are affiliate links. If you buy through them, Sophrai may earn a commission at no extra cost to you. It never changes our rankings. Read our affiliate disclosure.
Short answer: most self-hosted n8n instances run well on 2 GB of RAM and 1–2 vCPUs. Plan for 4 GB if you use AI agents, process files, or run many workflows at once, and 8 GB+ with queue mode for heavy, concurrent workloads. The details below explain why, using n8n’s own documentation.
How much RAM does n8n need?
n8n needs very little memory at rest: an n8n Cloud instance idles at about 100 MB, according to n8n’s docs. Your workflows decide the real number. For most small setups, 2 GB is a safe start; 4 GB suits AI agents and file processing; 8 GB or more suits heavy concurrent use with queue mode.
The key phrase from n8n’s hosting prerequisites is that “it’s the nature of your workflows and the data being processed that determines your memory requirements.” n8n’s example sizing, based on n8n Cloud, lists memory of 320 MB to 2 GB and database storage of 512 MB to 4 GB on SSD. Those are illustrative numbers for one instance, not a guarantee.
What uses memory in n8n?
Memory in n8n grows with the amount of data each execution holds. Large JSON payloads, binary files, long workflows, Code nodes, manual test runs and several executions at the same time all add up. The n8n process itself is small; the data flowing through it is what fills RAM.
n8n’s page on memory-related errors lists the factors that increase memory use for an execution:
- Amount of JSON data passed between nodes.
- Size of binary data, such as PDFs, images or spreadsheets.
- Number of nodes in a workflow.
- Code nodes (and the older Function node), which n8n says “can increase memory consumption significantly”, because the Code node creates a pre-processing and post-processing copy of the data.
- Manual executions, because n8n makes a copy of the data for the editor.
- Other workflows running at the same time.
That is why two people with “10 workflows” can need very different servers. Ten small webhook-to-Slack flows barely register. Ten flows that download and parse 50 MB files can exhaust 4 GB.
n8n server sizing table: 1 GB to 16 GB
Use this table as a starting point and adjust after you watch real usage for a week. The tiers mirror the logic in our free n8n Cost & Hosting Planner, which adds headroom for the operating system, Docker and a database.
| Workload | Suggested server | Database | Notes |
|---|---|---|---|
| Testing, learning, 1–2 simple workflows | 1 vCPU / 1 GB | SQLite | Fine for experiments; little headroom |
| Solo or small team, up to ~50k runs/month, few concurrent runs, no AI | 1–2 vCPU / 2 GB | SQLite or small Postgres | The most common starting point |
| AI agents, file processing, or up to ~300k runs/month | 2 vCPU / 4 GB | Postgres | Same RAM class as n8n’s single-instance benchmark |
| Many concurrent runs (10–25), 100+ active workflows | 4 vCPU / 8 GB | Postgres | Consider queue mode with Redis |
| Heavy, business-critical load | 8 vCPU / 16 GB or several servers | Postgres (dedicated) | Queue mode: main + workers |
For reference, n8n’s performance benchmarking page says n8n “can handle up to 220 workflow executions per second on a single instance”. That test used an AWS c5a.large (4 GB RAM), a single instance in main mode with Postgres, and a very simple workflow (Webhook Trigger plus Edit Fields). Real workflows with API calls and data transformation will be slower, but it shows that raw throughput is rarely the bottleneck.
Does n8n need much CPU?
No. n8n’s documentation states that n8n isn’t CPU intensive and that even small cloud instances should be enough for most use cases. Memory requirements usually matter more than CPU, so put your budget into RAM first. One vCPU works for light use; two vCPUs give comfortable headroom.
CPU matters more in a few cases: Code nodes that do heavy computation, image processing with the Edit Image node, and many parallel executions. If CPU sits near 100% for long periods, add a vCPU or move work to queue-mode workers.
How much RAM does n8n need with AI agents?
Plan for at least 4 GB of RAM if your workflows use AI Agent nodes. The model itself runs at the provider (OpenAI, Anthropic and so on), so you don’t need GPU memory, but prompts, conversation memory, tool results and retrieved documents all sit in n8n’s memory during the run.
Two exceptions change the picture completely:
- Running a local model (for example with Ollama) on the same server. Then the model’s own memory needs dominate, often many gigabytes; size the box for the model, not for n8n.
- In-memory vector stores. Keeping embeddings inside n8n uses RAM that grows with your documents. A dedicated vector database is more predictable.
SQLite or Postgres: does the database change sizing?
For a single user and modest volume, SQLite works and needs no extra memory. For teams, more volume or queue mode, use Postgres and budget roughly 0.5–1 GB of extra RAM for it on the same server (our rule of thumb, not an n8n figure). n8n recommends a dedicated database per instance and SSD storage.
By default n8n creates an SQLite database when none exists. n8n’s prerequisites page also recommends SSD storage, persistent volumes in container setups (“If not, all data is lost”) and basic database security such as IP allow lists and backups. Our Docker Compose guide shows the official setup with persistent volumes.
When do you need queue mode?
You need queue mode when one n8n process can no longer keep up: many executions at the same time, long-running workflows that block others, or a need to scale across servers. Queue mode separates the main process from worker processes and uses Redis to hand jobs to the workers.
n8n’s queue mode documentation explains the setup. In n8n’s multi-instance benchmark, the team used seven 8 GB servers: two webhook instances, four workers, a database and a main instance running n8n and Redis. Most small businesses never need anything close to that.
How to tell if your n8n server is out of memory
Look for n8n’s own warning, “Execution stopped at this node (n8n may have run out of memory while executing it)”, or errors such as “Connection Lost”, “503 Service Temporarily Unavailable” or “JavaScript heap out of memory” in the logs. These are the signals n8n’s docs list for out-of-memory situations.
When you see them, you have two options, as n8n’s docs put it: increase the memory available to n8n, or reduce memory consumption. Practical ways to reduce it:
- Process in batches. Split large lists into smaller chunks instead of loading everything at once.
- Use sub-workflows. A sub-workflow returns only its final result, so the parent doesn’t hold every intermediate item.
- Avoid heavy Code nodes on large data. Use built-in nodes where you can.
- Prune execution data. Saving every execution’s data grows the database; n8n’s scaling docs cover execution data pruning.
- Raise the V8 heap limit with
NODE_OPTIONS=--max-old-space-size=SIZEif the server has spare RAM.
How much does a right-sized n8n server cost?
A 2 GB server costs roughly $5–$12 per month at mainstream providers, and a 4 GB server roughly $5–$24, as of October 2026. Prices vary a lot by provider, region and contract length, so compare them side by side before you buy.
| Provider | Smallest plan that fits 4 GB | Listed price | Source |
|---|---|---|---|
| Contabo | Cloud VPS 4 (4 vCPU / 8 GB) | €4.40/mo on a 24-month term, excl. VAT | contabo.com |
| Hetzner | CAX11 (2 vCPU Arm / 4 GB) | €6.49/mo excl. VAT | hetzner.com |
| Hostinger | KVM 1 (1 vCPU / 4 GB) | $6.49/mo promo with 24-month prepay; renews at $11.99 | hostinger.com |
| Vultr | Regular 4 GB (2 vCPU) | $20/mo | vultr.com |
| DigitalOcean | Basic 4 GiB (2 vCPU) | $24/mo | digitalocean.com |
For honest pros and cons of each, read our Best VPS for n8n in 2026 comparison. To see whether self-hosting beats a managed plan for your volume, see Zapier vs Make vs n8n: real cost.
Frequently asked questions
Can n8n run on 1 GB of RAM?
n8n itself idles at around 100 MB on n8n Cloud, so it can start on 1 GB. In practice 1 GB leaves little room for the operating system, Docker, a database and any real workload, so treat it as a test box only. Start production at 2 GB.
Is 2 GB of RAM enough for n8n?
Yes, 2 GB is enough for most solo and small-team setups: a single instance, SQLite or a small Postgres, a handful of workflows running at the same time and no large files. Move to 4 GB when you add AI agents, big files or more concurrent runs.
Does n8n need a lot of CPU?
No. n8n’s documentation says n8n isn’t CPU intensive and that memory requirements usually supersede CPU requirements. One or two vCPUs are enough for most single-instance setups.
When do I need queue mode?
Queue mode splits n8n into a main process and workers connected through Redis. Consider it when many executions run at the same time, when one busy workflow slows everything else, or when you need to scale beyond one server.
How do I fix ‘JavaScript heap out of memory’ in n8n?
Either give n8n more memory, or reduce what each execution holds. n8n’s docs suggest processing data in smaller batches, splitting work into sub-workflows, avoiding heavy Code nodes on large data, and raising the V8 old-space limit with NODE_OPTIONS=–max-old-space-size.
Sources
n8n docs: Prerequisites (CPU, memory, database); n8n docs: Memory-related errors; n8n docs: Performance and benchmarking; n8n docs: Queue mode; community threads on r/n8n and r/n8n_on_server. Prices from each provider’s page, checked 26 October 2026.
