Webhook issue on self-hosted instance

Describe the problem/error/question

I have a self-hosted n8n instance running with an Nginx proxy, but when creating the webhook node I am not able to connect it with other nodes.

The webhook URL is ended up with null instead of a path.

What is the error message (if any)?

Please share your workflow/screenshots/recording

Share the output returned by the last node

#[details=“instance information”]

Debug info

core

  • n8nVersion: 1.107.4
  • platform: docker (self-hosted)
  • nodeJsVersion: 22.17.0
  • database: postgres
  • executionMode: regular
  • concurrency: -1
  • license: enterprise (production)

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: memory

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/139.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2025-09-01T06:49:43.996Z}
[/details]

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system:

@Roland_Li Hello, have you tried setting the environment variables for both WEBHOOK_URL and N8N_PROXY_HOPS and then restart the n8n instance?

This n8n documentation link might help you Configure webhook URLs with reverse proxy | n8n Docs

@c0d33ngr Thank you for the suggestion! I’ve followed your advice and implemented the recommended configuration, but unfortunately the webhook issue persists. Here’s what I’ve done and the current status:

:white_check_mark: Configuration Applied:

Environment Variables Set:

Proxy Configuration:

  • Nginx reverse proxy with proper forwarding headers:

  • X-Forwarded-For

  • X-Forwarded-Host

  • X-Forwarded-Proto

Current Setup:

  • n8n Version: 1.109.2 (updated from 1.107.4)

  • Platform: Docker (self-hosted)

  • Database: PostgreSQL

  • Proxy: Nginx with SSL/TLS

  • Domain: https://n8n.mydomain.ai/

:cross_mark: Issue Still Persists:

The webhook node still shows null instead of the proper webhook path when creating workflows. The webhook URL is not being properly resolved despite having N8N_WEBHOOK_URL set correctly.

:magnifying_glass_tilted_left: What I’ve Verified:

  1. :white_check_mark: Environment variables are properly set in the container

  2. :white_check_mark: n8n instance restarted successfully after configuration changes

  3. :white_check_mark: Nginx proxy is forwarding headers correctly

  4. :white_check_mark: SSL certificate is valid and working

  5. :white_check_mark: n8n is accessible via https://n8n.mydomain.ai/

:clipboard: Debug Information:

shellscript

# Environment variables confirmed in container:

N8N_PROXY_HOPS=1

N8N_WEBHOOK_URL=https://n8n.mydomain.ai/

WEBHOOK_URL=https://n8n.mydomain.ai/

:red_question_mark: Next Steps - Need Help With:

  1. How can I debug webhook URL resolution? Are there specific logs I should check?

  2. Should I verify any additional n8n configuration settings?

  3. Are there any known issues with n8n 1.109.2 and webhook URL resolution?

  4. What other troubleshooting steps would you recommend?

I’ve referenced the n8n documentation on webhook URLs with reverse proxy as suggested, but the issue persists. Any additional guidance would be greatly appreciated!

Finally I fixed the issue by:

  • Remove the overly strict Content-Security-Policy header from Nginx (it’s blocking eval in the editor and may be causing the null URL)

/etc/nginx/sites-available$ diff n8n n8n.before-csp-change-20250908114344
34a35

add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;

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