EN · $ USD
Developer and Application Servers

n8n Webhook Not Working: URL, SSL and Proxy Fixes

7 min read Updated: Sunucu Atlas technical team

In short

The most common reasons n8n webhooks fail are: using the test URL (/webhook-test/) in production or leaving the workflow inactive, n8n generating localhost:5678 URLs because the WEBHOOK_URL environment variable is not set, an invalid SSL certificate, and a reverse proxy that does not pass headers or the websocket connection correctly. To diagnose, send a curl request to n8n from inside the server first, then from outside.

In this guide
  1. The basics first: test URL vs production URL
  2. Quick diagnosis table by symptom
  3. Step-by-step diagnosis
  4. WEBHOOK_URL and related environment variables
  5. SSL certificate problems
  6. The correct Nginx reverse proxy configuration
  7. Long-running workflows and response mode
  8. Other commonly overlooked causes
  9. The lasting fix: a properly configured n8n server

An n8n webhook not working almost always comes down to one of four causes: the wrong URL type (test vs production), a missing WEBHOOK_URL environment variable, SSL certificate problems, or the reverse proxy (Nginx, Caddy, Traefik) configuration. In this guide you will find a symptom-to-cause diagnosis table, checks to run in order, and correct configuration examples.

The basics first: test URL vs production URL

Every Webhook node in n8n has two separate URLs:

  • Test URL: https://n8n.alanadiniz.com/webhook-test/<path>. It only starts listening when you click "Listen for test event" or "Test workflow" in the editor, catches a single request, and then closes.
  • Production URL: https://n8n.alanadiniz.com/webhook/<path>. It listens permanently once the workflow is saved and activated (published, in newer versions).

Entering the test URL in the external system (WooCommerce, a payment provider, a form plugin) and forgetting to activate the workflow is the most common cause of "it worked yesterday, it doesn't work today" complaints. Production executions do not show live in the editor; you monitor their results in the Executions tab.

Quick diagnosis table by symptom

SymptomLikely causeFix
404 and "The requested webhook ... is not registered"Workflow is inactive, the test URL is in use, or the HTTP method/path differsActivate the workflow, use the production URL and the correct method
The Webhook node shows the URL as http://localhost:5678/...WEBHOOK_URL is not setSet the environment variable to your public HTTPS address
Telegram or another service says "HTTPS URL must be provided"n8n is generating an HTTP addressSet WEBHOOK_URL with https://
The external service returns an "SSL certificate problem" errorSelf-signed, expired, or incomplete-chain certificateInstall a valid Let's Encrypt certificate and serve the full chain
502 Bad GatewayThe n8n container is not running or the proxy points to the wrong portCheck the container status and the proxy_pass target
504 Gateway TimeoutThe workflow takes too long and the proxy stops waitingSet the webhook to respond "Immediately" and increase the proxy timeout
413 Request Entity Too LargeThe proxy's request body size limit is too lowIncrease client_max_body_size
"Connection lost" warning in the editorThe proxy does not pass the websocket connectionAdd the Upgrade and Connection headers

Step-by-step diagnosis

  1. Is n8n running? On the server, confirm with docker ps that the n8n container is in the Up state; if not, check the startup error with docker logs n8n --tail 100.
  2. Access from inside the server: Bypass the proxy and send a request directly to n8n. If it works here, the problem is not n8n but the proxy, DNS or SSL layer.
  3. Access from outside: Send a request to the production URL from your own computer and note the response code.
  4. DNS: Confirm that the subdomain points to the server's IP. If the record was changed recently, wait for propagation; details are in the DNS propagation guide.
  5. Firewall: Make sure ports 80 and 443 are open. You do not need to expose port 5678; traffic should come through the proxy.
# 1) From inside the server, directly to n8n
curl -i -X POST http://127.0.0.1:5678/webhook/siparis -H "Content-Type: application/json" -d '{"test":1}'

# 2) From outside, through the proxy and SSL
curl -iv -X POST https://n8n.alanadiniz.com/webhook/siparis -H "Content-Type: application/json" -d '{"test":1}'

