Jump to content

Emby server on Docker media detection


Recommended Posts

Posted

I'm running emby server using docker.  None of my files are being detected on my USB drive and I can't figure out why.  Everything I read leads to a permission error but I made a user:group and installed emby server with that UID and GID and it still can't see any files or folders past what I define in the run command.

my permissions:

root@OpenWrt:/mnt/usb# ls -l
drwxrwxrwx    1 emby     emby           958 Feb  3 00:32 Movies
drwxrwxrwx    1 emby     emby           802 Feb  2 22:39 TV
drwxrwxrwx    1 emby     emby             0 Feb  5 07:17 emby

passwd file:

emby:x:65420:65420:emby:/var:/bin/false

group file:

emby:x:65420:emby

Installer command:

docker run -d --name embyserver --volume /path/to/programdata:/mnt/usb/emby --volume /path/to/share1:/mnt/usb/Movies --volume /path/to/share2:/mnt/usb/TV --net=host --env UID=65420 --env GID=65420 --restart unless-stopped emby/embyserver_arm32v7

Docker info:

root@OpenWrt:/mnt/usb# docker info
Client:
 Context:    default
 Debug Mode: false

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 20.10.22
 Storage Driver: btrfs
  Build Version: Btrfs v6.0.1
  Library Version: 102
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk s                                                                                                                                                             yslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version:
 runc version:
 init version: de40ad0
 Security Options:
  cgroupns
 Kernel Version: 5.15.90
 Operating System: OpenWrt SNAPSHOT
 OSType: linux
 Architecture: armv7l
 CPUs: 2
 Total Memory: 495.1MiB
 Name: OpenWrt
 ID: ALEZ:FF7U:EHQX:OIOK:KTEX:OXHH:5TK6:NTW6:UJBU:DKY6:IV4E:VLTC
 Docker Root Dir: /mnt/usb/cont
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support
root@OpenWrt:/mnt/usb#

embyserver.txt

Posted

Hi, I think in Emby Server you need to enter the docker volume path of /path/to/share1 instead of /mnt/usb/Movies. Please let us know if this helps. Thanks.

Posted

I'm not understanding.  I think you may mean remove the /path/to/share1 so my run command looks like "docker run -d --name embyserver --volume /mnt/usb/emby --volume /mnt/usb/Movies --volume /mnt/usb/TV --net=host --env UID=65420 --env GID=65420 --restart unless-stopped emby/embyserver_arm32v7".  However, you might be saying I need to mount my drive to /path/to/share1.

I did run the installer command "docker run -d --name embyserver --volume /mnt/usb/emby --volume /mnt/usb/Movies --volume /mnt/usb/TV --net=host --env UID=65420 --env GID=65420 --restart unless-stopped emby/embyserver_arm32v7" and that did not help. still 0 files or folders detected.

Posted

I figured out what you were saying.  I had the 2 parameters in the --volume command swapped.  I used the volume command like --volume /mnt/usb/Movies:/path/to/share1 and inside the emby server program, I add the library location of "/path/to/share1" and not "/mnt/usb/Movies"

Posted
13 hours ago, kufkis said:

I figured out what you were saying.  I had the 2 parameters in the --volume command swapped.  I used the volume command like --volume /mnt/usb/Movies:/path/to/share1 and inside the emby server program, I add the library location of "/path/to/share1" and not "/mnt/usb/Movies"

Has this helped?

Posted

I am still working on it. Great success with my main armv8 server.

My backup x86_64 server with the same file structure has 0 files detected even though its a live mirror clone of the armv8 server.  I need another day to figure out why my x86_64 wont detect the media files the armv7 and armv8 picked up. Give me another day or 2 and I will have a write up (if you want) of how to properly run emby server on openwrt devices.

Posted

Yes, when I swapped the parameters on the volume command, it worked for all 3 emby servers I have created.  For some reason on the x86_64, I had to completely remove the emby server folder and reinstall it from scratch and then things started working properly like the other 2 servers I've created.

To install emby server from scratch on openwrt, you start by installing (or compiling) the docker and dockerd program on the openwrt device.  I was able to use stable ext4 firmware from the openwrt website only if I extended the main partition from 100 to around 256-300mb but thats not an option for devices like my linksys 3200acm so I was required to use the openwrt firmware image builder to make my own firmware with docker and dockerd installed.

Now that you have an openwrt device with docker installed, edit the data_root parameter in /etc/config/dockerd file to look like option data_root '/mnt/usb/docker' so you dont overwrite and corrupt your firmware image with docker image files. You can now enable and start (or restart) docker by running /etc/init.d/dockerd enable && /etc/init.d/dockerd start.  We can now install and run the Emby server by running something similar to docker run -d --name embyserver --volume /mnt/usb/emby:/config --volume /mnt/backup/Movies:/Movies --volume /mnt/backup/TV:/TV --volume /mnt/usb/dl/:/Downloads --net=host --env UID=27546 --env GID=65534 --restart unless-stopped emby/embyserver.  Modify your volume locations, your UID and GID, and emby/embyserver to specify which architecture you are running on.  You can now proceed to finish setting up emby at http://ServerAddress:8096.

Lastly, it says that officially Emby doesn't recommend an auto upgrade feature but I have mine configured to attempt to update at every reboot.  You can add an entry into your /etc/rc.local file on your openwrt device to include these lines which will upgrade emby upon every reboot if you choose to.  The if statement simply checks to see if your main emby folder is accessible so if your harddrive isn't accessible, the upgrade will not proceed. I stop the docker process at the very beginning of boot until my harddrive boot script can finish so docker doesn't accidentally start trying to write directly to my firmware during the boot process. Once my emby folder is found, Docker can upgrade and start.  I'm considering changing my if statement to search for one of my media folders on the same hard drive instead because if those aren't accessible, my emby files probably aren't accessible either and emby isn't going to try and automatically create a "Movies" Folder if it can't find it but it may try and create a /mnt/usb/emby folder if it is not found and that would break my script below.

/etc/init.d/dockerd disable && /etc/init.d/dockerd stop

if [ -d /mnt/usb/emby ] && ! ps | grep docker[d];
then /etc/init.d/dockerd enable && /etc/init.d/dockerd start
docker pull emby/embyserver
docker stop embyserver && docker rm embyserver
docker run -d --name embyserver --volume /mnt/usb/emby:/config --volume /mnt/backup/Movies:/Movies --volume /mnt/backup/TV:/TV --volume /mnt/usb/dl/:/Downloads --net=host --env UID=27546 --env GID=65534 --restart unless-stopped emby/embyserver
docker image prune -f
fi

Those are all of my notes on running emby using docker on openwrt.  I hope it can help someone else.

Posted

Thanks luke. You helped me fix my parents and grandparents TV.

I am signing out.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...