Frequently updated Plex Media Server docker image.
500K+
With our easy-to-install Plex Media Server software and your Plex apps, available on all your favorite phones, tablets, streaming devices, gaming consoles, and smart TVs, you can stream your video, music, and photo collections any time, anywhere, to any device.
Before you create your container, you must decide on the type of networking you wish to use. There are essentially three types of networking available:
bridge (default)hostmacvlanThe bridge networking creates an entirely new network within the host and runs containers within there. This network is connected to the physical network via an internal router and docker configures this router to forward certain ports through to the containers within. The host networking uses the IP address of the host running docker such that a container's networking appears to be the host rather than separate. The macvlan networking creates a new virtual computer on the network which is the container. For purposes of setting up a plex container, the host and macvlan are very similar in configuration.
Using host or macvlan is the easier of the three setups and has the fewest issues that need to be worked around. However, some setups may be restricted to only running in the bridge mode. Plex can be made to work in this mode, but it is more complicated.
For those who use docker-compose, this repository provides the necessary YML template files to be modified for your own use.
docker run\
-d\
--name plex\
--network=host\
-e TZ="<timezone>"\
-e PLEX_CLAIM="<claimToken>"\
-v <path/to/plex/database>:/config\
-v <path/to/transcode/temp>:/transcode\
-v <path/to/media>:/data\
plex101/plex-docker
docker run\
-d\
--name plex\
--network=physical\
--ip=<IPAddress>\
-e TZ="<timezone>"\
-e PLEX_CLAIM="<claimToken>"\
-h <HOSTNAME>\
-v <path/to/plex/database>:/config\
-v <path/to/transcode/temp>:/transcode\
-v <path/to/media>:/data\
plex101/plex-docker
Similar to Host Networking above with these changes:
physical which is the name of the macvlan network (yours is likely to be different).--ip parameter has been added to specify the IP address of the container. This parameter is optional since the network may specify IPs to use but this paramater overrides those settings.-h <HOSTNAME> has been added since this networking type doesn't use the hostname of the host.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="<timezone>"\
-e PLEX_CLAIM="<claimToken>"\
-e ADVERTISE_IP="http://<hostIPAddress>:32400/"\
-h <HOSTNAME>\
-v <path/to/plex/database>:/config\
-v <path/to/transcode/temp>:/transcode\
-v <path/to/media>:/data\
plex101/plex-docker
Note: In this configuration, you must do some additional configuration:
ADVERTISE_IP specified above. By default you can forward port 32400, but if you choose to use a different external port, be sure you configure this in Plex Media Server's Remote Access settings. With this type of docker networking, the Plex Media Server is essentially behind two routers and it cannot automatically setup port forwarding on its own.LAN Networks preference to contain the network of your LAN. This instructs the Plex Media Server to treat these IP addresses as part of your LAN when applying bandwidth controls. The syntax is the same as the ALLOWED_NETWORKS below. For example 192.168.1.0/24,172.16.0.0/16 will allow access to the entire 192.168.1.x range and the 172.16.x.x range.-p 32400:32400/tcp Forwards port 32400 from the host to the container. This is the primary port that Plex uses for communication and is required for Plex Media Server to operate.-p ... Forwards complete set of other ports used by Plex to the container. For a full explanation of which you may need, please see the help article: https://support.plex.tv/hc/en-us/articles/201543147-What-network-ports-do-I-need-to-allow-through-my-firewall-v <path/to/plex/database>:/config The path where you wish Plex Media Server to store its configuration data. This database can grow to be quite large depending on the size of your media collection. This is usually a few GB but for large libraries or libraries where index files are generated, this can easily hit the 100s of GBs. If you have an existing database directory see the section below on the directory setup. Note: the underlying filesystem needs to support file locking. This is known to not be default enabled on remote filesystems like NFS, SMB, and many many others. The 9PFS filesystem used by FreeNAS Corral is known to work but the vast majority will result in database corruption. Use a network share at your own risk.-v <path/to/transcode/temp>:/transcode The path where you would like Plex Media Server to store its transcoder temp files. If not provided, the storage space within the container will be used. Expect sizes in the 10s of GB.-v <path/to/media>:/data This is provided as examples for providing media into the container. The exact structure of how the media is organized and presented inside the container is a matter of user preference. You can use as many or as few of these parameters as required to provide your media to the container.-e KEY="value" These are environment variables which configure the container. See below for a description of their meanings.The following are the recommended parameters. Each of the following parameters to the container are treated as first-run parameters only. That is, all other paraters are ignored on subsequent runs of the server. We recommend that you set the following parameters:
-h PlexServer will set the servername to PlexServer. Not needed in Host Networking.Europe/London. The complete list can be found here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zoneshttp://10.1.1.23:32400. This adds to the list where the server advertises that it can be found. This is only needed in Bridge Networking.These parameters are usually not required but some special setups may benefit from their use. As in the previous section, each is treated as first-run parameters only:
plex user created inside the container.plex group created inside the containertrue. If you are certain permissions are already set such that the plex user within the container can read/write data in it's config directory, you can set this to false to speed up the first run of the container.192.168.1.0/24,172.16.0.0/16 will allow access to the entire 192.168.1.x range and the 172.16.x.x range. Note: If you are using Bridge networking, then localhost will appear to plex as coming from the docker networking gateway which is often 172.16.0.1.Content type
Image
Digest
Size
380.5 MB
Last updated
about 5 years ago
docker pull plex101/plex-docker