Sign inSign up

neclimdul/docker-plex

By neclimdul

Updated almost 5 years ago

Plex server containers

Image
1

8.9K

neclimdul/docker-plex repository overview

docker plex

This is a Dockerfile to set up (https://plex.tv/ "Plex Media Server") - (https://plex.tv/)

All scripts and code is closely based on timhaak's containers. https://github.com/timhaak/docker-plexpass https://github.com/timhaak/docker-plex

Instructions

Getting the docker image

Build from docker file

git clone [email protected]:neclimdul/docker-plex.git
cd docker-plex
docker build -t neclimdul/docker-plex:plex Plex

You can also obtain it via:

docker pull neclimdul/docker-plex:plex

or

docker pull neclimdul/docker-plex:plex-pass
Running the docker image

Instructions to run:

docker rm -f plex
docker run --restart=always -d --name plex -h *your_host_name* -v /*your_config_location*:/config -v /*your_videos_location*:/data -p 32400:32400 neclimdul/docker-plex

When the container starts, it will initialize the config directory and the configuration is populated through environment variables that can be set using the command line or an envfile.

Browse to http://*ipaddress*:32400/web to run through the setup wizard.

By default, unauthenticated web access will only be available from the host machine and so to configure authentication for external access you will need a web browser on your host machine. If this is unavailable or you would like to have unauthenticated access from your LAN, then you can set the PLEX_ALLOWED_NETWORKS environment variable to the subnet of your LAN either temporarily for configuration or permenantly for unauthenticated LAN access.

Avahi Auto Detection

For auto detection to work add --net="host". Though be aware this more insecure and not best practice with docker images. The only reason for doing it is to allow Avahi to work (as it uses broadcasts that will not cross network boundries).

See the Docker Networking Article for details on how docker networks a container.

docker rm -f plex
docker run --restart=always -d --name plex --net="host" -h *your_host_name* -v /*your_config_location*:/config -v /*your_videos_location*:/data neclimdul/docker-plex

Configuration

Environment Varaibles
Variable NameValuesDefaultBehaviour
SKIP_CHOWN_CONFIGTRUE or FALSEFALSEStartup will be faster and there won't be a permissions check for the configuration
PLEX_USERNAMEStringEmptyWill add this Plex Media Server to that account
PLEX_PASSWORDStringEmpty(Mandatory if username is set) The account password
PLEX_TOKENPlex tokenEmptyPlex token if you don't want to write your password
PLEX_EXTERNALPORTIntegerEmptyThe port if you're not using the default one (32400), ie. when using -p 80:34200
PLEX_DISABLE_SECURITY0 or 11If set to 1, the remote security will be disabled
RUN_AS_ROOTtrue or falsefalseDangerous If true, will start Plex as root
PLEX_ALLOWED_NETWORKSComma-separated listEmptyList of networks to allow access to.
PLEX_PLEX_AUTO_NETWORK0 or 11If set to 1 and PLEX_ALLOWED_NETWORKS is not set, will default to visibile networks

To use an option, set it as a Docker environment variable through the command line:

docker run -e RUN_AS_ROOT=TRUE ... neclimdul/docker-plex:plex

or add it to an envfile that can be included through the command line:

docker run --envfile=*filename* ... neclimdul/docker-plex:plex

Tag summary

Content type

Image

Digest

Size

149.2 MB

Last updated

almost 5 years ago

docker pull neclimdul/docker-plex:plex-pass