# 3) DNS and certificate check
dig +short n8n.alanadiniz.com
echo | openssl s_client -connect n8n.alanadiniz.com:443 -servername n8n.alanadiniz.com 2>/dev/null | openssl x509 -noout -dates -issuer

If the Webhook node's HTTP method is set to POST, opening the URL in a browser address bar (a GET request) returns 404. That is not a bug; test with curl or Postman as a POST request.

n8n does not know its own public address. When it runs behind a reverse proxy, it listens internally on http://localhost:5678 and shows that address in the Webhook node too. Nodes that register the webhook themselves with the external service, such as Telegram Trigger and WooCommerce Trigger, send this wrong address and never fire. The fix is to set these variables in your Docker Compose file:

services:
  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: unless-stopped
    ports:
      - "127.0.0.1:5678:5678"
    environment:
      - N8N_HOST=n8n.alanadiniz.com
      - N8N_PROTOCOL=https
      - N8N_PORT=5678
      - WEBHOOK_URL=https://n8n.alanadiniz.com/
      - N8N_PROXY_HOPS=1
      - GENERIC_TIMEZONE=Europe/Istanbul
    volumes:
      - n8n_data:/home/node/.n8n

volumes:
  n8n_data:
  • WEBHOOK_URL: The public address used to build webhook URLs. It must end with / and start with https://.
  • N8N_PROXY_HOPS=1: Tells n8n there is one proxy in front of it, so it trusts the X-Forwarded-For header and sees the real client IP.
  • 127.0.0.1:5678:5678: Exposes the port only inside the server, preventing anyone from bypassing the proxy and reaching n8n over HTTP from outside.

After the change, recreate the container with docker compose up -d. Important: trigger nodes register their webhook at activation time, so you need to deactivate and reactivate once any workflow that was registered with the wrong address. For the full list of variables, see the n8n environment variables documentation.

SSL certificate problems

Payment providers, Telegram, Meta (WhatsApp) and most SaaS services require a valid, trusted certificate on the webhook URL. A self-signed certificate, an expired certificate, or a configuration missing the intermediate certificate (chain) causes these services to never send the request at all. A URL that opens fine in a browser can still fail in server-side clients because of an incomplete chain, so use fullchain.pem instead of cert.pem in Nginx. For Let's Encrypt setup, see the free SSL certificate guide.

Also keep in mind that Telegram webhooks only accept ports 443, 80, 88 and 8443; if you publish n8n on a non-standard port, Telegram Trigger will not work.

The correct Nginx reverse proxy configuration

The server block below includes the settings needed for webhooks, long-running requests and the editor's live connection (websocket) to work smoothly:

server {
    listen 443 ssl;
    http2 on;
    server_name n8n.alanadiniz.com;

    ssl_certificate     /etc/letsencrypt/live/n8n.alanadiniz.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/n8n.alanadiniz.com/privkey.pem;

    client_max_body_size 50m;

    location / {
        proxy_pass http://127.0.0.1:5678;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_buffering off;
        proxy_read_timeout 300s;
    }
}

On Nginx versions before 1.25, write listen 443 ssl http2; instead of the http2 on; line. Validate the config with nginx -t and apply it with systemctl reload nginx. Nginx's default proxy_read_timeout is 60 seconds; synchronous webhooks that take longer return a 504 error.

If you are behind Cloudflare or another CDN

When the proxy chain gets longer, raise N8N_PROXY_HOPS to match the number of proxies. Set Cloudflare's SSL mode to "Full (strict)"; "Flexible" mode uses HTTP between Cloudflare and your server and can cause redirect loops. Requests passing through the Cloudflare proxy are subject to a timeout of about 100 seconds; for long jobs, choose Respond: Immediately in the Webhook node and finish the work in the background.

Long-running workflows and response mode

