Configurable WebRoot

Quoting original post:

I don’t see it anywhere in the docs and it looks like (based on that the webroot is not configurable. This makes it difficult to run behind a reverse proxy (like nginx) to add SSL without having to do a bunch of fancy trickery.

See Github post for more info.


It doesn’t seem to do anything when I click the vote button, so I’m sounding off in the comments with “me too!”

+1 Voting doesn’t work for me either…

+1 Voting doesn’t work for me either…

I can’t seem to vote either. But I would really like to see this feature as well.

Is this still not a thing?

Hi, new here.

I’ve just been looking at home-assistant for my automations and this is one of my requirements as well. I’ve got several things running behind Apache with basic auth and SSL, each in its own subdirectory (including zoneminder and some little DIY apps of my own using Django).

I’d like to add homeassistant seamlessly into that mix, but that means it has to live in a subdirectory.

A quick look at the code though shows it’s not going to be a small change. The paths from root seem to be hardcoded all over the place. It’s a shame, because defines URL_ROOT which looks like it should be the right place to do it but it’s hardly used.

1 Like


I would like to see this to… I have many web apps, services that are behind an nginx reverse proxy. I would like hass to be reachable under something like “/hass”.

Currently I run it on “/” but it causes strange redirects to “/” when I want to access for example “/nodered”, which is also reverse proxied through nginx.

As the others here, I’d love this feature (for same reasons, nginx, reverse proxy, easy ssl etc’)

+1 base_url should do this…

Any progress regaring this problem?


A bit strange it is not possible for such a modern project.
As I do not have a domain, I remotely connect to my server via IP and I would want to have access through Apache reverse proxy in a sub-directory (other services hosted as well).
That feature would be awesome!.. or if anyone has any idea on how to configure apache to do so…



this would be a great feature - I’m also struggeling at the moment to get HA runnung per apache proxy at a sub-path in the url … does anyone has a workaround?

At the moment I am using a sort of workaround but this is very ugly…

in my /etc/apache2/sites-available/000-default.conf, I have placed:

ProxyPass /api/websocket ws://localhost:8123/api/websocket
ProxyPassReverse /api/websocket ws://localhost:8123/api/websocket
<Location /hass>
  RequestHeader set X-SCRIPT-NAME /hass
  RequestHeader set X-SCHEME http

  ProxyPass /static
  ProxyPassReverse /static
  ProxyPass /frontend
  ProxyPassReverse /frontend
  ProxyPass /api
  ProxyPassReverse /api
  ProxyPass /local
  ProxyPassReverse /local

Obviously that means you cannot have any other services using /static /local /api /frontend on the same server…
You also need to sudo a2enmod proxy_wstunnel

And when accessing IP/hass, it does not redirect automatically to the states page, you have to click on the link.

If someone has better, please share! :grinning:


It works! The problem I keep having is that Firefox memorise the cookies in a way that cut me access to the other services that I have on the same host but on different folders. Chrome instead seems to work.

+1 for configurable WebRoot

+1 as this is particularly useful when hass lives with other web services at the directory level. I’d love it so all my web stuff use the exact same ssl setup.

+1! Needed for nginx ssl rev proxy.

Anyone have a NGINX workaround?

Sure there is a workaround, subdomains. Nginx is more than happy to handle as many as you need.

With letsencrypt you can make as many SSL certificate as you need and you can auto renew all of them with one command.

Yeah, it would be nice to have this feature, but it isn’t likely to happen so you might as well use subdomains instead.