NAS + Pi Plex Server


I recently bought a NAS for my home network due to my old external HDD eventually failing. In the NAS sits 2 3TB hard drives in a RAID setup so I have 3TB of overall storage, more than enough. I wanted to be able to access all of my media anywhere in the house and on any device.

To save on some money I bought myself a NAS that only had the basics that I would need, file storage. However, it turned out that I needed a Plex server to allow some of the network devices to access the media e.g. an Amazon Firestick. Incomes the Raspberry Pi to save the day.

The Raspberry Pi runs Hypriot OS. This is a lightweight OS dedicated to running docker containers. So you guessed it, I am running Plex in a docker container. The setup was relatively easy, however, there were a few hoops I had to jump through to get the image working properly.

The docker-compose file is fairly straight forward with nothing particularly fancy in it:

version: "2"

services:
  plex:
    image: jaymoulin/plex:latest
    container_name: plex
    restart: always
    volumes:
      - /media/:/media
    network_mode: host

To access the media inside the flex container, I needed to mount the media folder on the Pi and then pass it through as a volume (as seen on line X). This meant adding an entry into the /etc/fstab file. This means that whenever the Pi boots up, it mounts the NAS folders. In the following case my NAS is located at 192.168.1.143 and the Film share is located at “/volume1/video/Films”.

192.168.X.XXX:/path/to/Films /media/Films nfs nouser,atime,auto,rw,dev,exec,suid 0 0

Finally, I had to set up the actually Plex account. For the first login I had to make an account with Plex (I used a temporary email address as I didn’t need the account afterwards). Once I had a Plex account I could log into the Pi. Now in, I had to disable the login for local devices, meaning I wouldn’t need to have a Plex account to login

Give the Pi time to index your library. This can take a long time depending on the size but it took well over 2 hours for my Pi to sort itself out.