N8n generates webhook URLs with port 5678 despite WEBHOOK_TUNNEL_URL configuration

Hi,

I’m running into an issue where n8n continues to generate webhook URLs including :5678, even though I have configured the environment variables to point to a clean public HTTPS URL.


Deployment details:

  • n8n running via docker-compose
  • Accessed behind a reverse proxy (HTTPS)
  • Environment variables set as follows:

env

CopierModifier

N8N_PROTOCOL=https
N8N_HOST=n8n.portail.mydomain.com
WEBHOOK_TUNNEL_URL=https://n8n.portail.mydomain.com
  • Verified these variables are correctly interpolated using docker-compose config
  • Restarted n8n cleanly (docker-compose down && up -d)
  • Webhooks were deleted and recreated after the restart

Problem:

Webhook URLs generated by n8n still include the port:

bash

CopierModifier

https://n8n.portail.mydomain.com:5678/webhook-test/...

Whereas I expect:

bash

CopierModifier

https://n8n.portail.mydomain.com/webhook-test/...

What I’ve checked:

  • WEBHOOK_TUNNEL_URL is correctly set and visible in the config
  • Reverse proxy is working fine and does not expose port 5678 publicly
  • I’m not accessing n8n via IP:5678 directly
  • I’ve even tried removing the ports: section in Docker and still the issue persists

Question:

How can I force n8n to stop appending :5678 to the generated webhook URLs?

Is there a known issue or extra configuration required beyond WEBHOOK_TUNNEL_URL?

Thanks in advance for your help! :pray:


Information on your n8n setup:

  • n8n version: 1.93.0
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Default (not set)
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker (via docker-compose)
  • Operating system: Host: Proxmox , Container: Debian-based (official n8n image)

This was renamed to WEBHOOK_URL.

2 Likes