When I first tried running n8n on my Raspberry Pi 5 through Coolify, I hit a wall. My goal was simple:
đź’ˇ Build a money-tracking app that gets inputs from Telegram via n8n triggers.
Coolify makes it easy to “install” n8n as a service, but the default deployment had one fatal flaw for my case:
N8N_PROTOCOL=https
and WEBHOOK_URL=https://…
, n8n still generated HTTP webhook URLs internally.Bad Request: bad webhook: An HTTPS URL must be provided
.Without full control over n8n’s networking or Traefik config inside Coolify, there was no clean way to fix this.
Instead of using Coolify’s one-click n8n service, I created a custom service from a Dockerfile. This way I had full control over:
5678
)I then:
N8N_HOST
, N8N_PROTOCOL=https
, WEBHOOK_URL
, and N8N_EDITOR_BASE_URL
properly.https://n8n.leskoding.com
.Now the webhook URL in n8n was actually HTTPS.
Even after fixing HTTPS, Telegram still failed with:
Bad Request: bad webhook: Failed to resolve host
Turns out:
I fixed it by deleted the old webhook from Telegram. That’s it, good lord
This part tripped me up: you can’t just set the webhook to your domain root.
Telegram needs the exact path that n8n generates for your trigger.
Example:
First clear the old one
$ curl -s "https://api.telegram.org/bot<NEW_TOKEN>/deleteWebhook?drop_pending_updates=true"
Then set the full HTTPS path
$ curl -s -X POST "https://api.telegram.org/bot<NEW_TOKEN>/setWebhook"
-d "url=https://n8n.leskoding.com/webhook/<uuid>/webhook"
Once I did this, Telegram triggers fired instantly.
Lessons Learned
Now my n8n workflows trigger reliably from Telegram, and the money-tracking app is alive. Thanks for stopping by folks !