Mounting of the / media folder in docker

Hello,

Home Assistant 0.115.1
Multimedia browser
configuration of the / media folder in docker

my volume configuration in docker:

Volumes:
Host / volume Path in container
/ usr / share / hassio / ssl / ssl
/ usr / share / hassio / share / share
/ usr / share / hassio / audio / asound /etc/asound.conf
/ usr / share / hassio / homeassistant / config
/ usr / share / hassio / media / media
/ etc / machine-id / etc / machine-id
/ usr / share / hassio / tmp / homeassistant_pulse /etc/pulse/client.conf
/ usr / share / hassio / audio / external / run / audio
/ run / dbus / run / dbus
…
/ media link on / usr / share / hassio / media
…
but with video, movie in the / usr / share / hassio / media folder

I don’t have any media files seen by Home Assistant

Thanks for your help

Almost same problem there.
I can find the media folder and add a “music” folder in it. Can also add .mp3 files in this music folder. But unable to see the music folder inside Home Assistant when chromecast browsing…

I run HA Core in a Docker Container on a QNAP NAS, and I just assigned the host volume (where my media files are located) to the mount point /mediainside the container.
After a restart of the container, all my media files appeared as a browsable structure in all my media player devices.

Thanks for your reply.
Can you explain how to assigne the host volume ?

Well, as part of the Container Station GUI (made by QNAP) the process of creating a container allows me to simply browse the folder tree structure on the physical volumes until I find the folder I’m looking for.
But I guess you’re not using a QNAP, so I cannot tell you exact the syntax to use either from command line or using a YAML install script.
But my point is that you just have to create symbolic link between the internal folder /media and the physical external volume/folder path to your actual media location.
You should have a similar link for your /config folder ?
(If you use hass.io I have no Idea how this is done)

Hello,
I created a symbolic link >>
from my media folder on / usr / share / hassio / media
delete the media folder before which gives
ln -s /my patch my media path /usr/share/hassio/media
which is given to me:
sudo ln -s /mnt/usb2T/Film /usr/share/hassio/media
on the other hand other problems:
only .avi and .mp4 files are displayed .mkv files do not appear
and only playing .mp4 files works
Please excuse me for the English but I’m translating from French to English with google

I haven’t tried it yet, but wouldn’t it be simply adding -v <full path of music folder mounted or local>:/media to the docker run command?

What I’m still wondering and nobody answered yet. Is Hass indexing the media folder? I.e. if you include a huge collection what will be the impact on performance?

1 Like

that´s the solution :slight_smile:

How to change the media folder path?

I have installed Homeassistant supervised on raspberrypi 4b running on Debian

I have tried this but it points to the media folder inside homeassistant docker where as I have my media folder at /home/mymedia so how can I change the the default media path?

Kindly guide


  media_dirs:
    mymedia: /home/mymedia

You must mount the desired folder in the docker container. Read only is enough for playback

Can you plz guide how do I mount the desired folder in docker. I am very new to all this. Would really appreciate your help

Just add the line in your docker configuration, in a docker-compose/portainer it would look like this:

    volumes:
      - /your_local_path/to_config:/config
      - /your_local_path/to_media:/media:ro

If you use a Docker Run command, the parameter would look like
-v /your_local_path/to_media:/media:ro

The :ro behind media stands for Read Only, not mandatory but a safety if you only want to use Home Assistant to read your media

1 Like

Thank you for your reply. I have installed Homeassistant supervised on rpi4 using the instructions from GitHub - home-assistant/supervised-installer: Installer for a generic Linux system

Could you please guide me where would I find the docker configuration file that is needed to be changed… I am very new to all this.

Kindly guide.

Ha… That’s not a Docker (Container) setup, it’s a supervised setup.
I haven’t ever set that one up so not sure I can help. Sorry