Plex is a media server and streaming platform that lets you organize your personal media library and stream it to virtually any device, while also offering free movies, TV shows, live TV, and podcasts.
NOTE: Unlike Jellyfin, Plex is only free if streaming on your local network. There is a cost if you want to stream remotely.
Plex is wonderful. You can have one media directory and dump all your content there (e.x. Movies, TV Shows) and Plex will scan that directory and sort out of it's a Movie or TV Show. Jellyfin, on the otherhand, requires that you have a seperate directory for movies and one for TV shows. Each TV show has to have subdirectories, one per season. It's not nearly as slick as Plex. Since I run Plex (for inside my network use) and Jellyfin (for remote use) and I use the same media directories for both, I had to redo my Plex config to use a Movies directory and a TV Shows directory. That setup is in this guide. Could I use Plex for local and remote viewing? Sure. I'm working on it. I've got tailscale setup on my mac, iPhone, and Pi. I can connect to Plex on my laptop using Tailscale and my iPhone as a hotspot and everything works great but when I try to use the Plex app in my iPhone (with WiFi off), I hit the paywall. I'm not sure why yet. Jellyfin has no paywall which is why I added that to my enviroment.
sudo apt update && sudo apt upgrade -ycurl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh
sudo apt install docker-compose-pluginsudo usermod -aG docker $USERsudo systemctl enable dockersudo rebootdocker run hello-worldmkdir ~/docker mkdir ~/docker/plex mkdir ~/docker/plex/config
In ~/docker/plex create docker-compose.yml
services:
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
network_mode: host
environment:
- PUID=1000
- PGID=1000
- VERSION=docker
- PLEX_CLAIM=claim-VFDzv3bHizaXfnhJk8h2
- PLEX_LOG_LEVEL=DEBUG
volumes:
- /mnt/Movies:/Movies #Where you'll access your Movies
- /mnt/TV Shows:/TV Shows #Where you'll access your TV Shows
- ~/docker/plex/config:/config
restart: unless-stopped
NOTE: Follow this guide to setup your media folder: Plex Media Structure
Like I mentioned before, you could have just one Media directory and dump everything there and let Plex sort it out. It's about 99% accurate. If it gets something wrong, it's a pretty easy fix.
From within ~/docker/plex run:
docker compose up -d
docker logs plex
Open your browser and go to http://<your-pi>:32400
Plex used to be free. You could watch your content locally or remotely. Recently, they added a paywall for remote viewing. Here's a way to bypass the paywall (for experimental purposes only). I'll walk through doing this so you can watch remotely from your phone. Same steps for pretty much any device.
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
if those commands fail, run these:
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.confdocker exec -it tailscale tailscale up --advertise-routes=192.168.0.0/24 --advertise-exit-node
Here's how to test if you have it set up correctly. I assume that you already have Plex installed and working on your phone.
If you find my content useful, please consider supporting this page: