I’ve installed Hass.io on my Raspberry Pi 3 and I like it so far.
My instance is configured with HTTPS using Let’s Encrypt.
I’m trying to put some static documents (images) on it to be served by the http(s) server.
I’m not sure where the www folder should be. Documentation states it should be in the .homeassistant configuration folder but there is no .homeassistant folder with Hass.io. I tried to dump it in the /config folder (/config/www) but no joy.
It was working all along I just didnt know it. I was going to https://my-ip:8123/local and expecting to see a directory of files, but got 403 forbidden instead. I finally just went to https://my-ip:8123/local/file.mp3 and it worked.
I’ve found this place looking for answers. It was not working for me (manually created the www directory, but could not find the content by calling …/local/…
Turns out that with hass.io a restart of the HA instance is necessary in order to see that data.
I have not looked into the details, but it might be that upon starting, the core container copies the content of the configuration (and the www directory) into the container…
I have followed all these instructions: created “www” folder in the config file, placed JPEG files in folder; I still cannot get the files to show up by calling …/local/… and cannot get the images to work with my device tracker image. Any help much appreciated.
In the hass.io environment, you are correct with the /config/www. Remember in your coding that to address it, HA is looking for /local for that directory.
It worked for me.
Just to clarify, after creating the “www” folder inside the “config” folder, the “testfile.txt” is accessible through the URL: http://localhost:8123/local/testfile.txt
I have a Home Assistant OS installed in a LXC in Proxmox and as far as I can tell the directory it is running in is: /root/.homeassistant/
In this directory there is no config/ directory but I created it and in here created the directory www/. In this directory I created a file: test.txt.
In the Home Assistant settings I rebooted Home Assistant.
When going to http://my.ip.address:8123/local/test.txt it says 404: not found.
For future readers, in common parlance, “/config” or [config] refers to your homeassistant configuration folder, usually ~/.homeassistant or /homeassistant or wherever your configuration yaml files live. The folder “config” is not an actual folder.
Place the “www” folder in your homeassistant configuration folder directly.