The Webhook node's Respond setting has three options: Immediately (closes the request right away with 200), When Last Node Finishes (waits until the whole flow is done) and Using 'Respond to Webhook' Node (responds at whatever point in the flow you choose). Payment providers and Telegram may treat a request as failed and resend it if they do not get a quick response, which can lead to the same order being processed twice. For notifications from external services, either respond immediately or place the Respond to Webhook node near the start of the flow.

Other commonly overlooked causes

  • Path changes: When you duplicate a Webhook node or change its path field, the URL changes too. Remember to update the URL in the external system; two active workflows cannot use the same path and method.
  • Authentication: If Basic Auth or Header Auth is set on the Webhook node, the request is rejected with 401 or 403 when the sending system does not pass those credentials.
  • IP restrictions: The Webhook node's IP whitelist option or rules in the server firewall may be blocking the sending service's IP. If N8N_PROXY_HOPS is not set, n8n thinks every request comes from the proxy's IP and the whitelist does not work as expected.
  • Queue mode: If you run n8n in queue mode with Redis, production webhooks may be routed to separate webhook processes; check that your proxy forwards the /webhook/ path to the right process.
  • Body format: If the sending system sends application/x-www-form-urlencoded or raw text, the data may not appear in the fields you expect; turn on Raw Body in the Webhook node options to inspect the incoming data.

The lasting fix: a properly configured n8n server

Most of the problems above come from missing environment variables and proxy settings during the initial setup. Sunucu Atlas preinstalled n8n servers are delivered on Docker with a PostgreSQL database and an automatic SSL certificate, so your webhooks are ready to work on an HTTPS address from day one; with root access, you can still change environment variables and proxy settings to fit your needs. SA-N8N-1 is a good starting point for notification and form webhooks, and SA-N8N-2 for heavy webhook traffic or AI flows. If you get stuck after setup, you can open a support ticket.

Frequently asked questions

Why does my n8n webhook test URL work but the production URL doesn't?

The production URL only listens while the workflow is active. Save and activate the workflow, and enter the URL that starts with /webhook/, not /webhook-test/, in the external system.

Why does my n8n webhook URL show localhost:5678?

Because the WEBHOOK_URL environment variable is not set, n8n uses its own internal address. Set WEBHOOK_URL to your public domain starting with https:// and restart the container.

How do I fix the n8n webhook 404 not registered error?

Check that the workflow is active and that you are using the correct path and the HTTP method selected in the Webhook node. For example, sending a GET request from a browser to a webhook that expects POST returns 404.

Why do I keep getting a Connection lost warning in the n8n editor?

Your reverse proxy is not passing the websocket connection. Add proxy_http_version 1.1 with the Upgrade and Connection headers to your Nginx config and turn off proxy_buffering.

Should I expose n8n's port 5678 to the internet?

No. Having n8n listen only on 127.0.0.1 and routing outside traffic through a reverse proxy over HTTPS is the right approach for both security and webhook compatibility.

For this guide

Recommended plans

Most webhook problems come from missing SSL and proxy configuration. A preinstalled n8n server on Docker with an automatic SSL certificate gets your webhooks working on a valid HTTPS address from day one.

SA-N8N-1

n8n
Recommended

4 GB RAM

$2.75/mo

+VAT

  • Processor2 CPU
  • Disk40 GB NVMe
  • LocationIstanbul
  • 1G Port
  • n8n Pre-installed (Docker)
  • PostgreSQL Database
  • Automatic SSL Certificate

SA-N8N-2

n8n

8 GB RAM

$4.32/mo

+VAT

  • Processor4 CPU
  • Disk80 GB NVMe
  • LocationIstanbul
  • 1G Port
  • n8n Pre-installed (Docker)
  • PostgreSQL Database
  • Automatic SSL Certificate

SA-N8N-3

n8n

12 GB RAM

$6.29/mo

+VAT

  • Processor6 CPU
  • Disk120 GB NVMe
  • LocationIstanbul
  • 1G Port
  • n8n Pre-installed (Docker)
  • PostgreSQL Database
  • Automatic SSL Certificate

n8n Server — tüm paketler

Need help with setup?

Send questions about your service in a support ticket, and our technical team will walk you through it step by step.