How to install and run n8n locally with Docker or npm
Start n8n with Docker or npx, open port 5678, add a Webhook node, and catch the first request on the Test URL.
You do not need a cloud seat to wire an HTTP request into automation. n8n runs on your machine: the editor is in the browser, data stays local by default.
Follow the official docs and install n8n locally with Docker or npm, open localhost:5678, then build a first Webhook workflow. This is a developer-tools how-to, not a brainstorm-product manual.
Pick one install path
See docs.n8n.io/hosting/installation. For a laptop trial use Docker or Node. Postgres and queue mode can wait.
| Method | You need | Best when |
|---|---|---|
| Docker | Docker Engine | Named volume, easy reset |
| npx / npm | Supported Node.js LTS | No container, just the editor |
| n8n Cloud | A browser signup | No local process; not this article |
Five steps to the first Webhook
- 1
Start Docker or npm
Docker:
docker volume create n8n_data, thendocker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n. Node:npx n8nin an empty folder, or a global install plusn8n start. Recheck docs.n8n.io — image tags change. - 2
Open the editor and create the owner
Visit
http://localhost:5678. First load asks for email and password. That user owns this instance, not a cloud plan. You can skip the setup wizard and land on an empty canvas. - 3
New workflow, drop Webhook
New workflow. Add a Webhook node. Set HTTP Method to
POST. Leave a random path or sethello. Do not attach production secrets yet. - 4
Listen and curl the Test URL
Click Listen for test event and copy the Test URL. In another terminal:
curl -X POST YOUR_TEST_URL -H 'Content-Type: application/json' -d '{"ping":true}'. The editor should stop listening and show the JSON. - 5
Respond, then decide on Activate
Add Set or Respond to Webhook and return
{"ok":true}. Keep using the Test URL on your laptop. For a stable URL, save, Activate, and switch to the Production URL. Port 5678 is not public by default.
docker volume create n8n_data
docker run -it --rm --name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8n
# or: npx n8n
# then open http://localhost:5678Three editor pieces to learn first
Canvas and nodes
Each node is a step: trigger, transform, output. Webhook is a trigger. The right panel sets method, path, and auth.
Test URL vs Production URL
The test address is live only while Listen is on. Production needs an Active workflow. Mixing them yields 404 or empty replies.
Credentials and env
Store third-party keys in Credentials, not in node fields. Local config lives under .n8n. Do not commit that folder.
Common pitfalls
Port busy: map -p 5679:5678 or stop the old container. Persist a Docker volume or --rm drops workflows. An old Node version makes npx n8n fail — use a supported LTS.
When the flow works and you need a shared sketch, wbstorm is a room ID — see create or join a room and whiteboard basics. Editor rules: how to write Cursor Rules.
Do I have to use Docker?
No. Official docs also cover npm. npx is faster if you only want the editor. Docker plus a named volume is cleaner if you want a disposable instance.
Why is the Test URL 404?
The workflow tab must stay open and the Webhook node must be listening. Close the tab or skip Listen and the test URL will not accept the request.
Is this the same as n8n Cloud?
The editor looks similar. Hosting and billing differ. Cloud does not use your local port. This article is self-host on localhost only.
Is this a wbstorm feature?
No. This article is only about running n8n locally and hitting a Webhook. wbstorm is a browser brainstorm room and is unrelated to the automation runtime.