Skip to content

Instantly share code, notes, and snippets.

@phillijw
Created January 20, 2018 23:53
Show Gist options
  • Save phillijw/8a3239be74847ab166d2585231edff94 to your computer and use it in GitHub Desktop.
Save phillijw/8a3239be74847ab166d2585231edff94 to your computer and use it in GitHub Desktop.
Setting up plex in a docker container
Goal: Set up Plex for my LAN inside a docker container. I am not using or relying on the plex.tv website at all. This
is all local to my network. Plex updates happen through the web interface. I'm not sure how I'm going to handle
the docker image updates yet or if I will even worry about it.
First, set up a ramdisk (type=tmpfs; I used 4GB but smaller is fine probably) to use for transcoding. This allows plex to
transcode files without reading and writing constantly from your SSD or other disk drive. This lets it do it all in
memory instead. I mounted this at /mnt/ramdisk and then set it up in my fstab so it persists through reboots.
Second, make sure you have docker installed ya big dummy.
Third, run this command... modify it to your needs:
docker run \
-d \
--name plex \
--network=host \
-p 32400:32400/tcp \
-e TZ="America/Chicago" \
-v /home/phillijw/docker/plex/config:/config \
-v /mnt/ramdisk/docker/plex/transcode:/transcode \
-v /media/phillijw/KingKong/tv:/data/tv \
-v /media/phillijw/KingKong/movies:/data/movies \
--restart always \
plexinc/pms-docker
@phillijw
Copy link
Author

phillijw commented May 8, 2018


docker run \
-d \
--name plex \
-p 32400:32400/tcp \
-p 3005:3005/tcp \
-p 8324:8324/tcp \
-p 32469:32469/tcp \
-p 1900:1900/udp \
-p 32410:32410/udp \
-p 32412:32412/udp \
-p 32413:32413/udp \
-p 32414:32414/udp \
-e TZ="America/Chicago" \
-e ADVERTISE_IP="http://192.168.1.137:32400/" \
-e PUID=1000 \
-e PGID=1000 \
-e VERSION=latest \
-v /var/lib/docker/volumes/plex/config:/config \
-v /mnt/ramdisk/docker/plex/transcode:/transcode \
-v /media/kingkong/tv:/data/tv \
-v /media/kingkong/movies:/data/movies \
--restart unless-stopped \
linuxserver/plex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment