My host proxy could not resolve a Docker service name
Jellyfin worked when I opened its port directly. Going through Caddy gave me a 502.
I had Caddy on the Ubuntu host and Jellyfin in Docker. In the proxy configuration, I used jellyfin:8096 as the upstream. That name made sense inside the Docker network. Caddy wasn’t inside that network.
After getting Caddy to serve the site, I had added another connection to the request path. The browser now needed to reach Caddy, and Caddy needed to reach Jellyfin.
Where the name exists
The arrangement looked like this:
Browser -> Caddy on Ubuntu host
|
| resolve name and open connection
v
Jellyfin in Docker
Docker network:
service name "jellyfin" -> Jellyfin container
Giving a Compose service a name doesn’t automatically add that name to the host’s DNS. Another container on the appropriate Docker network can use it. A process on the host needs a destination it can resolve and reach from there.

Illustration: different address books for the same destination.
I also tried docker inspect caddy. That failed because there was no Caddy container to inspect. I was asking Docker about a service that systemd was running on the host.
The placement matters twice: when choosing the upstream address and when choosing the tools to inspect the proxy.
Two observations narrowed the failure
Direct access to Jellyfin on port 8096 worked. Caddy was listening on ports 80 and 443, and its response was a proxy error.
That gave me a smaller question than “why doesn’t the server work?” I needed to check the upstream from the environment where Caddy ran. Testing a service name from a container would answer a different question.
Correcting the proxy destination to a host-reachable address, followed by clearing the browser cache, got the Jellyfin subdomain loading.
There was a separate setup detour around Compose. The installed Docker supported docker-compose, while docker compose wasn’t available as expected. An attempted plugin installation also failed with the configured package repositories. That needed its own correction; it didn’t explain the later proxy error once the Jellyfin container was running.
The other 502 had a different cause
The root site still had a route pointing at an API on port 8080. I hadn’t built that API yet.
That produced another 502 and another round of troubleshooting. But an address can be perfectly reachable as a machine while there is no application listening at the selected port. There was no backend to repair there.
I needed to keep that future route out of the working setup until its application existed. The Jellyfin fix couldn’t make an unrelated, unimplemented API start responding.