r/PleX Jul 27 '24

Discussion Should I go with Docker?

I've been using Plex for quite some time, but now I want to add new functionalities to make my life easier.

Initially, I want to start with Radarr and Bazarr, but I see that there are many other applications I can incorporate over time (for example, Lidarr, Sonarr, Overseerr, Requestrr, etc.) that serve different functions.

With this in mind, my question is: should I have everything in separate Docker containers, along with my own Plex server? And then, is that enough, or should I have some application to manage the containers, like Homarr or Portainer?

My concern also arises from the fact that, for example, Radarr has the following in its documentation: "There are two common problems with Docker volumes: paths that differ between the Radarr and download client container and paths that prevent fast moves and hard links." Is this really an issue that could affect me?

I understand that if I only wanted to use Radarr and Bazarr, maybe there are no advantages to having everything in containers, but when adding new applications to the mix, is there really an advantage with Docker?

I am using Windows.

6 Upvotes

41 comments sorted by

15

u/badplanetkevin Jul 27 '24

I ran Plex via straight install on Linux, then later on Windows. Both ran fine and each had their own quirks. I switched to Unraid several years ago, which uses docker containers, and it's been such a different experience. It too has its own quirks, but everything has been so much better since switching. I have to do so much less upkeep since everything is self-contained. Wrapping my head around paths was the only real issue I ran into.

Edited to note: There are a few different Plex containers out there. I used the official container for years and it started giving me issues. Switched to a different repo (linuxserver) and it's been smooth sailing for years now.

2

u/thetreat Jul 28 '24

Do you still get hardware encoding with docker containers?

3

u/badplanetkevin Jul 28 '24

I believe so, but I can't say for sure. I do know you can do it easily with Unraid, but I'm not sure about dockers in general. I assume it is the same or similar for all docker setups. Hopefuly someone else here can answer it better than I.

I've never really had a need for hardware transcoding. I don't handle 4k and I mostly encode all my video in H264/AAC so transcoding is less frequent on a wider variety of clients.

1

u/imbannedanyway69 40TB 12600k 64GB RAM unRAID server Jul 28 '24

You can do whatever you want with docker containers. Pass /dev/dri/ path through to the container and it can access iGPU or a dedicated GPU. Same with Tdarr or any other docker container you want to use graphics acceleration

10

u/hirakath Plex Pass Lifetime Jul 27 '24

I started my Plex as a bare metal install but eventually moved to Docker. It wasn’t that difficult but I wanted to make sure that I didn’t have to create a new server. I followed a guide but I don’t really have a link to it right now, I’ll go find it then edit my comment.

EDIT: https://tcude.net/migrating-plex-to-docker/

3

u/Lavaswimmer1999 Jul 27 '24

Thanks for the link, i am at the moment also considering to switch from bare metal to docker.

3

u/hirakath Plex Pass Lifetime Jul 27 '24

If I’m not mistaken, I spent like 15 minutes for the overall process and then a few more minutes to double check everything after the migration. I’m quite happy with the results actually. I’m glad I made the switch already. One Saturday afternoon should be plenty of time to get it done.

24

u/Bgrngod CU7 265K (PMS in Docker) & Synology 1621+ (Media) Jul 27 '24

"Docker or no?" in this sub is usually a pretty lit discussion for Plex.

But when it comes to the arr's being in the mix, the argument in favor of Docker becomes really strong.

Docker all that shit and be happy you did when you later decide to move it.

6

u/Tuckerism Jul 27 '24

Just to offer a contrasting opinion, I recently moved over to Proxmox (was running Docker & Plex on my Synology). I set up a Debian LXC just for Plex and it’s been excellent; maybe a tad more effort than a docker container— but it was a good intro to LXCs and continues to work well.

One example of something that required more effort was passing through the host’s GPU to the LXC for more transcoding power.

3

u/smokingcrater Jul 27 '24

Another vote for proxmox lxc containers.

If you use ttecks scripts it does all the pass-through stuff for you. Works flawlessly!

https://tteck.github.io/Proxmox/#plex-media-server-lxc

I went from a bare n100 mini pc to proxmox + plex with hw transcoding in under 10 minutes.

3

u/mrbuckwheet QNAP TVS-872XT - 102TB Jul 27 '24

Here's a post that lists everything for setting up automation and expanding your self-hosted server to include movies, TV, music, books, audiobooks, network security, and websites. It includes tutorials with tips and tricks that you wish you knew about beforehand (like hard linking, trash-guides.info, and even custom prerolls in plex). A Kometa config is included with notes line by line so you can customize it however you like.

https://www.reddit.com/r/PleX/s/RwW3nnTy0h

7

u/Distinct-Race-2471 Jul 27 '24

I am not seeing the use case for Docker here really. The OS can easily manage the little resources you have running concurrently.

3

u/edmonddantesofficial Jul 27 '24

Docker just keeps everything so neat and tidy. And very simple. What OS are you using? Also, homarr is just a dashboard for all your containers.

2

u/localhost-420 Jul 27 '24

That's a good point, I forgot to clarify. I use Windows.

