emby in docker -- run container with unmounted share

  • Hi,

    I figured out to setup emby running as a docker container.

    I've added videos and tvshows via a SMB share. I followed the mount/automount how to in the wiki to make this happen.

    Doing the mountpoint settings in the emby-docker-addon via the file manager did not work out..

    Music was added via a local folder.

    Emby is working perfectly fine.

    But when I boot LE without having the NAS providing the SMB shares, I get errors showing up in the LE splash screen mentioning that the mounts are missing.

    Although LE goes over that and boots just fine, the emby container doesn't start.

    Did I do something wrong with the automount? The wiki sais that there shouldn't be errors. :/

    https://wiki.libreelec.tv/how-to/mount_network_share


    I need emby to work without the SMB shares, as I want to stream music offsite.

    Sorry if it is a stupid question. I still have a long road to go understanding Linux.

    Edited once, last by Bub4 (September 9, 2023 at 2:00 PM).

  • Hi Again,

    I came a bit further.

    My automount is working properly.

    The emby container however seems to forcing LE to mount the SMB shares while booting, which ends up in errors. The container can not start in this condition.

    The system boots + the container starts just fine, when I switch off the mount points to the shares in the container settings.

    I would be glad if anyone has an idea to possibly get around this.

    Is it possible to make a continuous and updating "link" from the source files (shared files) to local LE folders?

    My dream is to use emby for kodi at the end as the media management is way easier with emby.

    btw. I tried the beets container as well and its brilliant. Music scraping has never been easier.

    Thanks to Linuxserver.io for providing those docker containers. <3

    Thank you

  • I would investigate using systemd to locally mount the remote SMB shares so they become part of the local filesystem; instead of using the SMB clients in Kodi/Emby. The advantage of this approach is you can configure startup/shutdown dependencies; i.e. the systemd service for the Emby container (or Docker as a whole) can be tweaked to depend on the SMB mount being active first.

  • Hi chewitt thank you for supporting me.

    I think I've done this via systemd already. Or do you mean something else?

    I've created two SMB mounts and two corresponding automounts.

    Example for the first mount:

    storage-videos.mount

    storage-videos.automount

    Emby Container Settings:

    I have two SMB share mount points (videos & tvshows) and two local mount points (Kids and music).

    If I got you right, I can't have the best of both worlds...? Reads like the container can only work properly if the SMB share got mounted successfully...?

    Or can the automount task set behind the docker task to evade the triggered access attempt of the container? But it doesn't care when the access attempt takes place, does it? If the NAS is offline during the container start, the share can't be mounted. Just thought, that the emby container sees the local folder as an empty folder if the share isn't mounted. I mean - the container also starts with regular empty folders...

    Side node - what I want to achive:

    I want my NAS only running, when we watch movies or tvshows and not 24/7. Daily music (offsite) streaming of my library content shall be handled by emby running on the lower power cosumption LibreELEC NUC.

    The "emby for kodi" addon would be another highlight for me

    Thanks again for your input!!

  • If the NAS supports WOL and some form of scriptable sleep/shutdown command it might be possible to create a startup script that sends the magic packet to wake the NAS and delay Kodi/Emby start until SMB shares are online, and to then send a shutdown command when the HTPC device is turned off. Neither app supports "If NAS source is online use config A, if NAS source is offline use config B" logic; they both expect a single configuration and for that config to be valid. The systemd suggestion simply allows scheduling logic (and scripts) to be used that ensure sources are available before Kodi or Emby container start. I'm not sure if you'll find any howto or prior art for WOL in the forum; it's not a thing that comes up often and most folks ultimately accept that NAS devices are designed to be used in an always-on state.

  • I understand.

    Just hoped, that there is some sort of workaround.

    When the automount ist disabled, the container starts just fine with all the scraped movie and tvshow info in the cache. They are obviously not playable, but they are there and could be used for the emby for kodi addon. So preventing Docker/the container from triggering the automount would be sufficient in theory.

    Well, having the 4 HDDs NAS powered on all day long would be a waste of power. Therfore I am looking to work around that. I might be a little strange in that respect.

    I will work on a remote switch for home assistant to trigger a script via SSH for mounting//unmounting the shares.

    Thank you VERY much for the great support you are doing here in this forum!!!

    Edited once, last by Bub4 (September 10, 2023 at 9:37 AM).