Port 5678 in n8n production URL
Hi @Solomon Christ or anyone doing their own VPS or self-hosting. I'm having a persistent issue with my self-hosted n8n instance on a VPS. The production webhook URL is always being generated as: https://agents.truelytics.solutions:5678/webhook/... But I want it to be clean, like this: https://agents.truelytics.solutions/webhook/... My Current Setup: - VPS on Hetzner (Docker + Docker Compose) - Reverse proxy with Caddy (handles HTTPS, port 443) - n8n runs in Docker on port 5678 (internal HTTP) What I Have Tried: 1. Changed .env settings N8N_HOST=agents.truelytics.solutions N8N_PORT=5678 N8N_PROTOCOL=https WEBHOOK_URL=https://agents.truelytics.solutions/ WEBHOOK_TUNNEL_URL=https://agents.truelytics.solutions/ 2. Updated docker-compose.yml services: n8n: image: n8nio/n8n:latest ports: - "5678:5678" environment: - N8N_HOST=${N8N_HOST} - N8N_PORT=${N8N_PORT} - N8N_PROTOCOL=${N8N_PROTOCOL} - WEBHOOK_URL=${WEBHOOK_URL} - WEBHOOK_TUNNEL_URL=${WEBHOOK_TUNNEL_URL} 3.Edited Caddyfile for clean HTTPS agents.truelytics.solutions { reverse_proxy http://localhost:5678 header { X-Frame-Options "DENY" X-XSS-Protection "1; mode=block" X-Content-Type-Options "nosniff" Referrer-Policy "strict-origin-when-cross-origin" Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" } } 4. Cleared Docker volumes and restarted multiple times The Problem: - The webhook URL still shows :5678 on the production URL. - I want the clean URL https://agents.truelytics.solutions/webhook/... without the port number. β
Any Ideas? What am I missing? - Is there a better way to force n8n to generate clean HTTPS URLs? - Should I use N8N_CONFIG_FILES with a JSON config? - Does this require a direct Nginx setup instead of Caddy?