Issue with Meta Webhook / WhatsApp Trigger using Docker and ngrok

Describe the problem/error/question

Hi everyone,
I am facing an issue with my local n8n setup.
My Environment:

  • OS: Windows 10
  • Environment: Docker / WSL
  • n8n Port: 5677
  • Tunneling tool: ngrok
    The Problem:
    I am trying to use the built-in “WhatsApp Trigger” node (or a standard Webhook node) to receive live messages from Meta (Facebook). However, the webhook doesn’t seem to trigger or receive any data when a message is sent.
    Can anyone guide me on the best way to

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):
  • Operating system:

@abode_mohamed the issue is n8n doesnt know its public url, so behind ngrok it generates webhook urls pointing at localhost:5677 and meta cant reach them. set WEBHOOK_URL to your https ngrok url in the docker env (WEBHOOK_URL=https://xxxx.ngrok-free.app), restart the container, and the WhatsApp Trigger will then show the ngrok url, register that one with meta. two gotchas, it has to be the https url since meta rejects http, and on ngrok free the url changes every restart so youll need to update WEBHOOK_URL and re-register each time. is WEBHOOK_URL set in your container right now?

Hi @abode_mohamed Welcome!
Please refer to the following:

The reply above nailed the cause: behind ngrok, n8n does not know its own public URL, so it builds webhook URLs pointing at localhost:5677 and Meta cannot reach them. The fix is to tell n8n its public address explicitly.

Set WEBHOOK_URL to your https ngrok URL in the Docker environment (WEBHOOK_URL=https://xxxx.ngrok-free.app/), restart the container, then open the WhatsApp Trigger and the callback it shows you should now be the ngrok URL. Register that one in the Meta developer portal, not the localhost one. While you are there, confirm N8N_EDITOR_BASE_URL is set to the same https URL, since some setups need both, and make sure ngrok is pointing at the same port n8n is on (5677 here, not the default 5678).

One catch worth knowing before you build on this: free ngrok URLs change every restart, so each time you restart you have to update WEBHOOK_URL and re-register the callback in Meta, and if you forget, the trigger silently stops receiving messages with no error. Fine for testing, painful for anything a client depends on. For something that needs to run continuously, a fixed domain (a cheap host with a real subdomain) removes the whole dance. Is this just for testing, or does it need to stay up?

You can solve this problem by adding the environment variables into your Docker container as the following:
WEBHOOK_URL = " "

WEBHOOK_TUNNEL_URL = " "

Then, you should specify the port number that ngrok is working at inside the Docker container

Last thing, you should distinguish between Testing URL and Production URL:
Testing URL is used when you are running the workflow as a test, but in the case of

Production URL, here you can share it with others and it’s properly working.

Let me know if you face any problems!