N8n Webhook Production URL Not Working Despite Proper Docker and Nginx Setup

:white_check_mark: Describe the problem/error/question

I’m running n8n using Docker with an Nginx reverse proxy on a VPS (Ubuntu). My instance is accessible

The editor works fine, and I can access the interface and build workflows.
However, production webhooks do not work even when the workflow is activated.


:warning: What is the error message (if any)?

  • When sending a POST request to the Production webhook:

bash

CopyEdit

Cannot POST /webhook/my-webhook-name
  • When sending to the Test webhook (/webhook-test/...) it works correctly.

:floppy_disk: Information on your n8n setup

  • n8n version: 1.79.1
  • Database: SQLite (default)
  • EXECUTIONS_PROCESS: main
  • Running via: Docker + Nginx (manual deployment)
  • Operating system: Ubuntu 22.04
  • Relevant .env config:

env

# ========== N8N Server Settings (Critical for OAuth Redirect URL) ==========

# This is the primary variable that n8n uses to construct its own URLs.
# It should be the full external URL that users access.
N8N_EDITOR_BASE_URL=
WEBHOOK_URL=
N8N_LOG_LEVEL=debug
# N8N_HOST should usually be 0.0.0.0 for Docker containers,
# so n8n listens on all internal network interfaces,
# allowing Nginx to proxy to it.
# It does NOT need to be your domain name.
N8N_HOST=0.0.0.0

# The protocol n8n should *internally* believe it is running on.
# Since Nginx proxies HTTPS requests and passes X-Forwarded-Proto,
# n8n should be told it's HTTPS.
N8N_PROTOCOL=https

# The port n8n listens on *internally* within the Docker container.
# Nginx proxies to this port.
N8N_PORT=5678

# Ensure n8n trusts the proxy headers from Nginx (fixes X-Forwarded-For warning).
N8N_EXPRESS_TRUST_PROXY=true

# Security setting for secure cookies (required for HTTPS).
N8N_SECURE_COOKIE=true
# Enable task runners (recommended by n8n deprecation warning).
N8N_RUNNERS_ENABLED=true

# (Optional) If you are still getting 'Invalid boolean value' for permissions:
# N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=1


# ========== Supabase Database Settings (from previous setup) ==========
SUPABASE_DB_HOST=
SUPABASE_DB_PORT=
SUPABASE_DB_NAME=
SUPABASE_DB_USER=
SUPABASE_DB_PASSWORD=

# ========== N8N Basic Auth Credentials ==========
N8N_USER=
N8N_PASSWORD=

# ========== Other N8N Settings ==========
GENERIC_TIMEZONE=Africa/Algiers
N8N_LOG_LEVEL=info
N8N_LOG_OUTPUT=console
N8N_SKIP_PROXY_WARNING=true
N8N_DISABLE_PRODUCTION_MAIN_PROCESS=true

N8N_PUSH_BACKEND=websocket
N8N_ALLOW_ORIGINS=*

You have a lot of things going on in your env vars, but first guess is that the way you have configured N8N_PROTOCOL is incorrect. If nginx is reverse-proxying to n8n on regular http, you shouldn’t tell the n8n runtime that it should be creating an https listener. The x-forwarded-proto header is meant to inform the target service what protocol was used on the original request, but it doesn’t change what protocol is used TO forward the request.

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