Plex
Intro
Plex is the primary reason behind my homelab. Do you enjoy relaxing at home and watching a movie? Maybe a TV Show? Well how do you do it? Amazon prime? Netflix? Blu-ray? Do you have subscriptions to all of those?
The cost can add up and you don’t really own anything. Sometimes those services remove your favorite movie or show. Then what?
What is plex?
Plex has two applications. The server and the client.
Plex media server is an application that allows you to point the application to a directory of media files. The application then serves those media files up to a client.
Plex has apps for about every device. Your phone, tablet, Apple TV, Xbox, etc. This allows you to play the files that your plex media server is pointing to. These apps are clients.
When you download Netflix for example, it is acting as a client to the Netflix servers that serve all the content they offer that is stored on many many hard drives. Plex does the same thing but for your own home using your own hardware and content you own at a smaller scale.
Features
Plex has many features. A couple that are very convenient are:
- Remote connection: this means that plex content can be viewed on a mobile device not on your home network. You can stream your favorite movies or shows you own while on the go.
- Metadata matching: this means it will pull information from the internet to give you details about the movie or show including posters, descriptions, cast, etc.
- Offline viewing: this means that you can download the media directly to your device similar to how other services will let you to view when you don’t have a data connection i.e. on a plane.
- DVR: plex allows you to connect a tuner to your server to record live tv and view it later like TiVO.
Connecting other services
Now I’ve mention in other posts about services like radarr and sonarr. Both of those are media library management software for movies and shows respectively. They can move your library en mass, keep track of series i.e. John Wick, rename your files, etc.
Renaming of files is perhaps the biggest reason for utilizing the services. Plex has a particular naming scheme to utilize the metadata matching. That’s why I am including those services here in this post. It’s an important piece that helps tie in the reason for having them in the first place.
How to install it
Plex has a variety of options to install both the server and client apps. Personally, I have an Intel NUC that I use pretty much dedicated to Plex. Instead of using windows, I opted to install Ubuntu Server on it and run Plex that way. It has a 11th Gen Core i7 plus an NVIDIA GPU. I also have all of my media on a NAS (Network Attached Storage), where I point my plex media server at.
If you are on windows, you can download the executable from their website, same with Mac and the .dmg file. They support many systems. Personally, I started with the linux .deb file, but it would update for whatever reason. So I switched to the docker version. to do this method it’s super easy if you are on mac or linux. You can follow along right here: Open a terminal. Wherever you want to store your docker config files, navigate there. For me that looks like this: /home/username/docker. Type this into your terminal:
1
2
3
sudo mkdir plex
cd plex
sudo nano compose.yml
From there, copy this into your clipboard:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
version: "3"
services:
plex:
image: plexinc/pms-docker
container_name: plex
network_mode: host
environment:
- PUID=1000
- PGID=1000
- TZ=America/Phoenix ## For your time zone
- VERSION=docker
- PLEX_CLAIM=plex claim token ## Can be found at https://plex.tv/claim
#- NVIDIA_VISIBLE_DEVICES=all ## For NVIDIA GPU support only, delete the '#' if needed.
volumes:
- ./config:/config ## For config folder
- /dev/shm/:/transcode ## For using ram as transcode location
- /mnt/media:/Media ## directory for media, modify the left side of the semicolon only.
## For NVIDIA GPUs only
devices:
- /dev/dri:/dev/dri
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
## End GPU portion
restart: unless-stopped
Modify it to meet your needs like editing your claim token and the folder where your media is, and the GPU support section then exit out of the file. It should be CTRL+X, then “Y”, then enter.
From there, you should be in the plex directory still. Now just type this into your terminal:
1
sudo docker compose up -d
Your plex server should be up and running.
Now you can navigate to it from your web browser: http://localhost:32400/web if you installed it on the same machine you are using. If not, http://ipaddressofserver:32400/web. I have to do that one. It should have you make an account, and follow the directions. Name your server, add a library, and viola! If you have not created your account, go to their home website below. Once you have an account, you can should be able to access it from https://app.plex.tv/desktop/#!/ as well.
Citations
Plex: Main: https://www.plex.tv Server Downloads: https://www.plex.tv/media-server-downloads/?cat=computer&plat=macos#plex-media-server Client Downloads: https://www.plex.tv/media-server-downloads/?cat=plex+desktop&plat=macos#plex-app Devices: You can also search your device’s app store for their app as well Support: https://support.plex.tv/articles/
