Media folder location?!

I can’t seem for the love of god seem to figure out where the “new” media folder is located.
I’m running HassOS.
My testing tells me it’s not;

  • At the “actual” root; /media - this folder already has “cdrom”, “usb”, and “floppy”
  • At the /root; this is where I see addons, backup, config, share, and ssl.
  • At the /root/config; there’s no folder in here called media.
  • At /home/hassio - that folder is just empty.

The information here must be wrong - if that suggests the first point in my case.
I tried creating a new subdirectory and setting a media_dirs: to that folder but then I get this error;

not a directory for dictionary value @ data['media_dirs']['media']

Why can’t the media tab just show where it is located? Why do we have to guess?


I had the same problem in my Home Assistant installation. To fix this, I created a directory titled “media” in my config folder.

For the configuration I used

    media: /config/media

For some reason the media directory in the root folder would not work whatsoever so I had to declare it myself.


I think it’s just on HassOS that it was assumed it would work flawlessly for all, so there is no real mention of location.

    media: /config/media

Thanks, man! This should be in the official documentation!

1 Like

I can confirm this was the only way I was able to get this to work and I spent hours trying multiple configuration options. The only way it worked was when I decided to user a different folder as suggested by @jaxonstagecrew and add media_dirs to my config.yaml. I tried just using a different folder without editing my config.yaml and it did not work.

It is. In two different locations.

So what is the conclusion? For hassos we have to use the /config/media folder for this? If I want to use /mnt/media, it won’t work?

None of those mention /config/media

1 Like

It seems the documentation is not up to date or is incorrect.
It shows that an external directory like /mnt/recordings can be specified but that’s incorrect. You can only specify directories within the directories that are mapped on the docker process as volumes. I see the following volumes mapped on my homeassistant docker process

[email protected]:/mnt$ docker inspect -f '{{ .Mounts }}' homeassistant
[{bind  /etc/machine-id /etc/machine-id  ro false rprivate} {bind  /usr/share/hassio/tmp/homeassistant_pulse /etc/pulse/client.conf  ro false rprivate} {bind  /usr/share/hassio/audio/asound /etc/asound.conf  ro false rprivate} {bind  /run/dbus /run/dbus  ro false rprivate} {bind  /usr/share/hassio/homeassistant /config  rw true rprivate} {bind  /usr/share/hassio/ssl /ssl  ro false rprivate} {bind  /usr/share/hassio/share /share  rw true rprivate} {bind  /usr/share/hassio/media /media  rw true rprivate} {bind  /usr/share/hassio/audio/external /run/audio  ro false rprivate}]
[email protected]:/mnt$

If I am incorrect in saying this , please correct me.

Is there a way to use a USB stick as the media source?

is there a way to add a PC folder or Synology folder as the media source?

For anyone who comes across this and is looking to use external urls for notifications like I was here’s a few pointers. Just like the OP says, the documentation is terrible and I spent hours on this.

I have Core/OS on Rasp Pi. That makes a difference per the documentation. So don’t follow my instructions if you have a containerized version.

First you need to create a media folder in the config folder. This would be root/config/media. If you use visual studio or file editor you can’t get to root. The easiest way to know you’re in the right spot is if the configuration.yaml is in the same location. That’s where you want to create the media folder.

The OP states that he made the following change:

However if you do this then your relative URL will be /media/media instead of media/local. Per the instructions here you should make this local like so:

    local: /config/media

Make sure that you put /config/media otherwise your root/media folder will be used. The official documentation that I linked only says /media. While I was able to get the media browser to show files in root/media it’s not a very accessible location should you need to make changes.

When linking an image, video or audio clip to a notification you should only put the relative URL only. So if you wanted to send an image to your mobile you would do so like this:

image: "/media/local/image.png"

For the media folder you DO NOT need to add allowlist_external_dirs as others mention.

Lastly, even though you can be logged in through your local browser to home assistant, the URL path will fail without the authSig key. Since one is not generated when you copy/paste the URL in the browser you will not be able to access the media folder without using the built in media browser. So DO NOT test the media folder access using a URL directly in the browser. It will fail.

Hope this helps anyone who comes across this.

I am still going nuts with this issue. I have just changed the config - I hope - to what you have suggested above:

  • configuration.yaml
  customize: !include customize.yaml
    local: /config/media

I tried to change configuration.yaml folder back to

    media: /config/media

I still cannot browse the media. Correction: I just realized that the Media Browser is specific to a media player. I can conform that I can see the media in the Media Browser for the Google Mini’s but not for the Sonos players.

However, when I go to the media players, I can select and play the sounds on my Google/Nest Mini’s

However, if I try to select media from one of the Sonos media players I get an error.

I am at my wits end!!! Any and all help will be greatly, greatly appreciated.