Bitwarden (Version 2023.9.2, docker) self-hosted behind traefik - upstream timed out

Hi

I installed traefik with latest image and added my self-hosted bitwarden. The basics like registration, login and so on are working.

My problem is with all things “mailing”.

When i try to login the fist time, i get an unexpected error and the following nginx-error.log is written:
2023/10/23 18:17:01 [error] 44#44: *3502 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.18.0.2, request: “POST /identity/connect/token HTTP/1.1”, upstream: 172.29.0.5:5000/identity/connect/token"

172.18.0.2 is the traefik-container within the traefik-network.
172.29.0.5 is the bitwarden-identity-container within the docker_public-network.

The second login is ok. When i click on “verify-mail”, i get an unexpected error and the following error.log is written in nginx:
2023/10/23 18:18:43 [error] 44#44: *3502 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 172.18.0.2, request: “POST /api/accounts/verify-email HTTP/1.1”, upstream: “172.29.0.3:5000/accounts/verify-email”

172.29.0.3 is the bitwarden-api-container within the docker_public network.

(i had to delete some http-links within the error.log, because as a new user i can only add 2 Urls)

My docker-compose.override.yml is as follows:
version: ‘3’
services:
nginx:
labels:
- traefik.enable=true
- traefik.docker.network=proxy
- traefik.backend=bitwarden-nginx
- traefik.http.routers.bitwarden.entryPoints=websecure
- traefik.http.routers.bitwarden.rule=Host(“sub.domain.com”)
- traefik.http.middlewares.strip.stripprefix.prefixes=/
- traefik.http.routers.bitwarden.tls=true
- traefik.http.routers.bitwarden.tls.certresolver=lets-encrypt
- traefik.http.services.bitwarden.loadbalancer.server.port=8080
networks:
- proxy
networks:
proxy:
external: true

It seems as if bitwarden is trying to reach verify-mail or the identity token via traefik, instead of the backend docker_public-network.

I can’t find any solution. Anyone got an idea?

Thanks!

I found the solution in the mail configuration (global.override)
The problem: My mailserver is a docker container on the same server. Even though i used my “external” DNS mail.xy.com. This leads to these unspecific symptoms.
My solution: I created an external mail-address.