Fix: “Send and wait” links point to localhost in queue mode → set N8N_WEBHOOK_URL on worker containers too

Following up on these closed topics, since I hit the same issue and found the cause:

Setup

  • n8n version: [2.41.5]
  • Self-hosted on Dokploy, Docker Compose stack
  • Queue mode (main + worker containers)
  • Behind a reverse proxy (TLS terminated at the proxy)

Symptom
Regular Webhook nodes showed the correct public URL. The approval links generated by “Send and wait for response” (SMTP for my case) pointed to http://localhost:5678/webhook-waiting/``....

What didn’t fix it
I set these on the main n8n container only, as the docs describe:

yaml

- N8N_WEBHOOK_URL=https://${N8N_HOST}/
- N8N_PROXY_HOPS=1

(Note: since n8n 2.35.0, N8N_WEBHOOK_URL replaces the deprecated WEBHOOK_URL.)

What fixed it
I added the webhook URL to the worker container as well:

yaml

n8n-worker:
  environment:
    - N8N_WEBHOOK_URL=https://${N8N_HOST}/

After redeploying, new “Send and wait” executions generated the correct public links.

Why
In queue mode the worker runs the node, so the worker builds the resume/waiting URL ($execution.resumeUrl). If the worker doesn’t have the webhook URL configured, it falls back to the default http://localhost:5678. The main instance builds the regular webhook URLs, which is why those looked fine.

If you’re on an older version that still uses WEBHOOK_URL, the same rule applies: make sure it’s set on every worker, not just main. After changing it, trigger a new execution, because already-waiting executions keep the old link.

Hope this helps someone!

1 Like

Hey @red1xe, while you wait for a response, here are some things that might help:

Suggested resources

Automatically matched to your question.

Docs:

Forum:

@kjooleng, @Wouter_Nigrini, @hubschrauber - you’ve helped with similar issues before, can you take a look?

Automatically suggested by n8n’s community bot. It’s a pilot - please share feedback here.

1 Like

Thanks for documenting this — the queue-mode worker gap is easy to miss.

In queue mode the main instance can have N8N_WEBHOOK_URL (or the older WEBHOOK_URL) set correctly while workers still mint localhost resume URLs for Wait / “Send and wait” links. Those links are built where the execution runs, so the same public webhook base URL has to be on the worker containers too, and after you change it you’ll usually need a worker restart (and a republish of any waiting workflows if they still hold old URLs).

I wrote up the env + reverse-proxy checklist here (including the WEBHOOK_URL → N8N_WEBHOOK_URL rename): n8n WEBHOOK_URL and N8N_WEBHOOK_URL: Fix Localhost Webhooks

Disclosure: I’m the maker of n8nChat (Chrome/Firefox helper for n8n). Happy to dig further if Dokploy still shows localhost after the workers pick up the env.