HA not working behind Reverse Proxy using paths

Similar issue to this one from 2 years ago: HA behind NGINX reverse proxy strange behavior with domain/route URL

I try to put HA behind a Traefik reverse proxy using “/hassio” as path for the service.
The page comes up almost empty (just the blue bar) because all subsequent requests to load resources are missing the “/hassio” path prefix.

IIRC,in 0.110 the external_url and internal_url properties were introduced to replace base_url. But the path part seems to be ignored anyway.
I tried to set internal_url and external_url to “https://hostname/hassio” but nothing changed.

Shouldn’t this be configurable somewhere?

You can’t use a path.
https://www.home-assistant.io/docs/configuration/basic/#external_url

You can use a subdomain though (that’s what I do).

Thanks for the info. I somehow missed that restriction in the docs.

It would be possible for Traefik to remove the /hassio path before forwarding the request, but apparently HA is not evaluating the X-Forwarded-Prefix header as well that would allow HA to build correct resource URLs.

I know that subdomains work ootb, but for LAN-only use this is not really intuitive as you’d have to run a local DNS server for your network to point to the host running traefik.

1 Like

Dear all,
I’ve had the same problem, and decided to fix it. I have a first version of a webroot reverse proxy working. There still are a few missing replaces here and there to ensure all links goes through the webroot. Feel free to fork or make PRs

I’ve added some samples to make it work.
Cheers,