Skip to content

Instantly share code, notes, and snippets.

@Oshuma
Last active Feb 27, 2020
Embed
What would you like to do?
Spin up a Plex docker container
#!/usr/bin/env bash
if [ $# -ne 1 ]; then
echo "$(basename $0) <claim-token>"
echo -e "\nGet claim token here: https://www.plex.tv/claim/"
exit 1
fi
claim_token=$1
config_dir=$HOME/.plex/config
transcode_dir=$HOME/.plex/tmp
music=$HOME/Music
movies=$HOME/Movies
tv=$HOME/TV
docker run --name plex \
--network=host \
-e TZ="America/New_York" \
-e PLEX_CLAIM="$claim_token" \
-e PLEX_UID="$(id --user)" \
-e PLEX_GID="$(id --group)" \
-v $config_dir:/config \
-v $transcode_dir:/transcode \
-v $music:/media/Music \
-v $movies:/media/Movies \
-v $tv:/media/TV \
plexinc/pms-docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment