Plex has recently made streaming outside your home network a paid-only feature. Read about it here.
What is Plex?A one-stop destination to stream movies, TV shows, and music, Plex is the most comprehensive entertainment platform available today. Available on almost any device, Plex is the first-and-only streaming platform to offer free ad-supported movies, shows, and live TV together with the ability to easily search—and add to your Watchlist—any title ever made, no matter which streaming service it lives on. Using the platform as their entertainment concierge, 17 million (and growing!) monthly active users count on Plex for new discoveries and recommendations from all their favorite streaming apps, personal media libraries, and beyond.
Docker Compose Nvidia
Docker Compose AMD
TrueNASservices:
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
network_mode: host
runtime: nvidia
environment:
- PUID=568
- PGID=568
- TZ=America/New_York
- VERSION=docker
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
volumes:
- /mnt/tank/configs/plex/configs:/config
- /mnt/tank/configs/plex/logs:/logs
- /mnt/tank/configs/plex/transcode:/transcode
- /mnt/tank/media:/media
restart: unless-stopped
# http://{TrueNAS IP}:32400/web/index.html
To get your Plex Claim Token, go to https://plex.tv/claim and follow the steps to create an account (or login to an existing one) to claim your token.
Enabling nVidia GPUs in Docker
Follow the steps in this Github page to allow passing an nVidia GPU into a container
NVIDIA
To enable transcoding from your nVidia GPU, uncomment out the lines in the compose file above.
Intel iGPU
To enable transcoding from your Intel iGPU, uncomment out the devices lines (under retstart) in the compose file above.
services:
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
network_mode: host
environment:
- PUID=568
- PGID=568
- TZ=America/New_York
- VERSION=latest
- DOCKER_MODS=jefflessard/plex-vaapi-amdgpu-mod
- LIBVA_DRIVERS_PATH=/vaapi-amdgpu/lib/dri
- LD_LIBRARY_PATH=/vaapi-amdgpu/lib
- PLEX_CLAIM= #optional
group_add:
- video
- render
volumes:
- /mnt/tank/configs/plex/configs:/config
- /mnt/tank/configs/plex/logs:/logs
- /mnt/tank/configs/plex/transcode:/transcode
- /mnt/tank/media:/media
devices:
- /dev/dri:/dev/dri
restart: unless-stopped
# http://{TrueNAS IP}:32400/web/index.html
To get your Plex Claim Token, go to https://plex.tv/claim and follow the steps to create an account (or login to an existing one) to claim your token.
To quickly check if hardware acceleration is working, run the following and check for vaapi errors:
docker exec -it -e LIBVA_DRIVERS_PATH=/vaapi-amdgpu/lib/dri -e LD_LIBRARY_PATH=/vaapi-amdgpu/lib plex \
/lib/plexmediaserver/Plex\ Transcoder -hide_banner -loglevel debug -vaapi_device /dev/dri/renderD128
In case the Plex can't access /dev/dri/renderD128 add rwx permissions to owner and owner group:
truenas_admin@truenas:$ sudo chown -R 770 /dev/dri
IMPORTANT: This is not persistent change so after reboot/shutdown you will have to run it
chowncommand again!

To get your Plex Claim Token, go to https://plex.tv/claim and follow the steps to create an account (or login to an existing one) to claim your token.
| Field | Value | Path |
|---|---|---|
| Plex Data Storage | Host Path | /mnt/tank/media |
| Plex Configuration Storage | Host Path | /mnt/tank/configs/plex/config |
| Plex Logs Storage | Host Path | /mnt/tank/configs/plex/logs |
| Plex Transcode Storage | Temporary or tmpfs | n/a |
Check out the new docs from TrueNAS
Upon first launch follow these steps:
3 · Video Walkthrough