Docker bridge network can access docker host?

I am using HA with host network mode and Jellyfin with bridge network mode with the appropriate ports forwarded in the docker compose file. It’s all running on an Ubuntu server 22.04 with docker installed according to the installation guide on I wanted to setup webhooks, so I added one in HA and put the webhook address (same IP that I can use to access HA/Jellyfin) into the jellyfin plugin settings and made it working. But then I realized that Jellyfin is in bridge mode, so it’s not supposed to be able to connect to the host machine.

I was trying to find it in the documentation/google, the closest I got was, but I don’t have that added in my docker compose file. I’m using the image for jellyfin, don’t know if that matters.

Could someone clear this up for me?

Mmm… Yes it is. It cannot connect to other bridge networks, but it can talk to the host.

Beware that this is windows and mac only (and host.docker.internal, actually)

As of recent docker, you can add a mapping to your docker-compose on Linux to achieve the same.

      - "host.docker.internal:host-gateway"

So the extra_hosts setting is only for mapping that URL to the correct IP but the IP can be used without any extra settings?

Yes, but you can get no guarantee that the bridge IP network will be the same between docker compose instantiations, hence using a symbolic name is quite a must.