Happily running my n8n 1.31.2 behind traefik and many more containers. All working.
Except for one curious issue:
When starting up n8n, it tells me my instance is reachable via my external domain + internal n8n port. Is there an option to let n8n know its behind a proxy and skip showing me the internal port?
docker compose logs show:
n8n | => Started
n8n |
n8n | Editor is now accessible via:
n8n | https://auto.domain.tld:5678/
Why it should?
You have set the variables, so it builds the URL based on them. It doesn’t bother itself with something in the front and what ports that front uses (because it doesn’t affect the n8n’s work at all). Moreover, it may not even know if there is something like ALB or reverse proxy.
Well, I get what you are saying but usually, there are internal and external settings (judging by the containers I have seen so far).
I wasn’t even sure if I need to set these to the external values: https,443 or the internal ones http,5678
- N8N_PROTOCOL=https
- N8N_PORT=5678
It was unclear, if these are “internal” values meaning if I change them the container changes its behaviour or if they are “external” meaning the way I actually reach external domain.
It may works with default settings, but there might be an issue with a non-secure channel and authentication errors arise.
When you set the protocol/port to https/443 it means that n8n listens on that port via the secure channel. So the traffic from reverse proxy to n8n will be encrypted (as well as the internal traffic). When you leave the default settings (http/5678) it means that traffic from the reverse proxy will go via the unencrypted channel. But it has nothing in common with traffic from the end-user to the reverse proxy. So technically an end-user does not interact with the n8n directly
I think that is one of the reasons why there are no “external” settings. To not confuse people
Ok, thanks for explaining what those two settings are meant for.
On the other subjects about internal settings and external ones and such, we have to agree to disagree.