n8n Webhook URL Shows localhost
Workaround available Self-hosted (Docker, Railway, VPS) Updated October 21, 2026
Quick answer
On self-hosted n8n, webhook and OAuth URLs show http://localhost:5678 when n8n doesn't know its public address. Set WEBHOOK_URL (and N8N_HOST/N8N_PROTOCOL) to your public domain and restart.
Most likely fix: Set the public URL environment variables.
Symptoms
Webhook node shows localhost:5678 URLs even though n8n runs on a public domain; external services can't reach the webhook; OAuth redirects point to localhost.
Why it happens
- WEBHOOK_URL not set behind a reverse proxy or PaaS
- Using WEBHOOK_TUNNEL_URL (a dev setting) in production
- N8N_HOST / N8N_PROTOCOL left at defaults
How to fix it
Try these in order — the most common fix is first.
1. Set the public URL environment variables
- Set WEBHOOK_URL=https://your-domain.com/
- Set N8N_HOST=your-domain.com and N8N_PROTOCOL=https
- Optionally set N8N_EDITOR_BASE_URL to the same domain
- Redeploy or restart the container
2. Remove development tunnel settings
- Delete WEBHOOK_TUNNEL_URL from production config
- Restart n8n and re-open the Webhook node to confirm the new URL
3. Tell n8n about your reverse proxy
- Set N8N_PROXY_HOPS=1 if one reverse proxy sits in front of n8n
- Match the value to the actual number of proxies in the chain
This guide also covers
- n8n webhook localhost
- n8n webhook url localhost 5678
- n8n WEBHOOK_URL
- n8n production webhook shows localhost
Still not working?
If n8n keeps failing, you're not alone. See every n8n problem users report or the alternatives people switch to.
Other n8n errors
- n8n Webhook Not Registered (404 Error)
- n8n Out of Memory (JavaScript Heap Out of Memory)
- n8n Connection Lost Error
- n8n Executions Stuck in Queued / Starting Soon
- n8n Google OAuth redirect_uri_mismatch Error
- n8n Schedule Trigger Running at the Wrong Time
- n8n 'Cannot Read Properties of Undefined' Error
- n8n Workflows Broken After 2.0 Update
- n8n Cloud Workspace Offline (503 Error)