Webhook URL showing port

Hi everyone,

I’m having trouble getting webhooks to work with my n8n instance on a VPS. The webhook URL shows as https://mydomain:5678/webhook-test instead of just https://mydomain/webook-test or whatever, and it’s not triggering, saying that the webhook should be on port 80, 443, 8080

Here’s my setup:

  • VPS Details: Ubuntu 24.04 LTS, IP 178.160.211.153, 15GB disk, 2x2.2GHz CPU.
  • Docker Compose:
    • Traefik: --certificatesresolvers.myresolver.acme.email=MYREALEMAILHERE, ports: 80:80, 443:443, 8080:8080
    • n8n: Labels include traefik.http.routers.n8n.rule=Host(), traefik.http.routers.n8n.entrypoints=websecure, traefik.http.services.n8n.loadbalancer.server.port=5678
  • .env (Relevant Parts):
    • N8N_BASIC_AUTH_ACTIVE=true
    • N8N_BASIC_AUTH_PASSWORD=MYREALPASSWORDHERE
    • N8N_HOST=mydomain
    • N8N_PORT=5678
    • N8N_WEBHOOK_URL=https://mydomain/
  • DNS: A record for mydomain points to my VPS IP.
  • SSL: Acme.json confirms a valid certificate for mydomain.

I’ve restarted the services, but the webhook still doesn’t work. Any suggestions?

I think you need environment variable WEBHOOK_URL instead of N8N_WEBHOOK_URL.

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