In today’s episode we will show you how to install Plex.
If you would like to learn more like how to add media folders, configure the settings, set up remote access, and share your media with family or friends you can learn this from watching episode 23 below.
Table of Contents
Recommended USB Hard Drives For Plex On A Raspberry Pi:
|WD 1TB My Passport Portable External Hard Drive||WD 4 TB My Passport Portable External Hard Drive|
|USA Amazon Link:||USA Amazon Link:|
|UK Amazon Link:||UK Amazon Link:|
What is Plex?.
Plex is a *free media server application that can be used to centralize and organize all your media content. It allows you to stream content to any device using their client apps.
Plex can also be configured to share your media with friends and family and to consume your media while you are outside of your server and on the go.
*Plex Pass upgrade available.
Install Plex on Raspberry Pi 4
Step 1 – Create the folders needed for the Plex Docker container.
Open up a terminal or Putty application.
Connect to your Raspberry Pi via SSH (secure shell).
ssh -p PORT USERNAME@YOURRASPBERRYPIIP
Navigate to your “Appdata” folder or the place where you store all your containers persistent configuration data.
Create a folder called “plex“.
Navigate into the “plex” folder.
Create the “config” folder where all the Plex configuration data will reside.
Now navigate into the “config” folder.
From here you will need to get your “absolute path” for your “config” folder.
Copy the output of the pwd command and paste it into a text file. You will need this in Step 2.
You now need to locate your Media folders. Using the above steps. Navigate into each folder using the terminal one at a time. Movies, TV Series, Music, and Photos are supported.
Once you are in each folder, as we have done above. Use the “pwd” command to get the absolute path of each folder and copy and paste the output paths into the same text file as above so you can add them to your stack in Step 2.
Step 2 – Create the Docker Compose Stack
Navigate to your Portainer dashboard and log in.
From the left hand menu click on “Stacks“.
Now in the Stacks dashboard click on “Add a stack“.
In the “Name” field enter “plex“
Now Copy and paste the following docker-compose data into the “Web editor” field. Be sure to change all the file paths to the absolute paths you saved to a text file in step 1.
Plex Docker Compose Stack
--- version: "2.1" services: plex: image: ghcr.io/linuxserver/plex:arm32v7-latest container_name: plex network_mode: host environment: - PUID=1001 - PGID=100 - VERSION=docker - PLEX_CLAIM= #optional volumes: - /path/to/library:/config - /path/to/tvseries:/tv - /path/to/movies:/movies restart: unless-stopped
You will also need to change the “TZ“, “PUID” and “PGID” fields to match your setup. You can find these by using the “id” command and use the returned values.
You can also add additional folders that you would like to mount and use in Plex. By adding more paths.
Create A Plex Claim Token
Open up a browser and make sure you are logged into plex.tv with your Plex account.
Once logged in navigate to https://plex.tv/claim.
Copy the Claim Code and paste it into your Plex stack under the “PLEX_CLAIM=” field.
Note: you must deploy your stack within 4 minutes of creating this token as it will expire.
Once you have completed that you are ready to click “Deploy the stack“.
If you navigate to “Containers” in the left menu
You should now see your “plex” container in the list.
Give the container a few minutes to fully start up then you can connect to the Plex dashboard GUI.
You should now see the “Sign In” screen.
Because you used a claim code all you need to do is click the “Sign In” button to complete the account linking process.
You should now be redirected to your Plex setup wizard and you are ready to configure Plex.
If you would like to know how to configure Plex, add media, and set up remote access. Please follow our Youtube video for this episode.
We need your support.
We hope you enjoyed this episode and that it was helpful and you got benefit out of it.
If you did, please consider supporting our channel by Subscribing to our YouTube channel, and liking and sharing our content.
If you have any questions or any requests please ask in the comments below or on YouTube.