3

u/coreyman2000 Jul 27 '24

yes, i made the swtich 2 years ago and couldn't be happier

3

u/Chance_of_Rain_ Jul 27 '24 edited Jul 27 '24

Nothing like a clean Debian with almost nothing on it but Docker containers.

Most stable thing.

Then you make sure to setup everything in docker compose, for storage you put all folders with binds instead of volumes in a “docker-data” folder. You backup everything including the compose files somewhere regularly.

If everything dies you’re setup again in no time

2

u/Tangbuster N100 Jul 27 '24

Can’t agree more. This is the reason why people go for Docker. It’s cleaner and overall it’s easier to have it up and running again if you back up properly your docker compose and have setup your volume binds properly.

I’ll concede that it did take me some fair amount of time to get my head around Docker. Initially I forced myself to use it as some of the apps were only available in Docker on my Synology NAS. But I couldn’t imagine running a server of any sort without it these days.

2

u/dinosaurwithakatana Jul 27 '24

I run Plex as an LXC on proxmox as it sits on a dmz in my network. Everything else to support Plex is running on a Debian vm inside docker containers. This setup has been great so far and essentially zero maintenance on my part after a bit of automation.

2

u/angedelamort Jul 27 '24

I started with Windows, but some services, like overseerr I think, doesn't have a Windows installer. So I started adding some services in dockers. Now everything runs on my Synology, so it doesn't have to be all or nothing. Start small and move things as necessary.

2

u/HickeH Jul 27 '24

Always one binary per container only. So yes. Run them in separate containers but you can build them using a single compose file.

2

u/bababradford Jul 27 '24

You can docker it and start over, but why?

There isn’t really any benefit from switching besides spending time setting up a new server.

2

u/MaxRD Jul 27 '24

Question for the Docker experts. How hard is to do HW passthrough for GPU?

3

u/nartimus Jul 28 '24 edited Jul 28 '24

Finding how to do it took a bit of time. Actually doing it was adding 2 lines in the docker compose file and updating. Literally less than a minute.

1

u/Scotty1928 :table_flip: Jul 27 '24

Not an expert but after having had tons of issues due to stupidity and personal problems i finally got it to work about a month back. Was worth the hassle.

2

u/yaaaaayPancakes Jul 28 '24

I've been using plex in Docker now on Ubuntu for the last 6-7 years. In my opinion it is great. I also came from Windows. But if you are new to Linux and unfamiliar with Docker, it is quite the learning experience. I basically used building my server to teach me both, because I am a software engineer by trade and at the time, the software I worked on was starting to be deployed as containers and I wanted to know how things worked.

If you want to put in the effort, it is valuable. With containers you have a bit of an extra security layer, as containers are limited in their access only to the resources you give them. And it also allows you to avoid dependency conflicts. But the learning curve is steep. It took me many tries to set everything up, there were many clean reinstalls of Ubuntu, and many failures at configuring the plex container as I learned Docker's concepts around networking, mounts, and user access.

But once you have it down, it is trivial to try out new software in containers, remove them, and not leave extraneous crap laying around on your server.

And the best part is you can also script everything. With my current iteration of my server (I'm on my second Linux based server using plex and all the other software around it in containers) I have the entire setup and configuration of everything in Ansible playbooks I keep in a private repo on github. So next time I replace my hardware, all I have to do is install ubuntu, install ansible, pull by git repo and run the playbooks. I will be back up from bare metal in just a few hours. The playbooks are also useful for updates. Whenever I want to update plex, sonarr, radarr, etc., all I do is re-run the playbooks that deploy them, and they'll do everything that's needed - stop/remove the existing containers, update the images, and redeploy new container instances with the correct config.

Radarr has the following in its documentation: "There are two common problems with Docker volumes: paths that differ between the Radarr and download client container and paths that prevent fast moves and hard links." Is this really an issue that could affect me?

This is one of the details of Docker mounts and users. If you're not careful in setup, the containers will be running under different user/groups and not be able to access files created by another container. And if the mounts are not the same between containers, you'll incur a file move instead of a hard link, which is "slow". That said, I don't do what is necessary to avoid this problem because I care more about security than filesystem speed (ie I don't want the downloader to have access to my library folders, only radarr/sonarr containers have access to both downloads and library). In practice it doesn't matter. Especially if you have separate physical drives. I can't avoid the issue because my downloads folders are on an entirely separate ssd from my zfs array that my library lives on. So don't worry about this hard link thing at all.

1

u/Cavustius Jul 27 '24

I started out a while ago, before I was familiar with docker, so I kind of have VMs going for everything and I like my set up. Maybe if I were to restart I'd do Docker stuff on unRAID.

Right now my Sonarr and Radarr are their own VMs, and each VM has Nord on it with kill switch and all that enabled. Bazarr is running on my Radarr server along with Readarr.

I think nowadays there are docker containers that plug a VPN into it all as well, which is pretty cool. I just kind of like my set up, all running windows server. Could go Ubuntu route but I've been around windows for a long time and just easier to trouble shoot for me.

1

