This is a project that puts Plex inside a container and is specifically designed to work with this Traefik project.
- Docker
- Docker Compose
- A linux box to deploy to ;)
-
Pull down the repo and change into the project directory
git clone https://github.com/sonofborge/dockerize-plex.git plex && cd plex
-
Create and modify
.env
for your needs.cp .env.example .env
Note:
You will need to generate a plex claim code to add to your
.env
file, which can be done at this url. -
Run Docker Compose
docker-compose up -d
If all went well, you should now be running Plex inside a container behind your Traefik reverse proxy.
Assuming you are using Network Attached Storage (NAS) to house the content you want Plex to serve, you will need to make some additional changes to the host in order to share that content with the Plex shared volume.
-
Enable Network File System (NFS). For OpenMediaVault, assuming you've set up shared folders, click on Services > NFS
-
Next, click on Shares then click the Add button.
-
Fill out the form. Select the Shared Folder you want available to the server and enter the server IP under Client. Privilege should be "Read only". Under Extra options, add
subtree_check,insecure,no_root_squash
.
-
Ensure that the
nfs-common
library is installed. If not, install it.sudo apt update && sudo apt install nfs-common
-
Now we need to edit
/etc/fstab
and tell it where it can find the network shared folders. Add the following line, substituting the NAS local IP and the name of the shared files:... 192.168.1.<XXX>:/export/<share_name> /media/nas/<share_name> nfs auto,defaults,nofail 0 0
Add as many shares as that you want Plex to have access to, save, and exit.
-
Next, make the
<share_name>
files on the Host system, otherwise it will complain that the directory doesn't exist:sudo mkdir /media/nas/<share_name>
-
Finally, mount the drives.
sudo mount -a
Your media should now be shared with the docker volume and available on the host at /media/nas
.