Skip to content
SelfHostBR, home page
Guide

Install n8n with Node.js (without Docker)

Install n8n with npm, without Docker and without root, with the install time and memory use you can expect and the common problems to avoid.

MMarlon Published on 7 min read
On this page

n8n is moving away from npm installs. On startup it warns: “Running n8n outside a container is deprecated. Future versions will require running n8n via the official Docker image.” It works today, but for production prefer the Docker Compose guide.

This path is for when you can’t use Docker: a shared server, a machine without root access, or just trying things out.

What you need

  • A machine with at least 1 GB of free RAM (RAM and CPU requirements).
  • Node.js 24 or newer (the n8n package requires node >= 24.0.0). The npm install page in the docs lists Node.js 20.19 to 24.x and says npm-based installs are deprecated from n8n 3.0; version 24 satisfies both.
  • About 3 GB of free disk: n8n’s node_modules folder comes to 2.8 to 3.1 GB.
  • The default database is SQLite, with nothing extra to install.

Install Node.js in your own folder (no root)

mkdir -p ~/n8n-lab && cd ~/n8n-lab
V=v24.21.0
curl -fsSLO https://nodejs.org/dist/$V/node-$V-linux-x64.tar.xz
tar xf node-$V-linux-x64.tar.xz
export PATH=$PWD/node-$V-linux-x64/bin:$PATH
node -v

On Alpine Linux (which uses musl), download the linux-x64-musl build from unofficial-builds.nodejs.org. On Ubuntu/Debian you can also use the package manager or nvm; what matters is having version 24.

Install n8n locally

mkdir app && cd app && npm init -y
npm install n8n
./node_modules/.bin/n8n --version

The install takes a few minutes (close to 3 on a fast server).

Start it listening only on localhost

export N8N_HOST=127.0.0.1 N8N_LISTEN_ADDRESS=127.0.0.1 N8N_PORT=5678
export GENERIC_TIMEZONE=Europe/Berlin
export NODE_OPTIONS=--max-old-space-size=768   # for a 1 GB VPS
./node_modules/.bin/n8n start

n8n also opens the Task Broker on 127.0.0.1:5679, and only one instance can run per port. To reach it from outside, put a reverse proxy with HTTPS in front (Caddy, Nginx or Traefik) and never expose port 5678 directly. To keep it running after you close the terminal, use a systemd service or pm2.

How much memory to reserve

With a simple workflow, n8n starts in 10 to 15 seconds and idles around 450 MB (main process + task runner). In a burst of 20 parallel calls, the peak is near 800 MB with the heap limited to 768 MB. So 1 GB free covers light personal use; for production, leave room for the system and the proxy.

Common problems

  • Don’t use ulimit -v to limit memory. Node.js reserves a lot of virtual address space it doesn’t use, and the process dies with Fatal process out of memory or Failed to reserve virtual memory for CodeRange, even with little RAM in use. Limit through the heap (--max-old-space-size) or through a cgroup (systemd MemoryMax=).
  • A webhook answers Published version not found for workflow: the workflow is not published. Use n8n publish:workflow --id=... (the old update:workflow is deprecated).
  • N8N_RUNNERS_ENABLED is no longer needed.
  • The “virtual environment is missing” warning from the Python task runner only matters if you use Python in the Code node.

Next steps

To choose a server, see the calculator and how much it costs to host n8n.

Frequently asked questions

Can I install n8n without Docker?

Yes, with npm install n8n and Node.js 24 or newer. But n8n itself warns that running outside a container is deprecated and that future versions will require the official Docker image.

Which Node.js version does n8n require?

The n8n package requires node >= 24.0.0.

How much disk space does n8n take with npm?

About 3 GB: the node_modules folder comes to 2.8 to 3.1 GB.

M

Written by

Marlon

I like automation and write here what I learn building automations with n8n. Spotted a mistake or an outdated detail? Let me know.

Keep reading