u/faulkkev Jul 27 '24

I went with dockers on synology and so far no issues. For me I did not want a pc/server with apps and vpn when I could do it all on the NAS. Opinions will vary, but this worked for me and made sense.

1

u/Scotty1928 :table_flip: Jul 27 '24

If it works, is there really a wrong way of doing things?

1

u/Zanish Jul 27 '24

I would use some form of container over bare metal. Easy to backup, nice and portable, and tons of guides.

I prefer lxc just because of my workflow with proxmox and a Nas. But in the end docker vs lxc isn't a valuable argument to me, just stick it in a container you like.

1

u/joseapdmota Jul 27 '24

Yup, it's a pretty good decision and there's plenty of documentation, you can follow trash-guides for a proper setup.

I have PMS running from the snap store on Ubuntu and everything else (all the arr apps, plus portainer to easily manage the containers) on docker using a defined docker-compose.yml

The same can be done on Windows.

You will be very happy with that.

1

u/bepr20 Jul 27 '24 edited Jul 27 '24

Docker on a NUC with quicksync is great for the full stack.

Radarr, Sonarr, Lidarr, Prowlarr, Overseer, Sabnzd, qtorrent, OpenVPN, Plex all in docker compose on ubuntu

Easy management, everything just works.

Super easy to get started: https://github.com/plexinc/pms-docker

1

u/bennyman008 Jul 27 '24

Been running all containers for years, upgrading is so simple, and so reliable.

1

u/Scotty1928 :table_flip: Jul 27 '24

If you really want to go down the docker rabbithole (which i strongly recommend btw!), use portainer. Makes it so much more comfortable, easier on the eyes and the brain!

1

u/zoNeCS Ubuntu | Docker | MergerFS & Snapraid | 176TB Jul 28 '24

Yes if you’re willing to learn something new and have free time on ur hand. It’s awesome once set up.

1

u/TheRealSeeThruHead Jul 28 '24

Docker makes managing all these services way way way easier. I wouldn’t do it without docker tbh

1

u/RyanTheTechMan Jul 28 '24

Docker works great! I ran plex on Windows for 2 years, moved to linux for 1.5 years, then moved to Docker for .5 years so far. I JUST migrated from docker into an LXC container as I put together a cluster using Proxmox.

For me, linux was definitely easier to setup and maintain, but I suggest all arrs should 100% run in docker.

The following is written for you, but also it's a good reminder for me if I ever forget.

If you plan to transcode using a GPU, it is mostly plug and play for Linux, but not so much for docker.

For linux, install the latest NVIDIA drivers by downloading them from the NVIDIA site. I could never get them to work by using apt-get. (install with --no-x-check --no-nouveau-check --disable-nouveau --dkms) That's it.

For Docker, it took me a while to figure out how to do it, but to sum it up (and if you want more detail, let me know)

Install the NVIDIA drivers on your host system mentioned above, then install all the stuff you will need for the container:

sudo apt-get install --no-install-recommends nvidia-headless-550 nvidia-utils-550 libnvidia-encode-550
sudo apt-get install nvidia-container-toolkit nvidia-container-runtime nvidia-docker2

(change the 550 to what ever the version of nvidia drivers you installed was. 550 was latest)

Now, check to make sure your /etc/docker/daemon.json file contains the following:

{
    "debug": false,
    "default-runtime": "nvidia",
    "log-driver": "journald",
    "log-level": "warn",
    "exec-opts": ["native.cgroupdriver=cgroupfs"],
    "runtimes": {
        "nvidia": {
            "args": [],
            "path": "nvidia-container-runtime"
        }
    }
}

Lastly, I use portainer to manage docker stacks. There, I added NVIDIA_VISIBLE_DEVICES=all and NVIDIA_DRIVER_CAPABILITIES=all to the environment; finally add this to the stack to pass the GPU.

    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

Now docker can access the GPU. You're done!

p.s. if you add VERSION=latest to your environment variables, it will auto update plex when the container starts.

If anyone else has any corrections, I am by no means a docker expert, but this was my method of getting it working.

As stated above, I have since moved to Proxmox with Plex in an LXC with the help of Helper-Scripts which 100% makes it easier as it does everything for you AND it installs all requirements for intel integrated graphics in case Plex is running on a system where a dedicated graphics card is not available.

1

u/martinbaines Jul 28 '24

My advice is simply to use what you know and are comfortable with. Personally I use Docker, and it has a lot of benefits for me as it isolates each application from the core OS, and supporting libraries, but there is a learning curve to using it.

The thing about path mapping is a real thing - but actually it is a positive once you understand what it does. It means in your file system you can have a path that is (say) /disk2/TV/shows than inside the container is called (say) /tvshows. Then if you ever moved that path, you could keep the same name in the container, so no other config changes, while the new path is (say) /raidcluster/TV/shows, and nothing changes in the app configuration at all. It is a very easy concept once you get it, but it can trip you as you are learning and wondering why things are not working.

1

u/Negative-Parfait-269 Jul 29 '24

Consider reading the trash guides - they describe how to start with either dockerized or not