localhost:5678: Running the n8n Editor
n8n, the workflow automation tool, opens its editor at http://localhost:5678 when you self-host it with npx n8n or Docker. The page appears once the terminal says the editor is accessible. Webhooks created there use localhost:5678 too, which outside services cannot reach, so set WEBHOOK_URL to a public address before relying on them.
| Variable | Default | What it changes |
|---|---|---|
| N8N_PORT | 5678 | The port n8n listens on |
| WEBHOOK_URL | Built from host and port | The public base URL shown for webhooks |
| N8N_HOST | localhost | Host name used in generated links |
Updated
Running n8n locally is a quick way to build automations, but everything lives in the .n8n folder of the user who runs it. In Docker that folder is inside the container unless you mount a volume, which is why workflows can vanish after a restart.
Run n8n with saved data
Docker with a named volume
Replace the WEBHOOK_URL line with your public address, or remove it for purely local use.
docker volume create n8n_data
docker run -it --rm --name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
-e WEBHOOK_URL=https://automations.example.com/ \
docker.n8n.io/n8nio/n8n
Moving from local to always on
A laptop that sleeps stops every scheduled workflow. For automations that must run at night, host n8n on a server, set WEBHOOK_URL and an encryption key, and put HTTPS in front of it.
Automations like these often sit behind a business website; We.Inc can build and host that site, leaving n8n to run only the workflows.
How it works
- Start n8n with npx n8n, or the Docker command below.
- Open http://localhost:5678 and create the owner account.
- Mount a volume so the data folder survives container restarts.
- Set WEBHOOK_URL to a public HTTPS address before sharing webhook links.
Tips
- A webhook node shows a test URL and a production URL. The production one works only after the workflow is activated.
- A tunnel gives a temporary public address for testing; restart n8n with WEBHOOK_URL set to it so the editor shows the right links.
- If 5678 is taken, set N8N_PORT, or keep n8n on 5678 inside Docker and map a different host port.
Frequently asked questions
How do I open n8n on localhost:5678?
Run npx n8n with Node installed, or start the official Docker image with -p 5678:5678. When the log says the editor is accessible, open the address in a browser.
Why did my n8n workflows disappear?
The container was recreated without a volume, so its data folder was thrown away. Mount a named volume at /home/node/.n8n to keep workflows and credentials.
Why do external services fail to call my n8n webhook?
The webhook URL points at localhost:5678, which only your machine understands. Expose n8n through a tunnel or a public server and set WEBHOOK_URL to that address.
How do I change the n8n port?
Set the N8N_PORT environment variable, for example N8N_PORT=5679 npx n8n, then open the new port.
Related: GitHub webhooks, Webhook vs API, localhost refused to connect, Docker Compose env files.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
More in Guides
- localhost:631: Using the CUPS Web Interface
- bolt://localhost:7687: Neo4j's Driver Connection
- localhost:80: The Default Web Port and Its Conflicts
- localhost:8000: Django, Laravel, FastAPI and Python Servers
- localhost:8080: What Runs on It and How to Fix It
- localhost:8081: What Listens There and How to Fix It
- localhost:8088: Superset, YARN or Splunk
- localhost:8090: Confluence and Other Port 8090 Servers
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App