📺 Prefer to watch? Full walkthrough on YouTube
Why Run n8n Locally Before Touching the Cloud Trial?
If you’ve been looking into n8n, you’ve probably seen the cloud version. It’s a solid product — you sign up, everything’s managed for you, and you’re building workflows in minutes. The trial gives you 14 days to try it out.
But 14 days goes fast when you’re still figuring out the basics. And there’s a quiet pressure knowing the clock is ticking the whole time.
Here’s the thing: setting up n8n locally takes roughly the same amount of time as creating a cloud account. And you get a few things you simply wouldn’t get on cloud.
What you get with a local n8n setup
- Your data never leaves your machine — no third-party server touches your workflows, credentials, or anything you’re building. For a lot of teams that’s a hard requirement, not just a nice-to-have.
- No execution limits — on cloud, every workflow run counts against your monthly quota. Locally, run your workflows a hundred times in a row during testing. It doesn’t matter.
- Full community node ecosystem — install integrations and extensions that the cloud version simply doesn’t allow.
- Talk to local services — if you’re running a local AI model, a local database, or other Docker containers, your local n8n can talk to all of them directly. Cloud n8n can’t.
The goal of this setup isn’t to replace a proper self-hosted n8n server — it’s to remove the pressure entirely. Learn it properly, take as long as you need, and when you’re ready you can move to cloud or a proper always-on server with full confidence that you know what you’re doing.
Already past the learning stage and want a production-ready scalable n8n instance? Check out the companion post: Scaling Your Self-Hosted n8n: Queue Mode, Postgres & Custom Docker Images — or watch the full video walkthrough linked at the bottom.
What We’re Building
Here’s the architecture in plain terms:
External App (Stripe, GitHub, Typeform...)
│
▼
ngrok tunnel
(public URL → your laptop)
│
▼
n8n in Docker
(localhost:5678)
│
▼
Local services
(AI models, databases, other containers)
n8n runs inside Docker on your laptop. Normally that means it’s locked to your local network — nothing outside can reach it, so webhooks from external apps won’t work.
ngrok solves that. It creates a secure tunnel from the internet directly into your local machine. When an app fires a webhook, ngrok catches it and forwards it straight into your n8n instance. Think of it as a temporary public address for your laptop.
The ngrok free tier is more than enough for learning and testing — you don’t need to pay for that either.
By the end of this tutorial you’ll have a fully working, completely free n8n docker setup that can receive webhooks from any application on the internet — running entirely on your laptop.
Prerequisites
This is genuinely a short list:
- A computer — Windows, Mac, or Linux all work
- Docker Desktop — free download, ~2 minutes to install (get it here)
- A free ngrok account — also free (sign up here)
That’s it. Let’s build it.
Step 1: Run n8n with Docker
Open your terminal. On Windows you can use PowerShell or the built-in terminal in Docker Desktop itself.
Run this single command:
docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n
Here’s what each flag actually does — because this shouldn’t just be a magic command you copy and paste:
| Flag | What it does |
|---|---|
docker run | Starts a new container |
-it | Keeps the container attached to your terminal so you can see n8n logs in real time |
--rm | Automatically removes the container process when you stop it — your data is safe, more on this below |
--name n8n | Gives it a friendly name so you can reference it later |
-p 5678:5678 | Maps port 5678 on your laptop to port 5678 inside the container |
-v n8n_data | Creates a persistent volume — your workflows are saved even when you stop and restart the container |
On the
--rmflag: it only removes the container process, not the volume where your workflows are stored. Think of the container as your computer and the volume as the hard drive. Turning off your computer doesn’t wipe the hard drive.
Docker will pull the image on first run — this takes a minute or two depending on your connection, then it’s instant every time after.
Once it’s running, open your browser and go to http://localhost:5678. You’ll see the n8n setup screen. Create your owner account — this is local only, so don’t overthink the password.
n8n is now running on your laptop.
Step 2: Set Up ngrok
This is the step most local n8n self hosting tutorials skip — and it’s actually the step that makes your setup genuinely useful. Without it, webhooks from external apps simply won’t reach your local instance.
Head to ngrok.com, sign up for a free account, and download the ngrok agent for your OS.
Once installed, connect it to your account using your auth token from the ngrok dashboard:
ngrok config add-authtoken YOUR_TOKEN_HERE
Then expose your local n8n to the internet:
ngrok http 5678
ngrok will start up and give you a public URL that looks something like:
Forwarding https://abc123.ngrok-free.app -> http://localhost:5678
Copy that URL. That’s your n8n instance’s public address — anything on the internet can now reach it.
Step 3: Test a Live Webhook
Now let’s confirm this actually works end to end — not just theoretically.
In n8n, create a new workflow and add a Webhook trigger node. Set the method to GET and copy the production URL it generates. Make sure you publish the workflow.
To simulate a real third-party calling your endpoint, paste that URL into a tool like webhook.site or use a REST client, and add the required headers.
You should see: "Workflow was started" — this means the webhook is acknowledging the request but not waiting for the workflow to finish. To return a proper response, add a Respond to Webhook node with a custom message body.
Test it again. This time you’ll get your custom response back immediately.
Your local n8n is now receiving live webhook requests from the internet. Any app that supports webhooks — Stripe, Typeform, GitHub, whatever you’re building with — can talk to your local setup.
Honest Limitations of This Setup
Before you go further, a few real things to know so there are no surprises later:
This is a learning environment, not a production one. When you close your laptop, n8n goes offline. Same with the ngrok tunnel. That’s by design — it’s not meant to be always-on.
The ngrok free tier gives you one static subdomain, which is a nice improvement over older versions. But it’s still not something you’d hand to a client or use in a real production webhook URL.
This setup is for you only. There’s no workflow collaboration on the Community Edition — it’s a solo learning environment.
What works in your favour: self-hosted n8n gives you access to the entire community node ecosystem. Nodes the cloud version won’t let you install. So as you start exploring, you’ll have more options here than you would on cloud.
This setup is exactly what it says it is — the best way to learn n8n self hosted without pressure or commitment.
When You’ve Outgrown This Setup
You’ll know it’s time to move on when:
- You want n8n running 24/7 without your laptop being open
- You’re building workflows other people depend on
- You need a clean, stable webhook URL to share with a client or external service
- You want to run multiple workers for high-volume automation
That’s when you graduate to a proper scalable self-hosted n8n instance — with Postgres, Redis queue mode, and a cloud deployment. I’ve written a full guide on that here: Scaling Your Self-Hosted n8n: Queue Mode, Postgres & Custom Docker Images.
Quick Reference Commands
# Start n8n locally
docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n
# Add your ngrok auth token
ngrok config add-authtoken YOUR_TOKEN_HERE
# Expose n8n to the internet
ngrok http 5678
# Check your running containers
docker ps
# Stop the n8n container
docker stop n8n
Troubleshooting
n8n won’t start
Make sure Docker Desktop is running before you run the command. Check with docker ps — if you get a response, Docker is up.
Can’t access localhost:5678
Confirm the container is running with docker ps. If the -p 5678:5678 flag is missing from your command, the port won’t be mapped.
ngrok URL isn’t receiving webhooks Make sure your workflow is published (not just saved) in n8n, and that you’re using the production webhook URL, not the test URL.
Workflows disappeared after restarting
This usually means the -v n8n_data flag was missing from your docker run command. The volume wasn’t created, so data wasn’t persisted. Re-run with the volume flag — going forward your workflows will be saved.
Ready to take this further? Once you’ve got your workflows dialled in locally, the next step is spinning up a proper always-on n8n instance. The scaling guide covers Docker Compose, Postgres, Redis queue mode, and custom images — everything you need to go from local to production.