Error trigger URL defaults to localhost:5678

I have latest n8n 1.90.2 running in Docker container. I have set the host and it works otherwise fine but when triggering error, it incorrectly defaults to http://localhost:5678. I fixed this for me with Code string replace but thought it is good to report this as a bug.

Environment variables

- N8N_HOST=my-full-domain-name
- WEBHOOK_URL=https://my-full-domain-name
- WEBHOOK_TUNNEL_URL=https://my-full-domain-name

Steps to reproduce:

  • Add an error trigger on your specific host. Check if localhost is set as the variable for workflow url.

Environment

  • Running n8n via Docker
  • Operating system: Ubuntu 22.04.5 LTS
  • n8n: self-hosted 1.90.2
  • Docker version 28.1.1, build 4eba377
  • Database: Postgres

Data from my error trigger

{
"execution": 
{
"id": 
231,
"url": 
"http://localhost:5678/execution/workflow/1/231",

I had the same problem with my Worker Compose but got it fixed with some env’s. Do you also use Worker in your setup?

I just updated to the latest version and checked — it worked as expected. Are you sure you saved your environment variables and restarted the service?

Yes I use worker. Could you share the env params you used?

I tried updating and restarting but still have the localhost:5678 as the url param in JSON.

Oh thanks to BuddiesD I realised to check worker envfile params and it was missing the N8N_HOST=host and now works fine. So you can close this issue. Thanks!

1 Like