Why n8n deregister the webhooks from DB on shutdown and register them again on start? Is there any specific reason ?
I am really curious to know because if we have n no. of triggered workflows, will it not creating extra overhead to delete and add the webooks again?
This is because your instance URL or webhook path settings could change between restarts, and the logic you have described accounts for this possibility. You can set the N8N_SKIP_WEBHOOK_DEREGISTRATION_SHUTDOWN
environment variable if you want to prevent this behaviour.
I checked about this env variable. thanks for confirming.
Do we have a way with this environment variable = true to delete and register the webhooks again ?
Yes, this variable only affects the shutdown logic (meaning webhooks will no longer be deregistered when shutting down n8n).
You can still deregister the webhooks used by n8n trigger nodes by deactivating your workflow (and register it again by activating your workflow).
I want to ask about the case when this env variable is true and I change the webhook path or instance url and restart the instance.
is there any command I can deregister and register or update the webhooks on third party systems for all the triggered workflows ?
is there any command I can deregister and register or update the webhooks on third party systems for all the webhooks ?
Not that I am aware of. I suppose the easiest way would be to temporarily change this variable, re-start n8n, then update the variable once again.
thanks alot for confirming. I was thinking the same
You’re most welcome!
is this N8N_SKIP_WEBHOOK_DEREGISTRATION_SHUTDOWN env still active because it cannot be found under: Environment variables reference | n8n Docs