Production Webhook URL still says localhost

Describe the problem/error/question
I am running n8n in Docker on Windows with Cloudflare Tunnel. The Production Webhook URL in my trigger nodes always defaults to localhost.

What is the error message (if any)?

Please share your workflow



I have already confirmed the following:

My docker-compose.yaml has the correct WEBHOOK_URL, N8N_HOST, N8N_PROTOCOL, and N8N_TRUST_PROXY variables.

I have used docker exec and printenv to prove that these environment variables are being correctly passed into the running n8n container.

I have tried completely deleting the persistent volume with docker volume rm.

I have tried multiple n8n versions, including :latest and :1.45.1.

Despite all this, the application continues to ignore the environment variables and generate a localhost URL."

Share the output returned by the last node

Information on your n8n setup

  • n8n version: I have tried multiple n8n versions, including :latest and :1.45.1.
  • Database (default: SQLite): N/A (but Postgres I think)
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Windows

Hi there @D_Jones welcome to the community, this issue has been a known issue, but usually this issue is only on the display, meaning if you try to trigger the webhook with your expected domain (not the localhost), it should still work

because i dont know why, but usually it takes some time for the display to actually display the real domain, but behind the scene when you hit the webhook, usually it already points to your desired domain that you already set up, can you maybe try and test that and let us know?

thank you!

Thank you, but it seems this was not it. I had two instances of n8n on the system somehow. Fixed that now and onto the next issue!

Thank you for the help. Really I needed to stop and think!

1 Like

Hey @fahmiiireza

This is news to me, setting webhook_url and stopping then starting a container will result in the ui showing the new url instantly when the page is loaded.

Can you share the other reports that you have seen?

2 Likes

Hey there @Jon , i solved one of a similar issue back then where its not exactly showing localhost, but it shows the port, and the owner of the question confirm tht its only on the display

Heres the link to it

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.