Use webhooks locally in n8n

Use webhooks locally in n8n

You can easily test n8n webhooks on your local environment by running n8n in tunnel mode. This will give you a webhook url that is accessible outside your computer. It's very simple, start n8n with the option --tunnel If using npm or docker run command, simply add --tunnel at the end of the run command eg: docker users: docker run -it --rm \ --name n8n \ -p 5678:5678 \ -v n8n_data:/home/node/.n8n \ docker.n8n.io/n8nio/n8n \ start --tunnel for npm users: n8n start --tunnel If you are using docker compose: add the following line in the docker compose file. command: ["start", "--tunnel"] I find it very convenient that, Once you run in tunnel mode, all your existing webhooks will be switched to the new tunnel url, and when you come out of it, it will go back to the localhost url. What I have noticed is that the webhook url remains same even if you restart the n8n instance.