The extra_hosts points to my localhost and is how I reference from other docker containers
eg the Caddy included with n8n has this config for other hosted containers using this name
# another random docker container listening on port 6060
random.mydomain.com {
reverse_proxy http://host.docker.internal:6060
}
Sweet, glad to hear you figured it out. Also +1 for the caddy suggestion from @treyr. It has also become my webserver of choice for pretty much all use cases because the configuration is so much easier (and thus faster and less error-prone).
uses a self generated cert for local domains like “docker.localhost” etc (using mkcert)
does http to https redirection with entrypoints (the current best practise with traefik)
Now that the basics are OK, it is quite easy to deploy other docker containers with local FQDNs and get them routed by traefik, with matching certs etc
I have it on 2 systems right now, looks good to me. I don’t want to flood the forum with off-topic and specific configuration, let me know if I should share more details.
Some info on the current status:
n8n uses docker compose. When starting n8n, it also starts a container called “traefik” which routes traffic from port 80 to the n8n instance.
n8n/Traefik currently also handles the creation and renewal of Letsencrypt SSL certificate (Certbot).
phpMyAdmin was running on port 8080 (because port 80 was already used by traefik/n8n)
So far it worked, but now I also want to install SeaTable (a service like AirTable) on the same server. SeaTable would also be used through docker compose and it also needs port 80.
To solve this I tried installing/setting up Nginx as reverse proxy. I got n8n to work on http but not https. I was troubleshooting and trying so much stuff but couldn’t get Certbot to fetch the SSL document. Don’t know what I’m doing wrong.
Can you open a new thread as there is a lot to go through, we can of course look into the n8n side of things but configuring nginx, Seatable and Docker is going to be something you will need to handle.
As a starting point… I would drop Traefik and install n8n in docker using port 5678 then configure your nginx reverse proxy to pass the traffic from port 443 to 5678 for the domain you are using.
Configure certbot with nginx in the normal way and you are good to go, for the other applications install them and don’t use port 80 / 443 on the host for them and instead configure nginx to handle it. Once you have one service working it is pretty much just a case of copy / pasting the config items.