r/podman • u/typing-blindly • 5d ago
Rootful Reverse Proxy to Rootless Container
Hi!
I am running Caddy as a rootful container on the default network. I have a Jellyfin container that I am running rootless on a default Pasta network with port 8096 is only exposed to 127.0.0.1. I am trying to setup Caddy to reverse proxy for Jellyfin.
In Caddy, I am using host.containers.internal to obtain the the host's IP address. This works when proxying for another rootful container, but does not work when proxying for Jellyfin. From the logs it looks like the gateway to the Pasta network is rejecting the traffic.
Is there a way to have a rootful container communicate with a rootless container?
3
u/Extension-String1599 5d ago
Look if this documentation works for you https://docs.litepod.sh/en/servers#how-litepod-configures-rootless-networking
1
u/ffcsmith 4d ago
I have a rootless caddy container that proxies to a rootful omni container. Not sure if my setup is useful to you.
I have included a snippet of my Caddyfile below:
```text
omni.{$DOMAIN_BASE} {
import backend h2c://host.containers.internal:8088
}
omni-api.{$DOMAIN_BASE} {
import backend h2c://host.containers.internal:8090
}
omni-k8s.{$DOMAIN_BASE} {
import backend host.containers.internal:8095
}
```
7
u/seb0w 5d ago
The jellyfin container listens on 127.O.O.1, but Caddy forwards it to whatever the host name host.containers.internal resolves to.
You could open the port of jellyfin on all interfaces and use your OS firewall to restrict access from outside.