Blog · · 3 min read
How to install n8n for free on your computer (Docker or npm, step by step)
Install self-hosted n8n for free with Docker or npm, keep your data safe, set the right timezone and know when n8n Cloud is the better choice.

Every agent on this blog runs on n8n, and the first question is always the same: do I have to pay to try it? No. The self-hosted n8n Community Edition can be installed for free on your own computer or server. You only pay for outside services you use (for example, the OpenAI API).
This guide covers the two simplest routes, Docker and npm, plus three settings that save you headaches on day one.
Docker or npm?
- Docker (recommended): n8n is isolated from the rest of your system, you update by swapping the image, and your data lives in a volume. Ideal for a server.
- npm: if you already have Node.js and want to try it in two minutes. Handy for tinkering, a bit more fragile on upgrades.
Option A: install n8n with Docker
- Install Docker Desktop (Windows/Mac) or Docker Engine (Linux).
- Create a volume so your workflows and credentials survive restarts:
docker volume create n8n_data
- Start n8n:
docker run -it --rm --name n8n -p 5678:5678 -e GENERIC_TIMEZONE=Europe/London -e TZ=Europe/London -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n
- Open
http://localhost:5678and create your owner account.
To keep it running in the background, replace -it --rm with -d --restart unless-stopped. Set the timezone to your own.
Option B: install n8n with npm
- Install Node.js. In our tests with n8n 2.43 we needed Node 24; older versions failed on one dependency (
isolated-vm). Check the version the official n8n docs require when you install. - Try it without a global install:
npx n8n
- Or install and start it:
npm install n8n -g
n8n start
- Open
http://localhost:5678.
Three settings that save headaches
- Timezone. If scheduled flows ("every day at 9") fire at the wrong hour,
GENERIC_TIMEZONEis missing. It is already in the Docker command above; with npm, export it beforen8n start. - Your data. With Docker, without the
-v n8n_data:...volume you lose everything when the container is removed. With npm, data lives in the.n8nfolder in your home directory: back it up. - Public webhooks.
localhostis not reachable from the internet. WhatsApp, Stripe or a web form cannot reach a local n8n without a public URL (a tunnel or a server) and theWEBHOOK_URLvariable pointing to it. For learning and testing with sample data, local is perfect.
Your first flow in 5 minutes
- Create a new workflow and add a Manual Trigger.
- Add an Edit Fields (Set) node with a field
message= "Hello from n8n". - Click Execute workflow and check the output.
If that works, you can import any template: workflow menu → Import from file and pick the .json.
Self-hosted or n8n Cloud?
- Self-hosted (free): full control and no licence cost, but you handle updates, backups and uptime.
- n8n Cloud (paid): no maintenance and a public URL from minute one, which makes WhatsApp or form webhooks much simpler.
A practical rule: learn and test locally; when an agent is about to serve real customers, move it to a server or to Cloud.
Honest limitations
- The commands here are the usual ones from the n8n docs; versions move fast, so if something fails, compare with the official installation guide.
- A laptop that goes to sleep is not a server: a customer-service agent needs to be on 24/7.
Next step
With n8n running, download the free WhatsApp agent and import it, or read AI automations for small businesses. If you want all 8 agents ready-made, see the AgentKiosk pack.


