4 Ways to Install Plex (one is unexpected)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so maybe you've got Plex installed or maybe you don't and you've been considering virtualizing your Plex installation you've read about all the benefits of virtualizing operating systems and you'd like to do it with Plex or maybe you want to take it a step further and containerize it with docker well today I'm gonna show you four ways on how we can get plex installed and up and running hey welcome back so on tech note Tim and today we're gonna talk about four ways on how you can get Plex installed as a quick reminder I stream every Tuesday Thursday and Saturday so if you want to continue the conversation there we can so let's talk about Plex so you're probably familiar with Plex it's an easy way to share your media across all of your screens whether that be on a smart TV a web browser or mobile device or another PC Plex has so many clients it's almost hard to keep track of it's almost guaranteed that if you search your device's App Store you'll see Plex there and while there are many clients for Plex it does require that you have a server so when installing your server you have some options the first option is gonna be just a default install and what do I mean by a default install well that means just downloading the Installer installing it it's pretty straightforward if you're in Windows or Mac or Linux you just download the Installer and you usually double click it and execute it you walk through the wizard and the server will be set up then you just configure some directories for your media and everything's good to go so we can cross that one off the list really quick the next is somewhat similar but under the lens of virtualization so if you're virtualizing your server or your pcs with something like proxmox you would create that virtual machine spin it up and then install Plex on it and if you need a guide on how to install proxmox or virtualized windows or virtualize abouttwo I add those two so these first two are pretty straightforward the third way is pretty straightforward - and it takes some specialized hardware that's installing it on an ass so if you're running a commercial Nantz you'll just go into that NASA app store download and install it then you'll configure media directories in your up and going so if you've built your own Nass using something like on raid or a freenas which is soon-to-be Troon as you would just simply find the plex plug-in and install it the same thing we would configure our media directories in you'll be up going so the fourth way is something I'm gonna focus on today and that's a little less traditional but very powerful and that's installing Plex using docker now if you haven't used docker before it might be a little bit scary in I get it doctor itself relies heavily on command-line and just using plain old docker gives you very low visibility on to what's going on and there are products out there to help you with that things like port ainur or something like Rancher so today in this video we're gonna set up plex using docker and Rancher so that you can containerized plex it's easier than you think so let's get started so a couple things you're gonna need first you're gonna need a linux server we're gonna use a boon to linux and if you need a guide on how to set this up I have one next you're gonna need docker installed if you need help with installing docker I've got a guide on how to set up docker rancher and kubernetes that tutorial will walk you through all the necessary steps to get going and if you don't want to do any of that you can just install doctor yourself it's pretty straightforward once you have your Linux server configured and docker installed start it up then you'll want to SSH into it now if you're using proxmox you don't necessarily have to use SSH you can do this from the proxmox console once you're in we'll want to make sure doctors running and installing so dr. HP should return something if it doesn't you'll need to get doctor installed if doctors running it's good to go if not you'll need to get it set up so now we'll want to get the docker image now I know Plex maintains a docker image but I've had a lot of success with Linux server IO Linux server IO is a collection of docker containers that are maintained they pulled in some of the most popular docker images keep them up-to-date provide a consistent way to use them and provide really good documentation I've been using these images for a couple of years and they work great you're free to use the official Plex one but I'm gonna focus on these so once you get here we'll go to documentation we'll scroll down you can see all of their images here you should see Plex in this list and once we get here they'll have snippets for how to spin it up in docker or using docker compose so let's take a look at this snippet it's pretty easy to figure out so first we're gonna see docker create this is going to create the container then we're gonna name it Plex then we're gonna say the networking is host-based networking then we're passing in an environment variable of P UID so this is gonna be our user ID and then we're gonna pass in another environment variable PG ID and this is our group ID and this helps with permissions and you'll see that later the next environment variable is version now I usually keep this set to docker which means docker will maintain the version the unmasks set is for permissions we won't be using this Plex claim is for a token for your server we'll get this later and then we'll have volumes so we're passing in a path to our library and mapping it to the containers config folder then we're passing in a path to our TV series media and that will be mapped to the slash TV folder in the container then another path for movies we're gonna pass in and that maps to the docker container slash movies folder and then restart and less stop this will automatically restart the doctor container if something happens like a crash in last is the image name we're using which is linux server / plex so we can copy and paste this right now and put the center in terminal and we could spin it up now obviously you would have to tailor this command to the properties you want to set and you're free to customize this and then hit enter and spin this container up but I'm gonna show you how I do it so remember earlier how I said docker doesn't give you a lot of visibility into what's going on I mean sure you could remote into your doctor server type in docker PS look at all your images tale the logs and see what's going on but I've been using Rancher for the last couple of years and it makes docker super easy to use I've been using Rancher one for years and I use cattle as my container orchestration but with the release of ranch or - they've been supporting kubernetes and so slowly I've been migrating my Rancher one instances over to rancher two instances mainly because I want kubernetes you could spin a branch or two in probably about 15 minutes with my guide and once you have it up and running it's super easy to add services so let's convert that docker compose or that docker CLI to a rancher deployment on kubernetes it's super simple so first we'll go into cluster make sure we're on our cluster and click default you can see we don't have any services running right now so we're gonna click deploy and here's where we'll map the docker configuration to a rancher deployment okay so let's name this so it looks like we're gonna name it Plex then for our docker image that's right here it's Linux server slash flex so let's put that in here the name space we're gonna keep us default and next we'll need to map some ports so let's click Add port so the name of this board is gonna be Plex and the default Plex port is 30 to 400 and we don't specify it there but I'd rather specify here so it's really clear on which port we're using so it's 30 to 400 and it's TCP next well need to change this to host port we're only gonna have a single node running plex so we wanted to map to that specific node and so mapping the host port is the way to do that and then it's asking us which port it's listening 1 it's 32 400 on the inside ok so far so good so next we'll need to set some environment variables now this is everything you see here with the e so first is P UID so the value is gonna vary the way that you find this value is to remote into that linux server and you want to make sure that your ID in your group matches the account you're logged in with so the way to do this is just ID and then your name so ID techno Tim and it looks like our GID is 1001 and our group is 1001 so let's set that and our PG ID 1001 next we'll need to set the version so we'll add variable version and we'll set this to dr. and if you want to try a different value here they're all documented on linux server i/o but I always use latest or dr. next we're gonna set one that isn't documented in their example right here but it's our time zone so we're gonna add a variable for TZ and I'm gonna set mine to America slash Chicago next let's add our volumes so if we expand this click add volume we'll want to add a bind mount a directory from the node here let's name this volume Plex config so the path on the node is the folder it's gonna live on on this node so let's set this up in our home too dream so if we're in a server and we type in PWD a present working directory this is slash home slash techno tip so let's create a folder called plex Gator flex so let's set up this volume so the path on the node is gonna be slash home slash tech note and slash Plex and then our mount point is gonna be this on the right side it's slash config so let's add another volume for our movies same thing fine mount a directory from the node it's called this Plex movies path on disk home slash tech node 10 slash movies inner mount point this is over here so this is gonna be slash movies ok let's add one more for music same thing flex music here we're gonna go flex slash music and our Mountain point is going to be slash music ok and everything looks good we can launch it ok so no Rancher it is spinning up our plex instance with kubernetes ok so it looks like it's running now we can go to the URL or we can click on this service right here this is going to be the same address that ranch is running on but with a different port so our plex server is running awesome so that's working so far let's sign in with email awesome now we're signed into place so you can see some of the free stuff that Plex offers this isn't any of my media and you'll notice we don't have any media here and if we go to more your media it looks like we don't have a server installed now we obviously have a server installed because this is being served out on our local IP address so it looks like we need to get a claim so in order to do that we just need to go to a plex TV slash claim and then it'll generate a claim code for you you'll want to keep the secret this is like your password for your plex server so let's copy this clipboard let's go back to Rancher let's make some adjustments to this docker image go to edit we'll want to add one more environment variable claim and we'll want to paste that in there one thing we'll have to change is our scaling update policy because we're not running this in H a mode and we don't have multiple Plex nodes running we'll want to choose this option here kill all pods then start new save there we go looks like it's up and running let's go back to our plex server ok now that we have our claim let's add some media now I know what you're thinking I don't want to go and copy all of my media to this linux server you might be running freenas or true Nass or Samba share somewhere else and you already have your plex media set up so I definitely agree that you don't want to copy your media to this Rancher docker installation I mean you can that's how you plan on using it for but it's best to keep that media somewhere else so I got you covered we're actually going to map this folder from this linux server to a Samba share on the network so I'm running FreeNAS and I already created a Samba share so this Samba share is called plex media it's mounted in the path mount storage 0 plex media and then I have some folders shared out so if we go out to that chair plex media you'll see I have two folders one with movies which only has one movie and one with music which has a folder full of music and you'll see on my linux server this isn't actually on this server right here we do an LS it's empty so we want this a boo to server to mount the Samba share when it boots up it's pretty simple it goes like this so first we're gonna need to install a couple of utilities on our linux server so we're gonna need to install the sips utils so once we have that installed we can actually connect to Samba shares next we'll want to actually store credentials on this device and we want to store them securely since my FreeNAS Samba share is actually password protected we'll need to save that locally we'll do it as securely as possible so we want to create a file with our credentials so this SMB credentials file is going to live in a profile here we'll set username equals and your username for your Samba share then we'll set password equals and that's equal to your password for your Samba share once you have that set save the file then we'll want to set some permissions so that no one else can read this file so we're gonna sudo chmod it to 600 and now that that's set we can actually use that file instead of putting the credentials in our FS tab so let's modify FS tab sudo nano ET c FS tab next you want to make sure you have your FS tab set like this so it's gonna be the path to your share mounting it at a local slash movies then the credentials we set and you'll do that again for music too so we'll save that and then to test it out we'll do sudo mount - a that looks good to let CD into CD /mnt slash movies there we go we should see our movie there so now that we change that we'll need to change one more thing in rancher or our docker configuration we originally set up this container to look at a path in our home directory but we want to change us now to look at the Mount map so let's do that so we'll go back in go to default choose plex we'll go to edit and now for our volumes we'll scroll down to movies I will need to set this to where we just mounted it our Mountain pointing so that /mnt slash movies and do the same for music /mnt slash music and we'll say that okay that looks good let's go back out to our plex server then once you go back to your plank server if you have your claim token right you'll see the screen so let's walk through the wizard so you can setup whether or not you want to see it outside of your home you can add a library let's set our music browse for media net music add to library send another one that are movies browse and so a quick call out right here you're actually seeing the volumes that are exposed to the doctor container so we see her movies here we'll add them add to library click Next click done so we'll go to more will see our movies here and here we go awesome so this movie is actually streaming from my docker container which then is connected to my FreeNAS server to a Samba share ok let's check out our music go to music go to music album so same thing this music lives actually on our free now server we're connected to that FreeNAS server through a Samba share which is then connected to our linux server which then is running docker in Rancher and Plex is running inside of that container so this is actually really cool we have our docker containers now running on this linux server and the nice thing is we don't have to keep spinning up virtual machines every time we need a new service so if we want to add another service we just add another docker container and then that docker container can spin up on that Linux virtual machine so you could have one Linux virtual machine hosting lots and lots of services and I know you're thinking well I can probably just install all those services individually on that virtual machine but that's where things get a little bit complicated if you do that you'll have to worry about updating each application individually you'll have to worry about poor conflicts and many other things that come with installing an application locally using docker containers and volumes and system variables is a repeatable way to get applications on your servers so you don't need to go and install 4 or 5 6 virtual machines for every docket container you need you spin up one virtual machine running Linux install docker and install all your containers there and this greatly reduces the resource requirements because if you think about it if you add five services you spin of five Linux servers and each five of those would require RAM CPU disk space su need one out but in this scenario we spun up one Linux server and then we can spin up five containers and run those all inside this Linux server so then you really only need to virtualize the things you need to in virtual eyes another great advantage of doing this is that you could actually pass through this hardware to this one Linux virtual machine and now have all of these containers take advantage of it say for instance you wanted to duplex transcoding on a GPU and you wanted to run some other service that requires a GPU well if you have a donk of container for each they both can take advantage of that video card instead of the alternative which is two virtual machines which can't share consumer-grade GPU you would either have to get two GPUs or an enterprise-grade GPU and share that with both of the virtual machines but this is a simple way to combine services so that you can do something like that in the future so with that being said are there other services you would like to see me containerize if so let me know in the comments section below I'll have some more videos who know all of the great document containers that are out there maybe that'll help you choose between whether you should virtualize something or containerize something so if you like this video please give it a thumbs up and consider subscribing and as a reminder I stream every Tuesday Thursday and Saturday so if you have a question about this video or any of my other videos hop in my stream and I'd love to have you so thanks so much for watching and until next time Stream on my friends
Info
Channel: Techno Tim
Views: 34,788
Rating: undefined out of 5
Keywords: how to install plex on ubuntu, how to install plex on docker, docker, plex, ubuntu, plex on docker, containerize plex, linuxserver.io, virtualize plex server, install plex on docker, proxmox, proxmox ve, plex media server, plex media server setup, freenas, truenas, plex kubernetes, kubernetes, rancher, plex on rancher, install plex in docker, cord cutting, cord cutter, linuxserver, linuxserver/plex, rancher 2, plex docker image, install plex, dockerize plex, proxmox plex
Id: MG_1XQxWns0
Channel Id: undefined
Length: 18min 44sec (1124 seconds)
Published: Sat May 23 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.