n8n in Docker using Caddy proxy incorrectly adds port 5678 to webhook URLs

This is probably an n8n URL detection issue. Check if you’ve set N8N_PROTOCOL=https in your Docker environment - without it, n8n defaults to http and screws up URL generation. Also verify Caddy’s passing the Host header correctly. Sometimes the original host header gets lost during proxying and confuses n8n about which domain to use. I had the same setup and fixed it by explicitly setting WEBHOOK_TUNNEL_URL=https://example.com as an environment variable. This tells n8n exactly what base URL to use for webhook generation, ignoring internal port config entirely.