I’m a newbie on n8n. I’m running n8n in a docker and only have one Telegram trigger node on my canvas. I’ve created a bot in Telegram. The http://localhost:5678 works but not http://n8n.<domain name>:5678 said server unreachable. The dns was able to resolve n8n.<domain name> to my m3 mbp public IP. I disabled my firewall. What am I doing wrong?
The log output says
n8n | Tunnel URL: https://xxxxxxxxxxxx.hooks.n8n.cloud/
n8n |
n8n | IMPORTANT! Do not share with anybody as it would give people access to your n8n instance!
n8n | Version: 1.69.2
n8n |
n8n | Editor is now accessible via:
n8n | http://localhost:5678/
Here is my docker compose setup with non-relevant stuff removed.
I finally got to NGINX from a <subdomain>.<domainname>:5100 with the following steps, but I’m still getting an error “502 Bad Gateway\nnginx/1.27.3”, albeit a better error. What could be wrong? Appreciate any insight you can shed on this. I can run n8n on my M3 using “http://127.0.0.1:5678” and “http://localhost:5678”, but get this 502 error when I use “http://<subdomain>.<domainname>:5100”.
Setup
I did a port forwarding on my internet router that routes <subdomain>.<domainname>:5100 to my M3 MacBook’s port of 5678 (http://localhost:5678), which my n8n is hosted under a docker container.
I setup nginx in another docker container as a reverse proxy that routes incoming call to my docker n8n service.
I added 127.0.0.1 <subdomain>.<domainname> to my M3 hosts file. Before this step, I would get “Safari can’t connect to server” in my private network.