r/podman•
RadicaIEd

Rootless container: access host vHosts via host.containers.internal?

Hey,

I'm trying to access HTTP resources from within a rootless container running on the host, but the setup relies on VirtualHosts (vHosts).
When I try to call http://host.containers.internal, I get the wrong virtual host/resource.

Is there a way to assign additional hostnames to host.containers.internal, such as sub.domain.tld?
I've tried using the AddHost option within Quadlets, but it only accepts IP addresses (AddHost=sub.domain.tld:host.containers.internal doesn’t work).

Currently, I’ve identified two workarounds — neither of which seems ideal:

  1. Enable Network=slirp4netns:allow_host_loopback=true. With this, I’m able to reach http://sub.domain.tld, but using slirp4netns prevents defining a custom network.
  2. Set AddHost=sub.domain.tld:169.254.1.2. The IP address works, but it’s static and may change between setups or Podman versions.

Has anyone found a cleaner solution to achieve this?

Posted Nov 9, 2025, 9:00 AM UTC

32
Loading comments…