localhost:5678 (n8n): not working, webhook and fixes
Port 5678 is n8n’s default. How to open the editor, change the port, and fix webhook URLs and reverse proxy problems.
Open this address: http://localhost:5678This opens on your own computer. It only works if the program is running.
localhost:5678 is the n8n workflow editor. n8n’s documentation lists 5678 as the default value of <code>N8N_PORT</code>. Start n8n, keep the terminal or container running, and open the address in a browser.
What runs on localhost:5678
- n8n, the workflow automation tool, with its default settings (N8N_PORT=5678)
Commands to start and test port 5678
docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8nN8N_PORT=5679 n8n startcurl -I http://localhost:5678Find what is using port 5678
Run these in a terminal on your computer. Nothing is sent to this site.
If localhost:5678 will not open
- Refused to connect
- n8n is not running or the port is not published. Start n8n and keep it running. In Docker, publish the port with
-p 5678:5678, and checkdocker ps. - The settings that decide the address
- n8n’s docs list these defaults:
N8N_PORT5678,N8N_HOSTlocalhost,N8N_PROTOCOLhttp, andN8N_LISTEN_ADDRESS::.N8N_EDITOR_BASE_URLis the public address of the editor, used in emails and redirects. - Webhook URLs show localhost, but outside services cannot reach them
- Behind a reverse proxy, n8n’s docs say to set
N8N_WEBHOOK_URLto the public base URL. The older nameWEBHOOK_URLstill works as an alias but logs a deprecation warning. SetN8N_EDITOR_BASE_URLto the editor’s public address too. - Running behind a reverse proxy
- n8n has
N8N_PROXY_HOPS, default 0, for the number of reverse proxies in front of it. Set it to match your setup. - Workflows disappear when the container is removed
- n8n keeps its data in
/home/node/.n8nin the official image. Mount a volume there, as in the command above. - Port 5678 is already in use
- Another program or an old n8n holds it. Find it with the tool below, or start n8n on another port with
N8N_PORT.
Other ports like 5678
| Port | Usually used by |
|---|---|
| localhost:3000 | React, Next.js, Express |
| localhost:5173 | Vite dev server |
| localhost:4200 | Angular dev server |
| localhost:5000 | Flask |
| localhost:8000 | Django, PHP, Python |
| localhost:8080 | Tomcat, Spring Boot, Docker |
| localhost:8888 | Jupyter Notebook |
Questions about localhost:5678
- What is localhost:5678?
- The default address of the n8n editor.
- How do I change the n8n port?
- Set the N8N_PORT environment variable and restart n8n. If it runs in Docker, change the left number in -p as well.
- Why do my webhooks use localhost?
- n8n builds webhook URLs from its host settings. Behind a proxy, set N8N_WEBHOOK_URL to the public address.
- Is localhost:5678 safe?
- Only your own computer can reach it while it stays on localhost. If you publish the port to your network or the internet, put a login and HTTPS in front of it.
Free tools that help
- Common ports listSearch a list of common TCP and UDP port numbers: SSH 22, HTTP 80, HTTPS 443, MySQL 3306, PostgreSQL 5432 and more, with dev server ports.