Giter VIP home page Giter VIP logo

docker-plex's Introduction

linuxserver.io

Blog Discord Discourse Fleet GitHub Open Collective

The LinuxServer.io team brings you another container release featuring:

  • regular and timely application updates
  • easy user mappings (PGID, PUID)
  • custom base image with s6 overlay
  • weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
  • regular security updates

Find us at:

  • Blog - all the things you can do with our containers including How-To guides, opinions and much more!
  • Discord - realtime support / chat with the community and the team.
  • Discourse - post on our community forum.
  • Fleet - an online web interface which displays all of our maintained images.
  • GitHub - view the source for all of our repositories.
  • Open Collective - please consider helping us by either donating or contributing to our budget

Scarf.io pulls GitHub Stars GitHub Release GitHub Package Repository GitLab Container Registry Quay.io Docker Pulls Docker Stars Jenkins Build LSIO CI

Plex organizes video, music and photos from personal media libraries and streams them to smart TVs, streaming boxes and mobile devices. This container is packaged as a standalone Plex Media Server. Straightforward design and bulk actions mean getting things done faster.

plex

Supported Architectures

We utilise the docker manifest for multi-platform awareness. More information is available from docker here and our announcement here.

Simply pulling lscr.io/linuxserver/plex:latest should retrieve the correct image for your arch, but you can also pull specific arch images via tags.

The architectures supported by this image are:

Architecture Available Tag
x86-64 amd64-<version tag>
arm64 arm64v8-<version tag>
armhf

Application Setup

Webui can be found at <your-ip>:32400/web

note: If there is no value set for the VERSION variable, then no updates will take place.

note: For new users, no updates will take place on the first run of the container as there is no preferences file to read your token from, to update restart the Docker container after logging in through the webui.

Valid settings for VERSION are:-

info: YOU CANNOT UPDATE TO A PLEXPASS ONLY (BETA) VERSION IF YOU ARE NOT LOGGED IN WITH A PLEXPASS ACCOUNT.

  • docker: Let Docker handle the Plex Version, we keep our Dockerhub Endpoint up to date with the latest public builds. This is the same as leaving this setting out of your create command.
  • latest: will update plex to the latest version available that you are entitled to.
  • public: will update plexpass users to the latest public version, useful for plexpass users that don't want to be on the bleeding edge but still want the latest public updates.
  • <specific-version>: will select a specific version (eg 0.9.12.4.1192-9a47d21) of plex to install, note you cannot use this to access plexpass versions if you do not have plexpass.

Hardware Acceleration

Many desktop applications need access to a GPU to function properly and even some Desktop Environments have compositor effects that will not function without a GPU. However this is not a hard requirement and all base images will function without a video device mounted into the container.

Intel/ATI/AMD

To leverage hardware acceleration you will need to mount /dev/dri video device inside of the container.

--device=/dev/dri:/dev/dri

We will automatically ensure the abc user inside of the container has the proper permissions to access this device.

Nvidia

Hardware acceleration users for Nvidia will need to install the container runtime provided by Nvidia on their host, instructions can be found here: https://github.com/NVIDIA/nvidia-container-toolkit

We automatically add the necessary environment variable that will utilise all the features available on a GPU on the host. Once nvidia-container-toolkit is installed on your host you will need to re/create the docker container with the nvidia container runtime --runtime=nvidia and add an environment variable -e NVIDIA_VISIBLE_DEVICES=all (can also be set to a specific gpu's UUID, this can be discovered by running nvidia-smi --query-gpu=gpu_name,gpu_uuid --format=csv ). NVIDIA automatically mounts the GPU and drivers from your host into the container.

Arm Devices

Best effort is made to install tools to allow mounting in /dev/dri on Arm devices. In most cases if /dev/dri exists on the host it should just work. If running a Raspberry Pi 4 be sure to enable dtoverlay=vc4-fkms-v3d in your usercfg.txt.

Usage

To help you get started creating a container from this image you can either use docker-compose or the docker cli.

docker-compose (recommended, click here for more info)

---
services:
  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - VERSION=docker
      - PLEX_CLAIM= #optional
    volumes:
      - /path/to/library:/config
      - /path/to/tvseries:/tv
      - /path/to/movies:/movies
    restart: unless-stopped
docker run -d \
  --name=plex \
  --net=host \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e VERSION=docker \
  -e PLEX_CLAIM= `#optional` \
  -v /path/to/library:/config \
  -v /path/to/tvseries:/tv \
  -v /path/to/movies:/movies \
  --restart unless-stopped \
  lscr.io/linuxserver/plex:latest

Parameters

Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.

Parameter Function
--net=host Use Host Networking
-e PUID=1000 for UserID - see below for explanation
-e PGID=1000 for GroupID - see below for explanation
-e TZ=Etc/UTC specify a timezone to use, see this list.
-e VERSION=docker Set whether to update plex or not - see Application Setup section.
-e PLEX_CLAIM= Optionally you can obtain a claim token from https://plex.tv/claim and input here. Keep in mind that the claim tokens expire within 4 minutes.
-v /config Plex library location. This can grow very large, 50gb+ is likely for a large collection.
-v /tv Media goes here. Add as many as needed e.g. /movies, /tv, etc.
-v /movies Media goes here. Add as many as needed e.g. /movies, /tv, etc.

Environment variables from files (Docker secrets)

You can set any environment variable from a file by using a special prepend FILE__.

As an example:

-e FILE__MYVAR=/run/secrets/mysecretvariable

Will set the environment variable MYVAR based on the contents of the /run/secrets/mysecretvariable file.

Umask for running applications

For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional -e UMASK=022 setting. Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up here before asking for support.

Optional Parameters

If you want to run the container in bridge network mode (instead of the recommended host network mode) you will need to specify ports. The official documentation for ports lists 32400 as the only required port. The rest of the ports are optionally used for specific purposes listed in the documentation. If you have not already claimed your server (first time setup) you need to set PLEX_CLAIM to claim a server set up with bridge networking.

  -p 32400:32400 \
  -p 1900:1900/udp \
  -p 5353:5353/udp \
  -p 8324:8324 \
  -p 32410:32410/udp \
  -p 32412:32412/udp \
  -p 32413:32413/udp \
  -p 32414:32414/udp \
  -p 32469:32469

The application accepts a series of environment variables to further customize itself on boot:

Parameter Function
--device=/dev/dri:/dev/dri Add this option to your run command if you plan on using Quicksync hardware acceleration - see Application Setup section.
--device=/dev/dvb:/dev/dvb Add this option to your run command if you plan on using dvb devices.

User / Group Identifiers

When using volumes (-v flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance PUID=1000 and PGID=1000, to find yours use id your_user as below:

id your_user

Example output:

uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)

Docker Mods

Docker Mods Docker Universal Mods

We publish various Docker Mods to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.

Support Info

  • Shell access whilst the container is running:

    docker exec -it plex /bin/bash
  • To monitor the logs of the container in realtime:

    docker logs -f plex
  • Container version number:

    docker inspect -f '{{ index .Config.Labels "build_version" }}' plex
  • Image version number:

    docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/plex:latest

Updating Info

Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the Application Setup section above to see if it is recommended for the image.

Below are the instructions for updating containers:

Via Docker Compose

  • Update images:

    • All images:

      docker-compose pull
    • Single image:

      docker-compose pull plex
  • Update containers:

    • All containers:

      docker-compose up -d
    • Single container:

      docker-compose up -d plex
  • You can also remove the old dangling images:

    docker image prune

Via Docker Run

  • Update the image:

    docker pull lscr.io/linuxserver/plex:latest
  • Stop the running container:

    docker stop plex
  • Delete the container:

    docker rm plex
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved)

  • You can also remove the old dangling images:

    docker image prune

Image Update Notifications - Diun (Docker Image Update Notifier)

tip: We recommend Diun for update notifications. Other tools that automatically update containers unattended are not recommended or supported.

Building locally

If you want to make local modifications to these images for development purposes or just to customize the logic:

git clone https://github.com/linuxserver/docker-plex.git
cd docker-plex
docker build \
  --no-cache \
  --pull \
  -t lscr.io/linuxserver/plex:latest .

The ARM variants can be built on x86_64 hardware using multiarch/qemu-user-static

docker run --rm --privileged multiarch/qemu-user-static:register --reset

Once registered you can define the dockerfile to use with -f Dockerfile.aarch64.

Versions

  • 12.02.24: - Use universal hardware acceleration blurb
  • 09.01.24: - Set ownership on TranscoderTempDirectory when it's been saved in Preferences.
  • 16.08.23: - Install unrar from linuxserver repo.
  • 03.07.23: - Deprecate armhf. As announced here
  • 16.10.22: - Rebase to jammy. Update to s6v3. Remove opencl packages (bundled with plex).
  • 18.07.22: - Pin all opencl related driver packages.
  • 16.05.22: - Pin opencl version.
  • 04.03.22: - Increase verbosity of video device permissions fix, attempt to fix missing group rw.
  • 25.12.21: - Install Intel drivers from the official repo.
  • 20.01.21: - Deprecate UMASK_SET in favor of UMASK in baseimage, see above for more information.
  • 10.12.20: - Add latest Intel Compute packages from github repo for opencl support on latest gen igpu.
  • 23.11.20: - Add Bionic branch make Focal default.
  • 03.05.20: - Update exposed ports and example docs for bridge mode.
  • 23.03.20: - Remove udev hack (no longer needed), suppress uuid error in log during first start.
  • 04.12.19: - Add variable for setting PLEX_CLAIM. Remove /transcode volume mapping as it is now set via plex gui and defaults to a location under /config.
  • 06.08.19: - Add variable for setting UMASK.
  • 10.07.19: - Fix permissions for tuner (/dev/dvb) devices.
  • 20.05.19: - Bugfix do not allow Root group for Intel QuickSync ownership rules.
  • 23.03.19: - Switching to new Base images, shift to arm32v7 tag.
  • 22.03.19: - Fix update logic for VERSION=public.
  • 14.03.19: - Switch to new api endpoints, enable beta (plex pass) updates for armhf and aarch64.
  • 15.02.19: - Clean up plex pid after unclean stop.
  • 11.02.19: - Fix nvidia variables, add device variables.
  • 16.01.19: - Add pipeline logic, multi arch, and HW transcoding configuration; remove avahi service.
  • 07.09.18: - Rebase to ubuntu bionic, add udev package.
  • 09.12.17: - Fix continuation lines.
  • 12.07.17: - Add inspect commands to README, move to jenkins build and push.
  • 28.05.17: - Add unrar package as per requests, for subzero plugin.
  • 11.01.17: - Use Plex environment variables from pms docker, change abc home folder to /app to alleviate usermod chowning library
  • 03.01.17: - Use case insensitive version variable matching rather than export and make lowercase.
  • 17.10.16: - Allow use of uppercase version variable
  • 01.10.16: - Add TZ info to README.
  • 09.09.16: - Add layer badges to README.
  • 27.08.16: - Add badges to README.
  • 22.08.16: - Rebased to xenial and s6 overlay
  • 07.04.16: - removed /transcode volume support (upstream Plex change) and modified PlexPass download method to prevent unauthorised usage of paid PMS
  • 24.09.15: - added optional support for volume transcoding (/transcode), and various typo fixes.
  • 17.09.15: - Changed to run chmod only once
  • 19.09.15: - Plex updated their download servers from http to https
  • 28.08.15: - Removed plexpass from routine, and now uses VERSION as a combination fix.
  • 18.07.15: - Moved autoupdate to be hosted by linuxserver.io and implemented bugfix thanks to ljm42.
  • 09.07.15: - Now with ability to pick static version number.
  • 08.07.15: - Now with autoupdates. (Hosted by fanart.tv)
  • 03.07.15: - Fixed a mistake that allowed plex to run as user plex rather than abc (99:100). Thanks to double16 for spotting this.

docker-plex's People

Contributors

adamtheturtle avatar aptalca avatar chbmb avatar cisasteelersfan avatar double16 avatar drizuid avatar hellowlol avatar ironicbadger avatar j0nnymoe avatar linuxserver-ci avatar ljm42 avatar lonix avatar nemchik avatar ninpucho avatar omgimalexis avatar peaches491 avatar pecigonzalo avatar robertbaker avatar roxedus avatar smdion avatar sparklyballs avatar thelamer avatar thespad avatar tobbenb avatar weibell avatar zaggash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-plex's Issues

Container crashes after ~ 1 week

I run your docker iomage for plex media server on Debian Jessy. The server runs 24/7 without interruption.

I noticed that the container crashes or is shut down ~ once a week. How can I find out why?

I noticed a few lines in the logs but don't know if they are the reason:

No service file found in /etc/avahi/services.
*** WARNING: Detected another IPv4 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. ***
*** WARNING: Detected another IPv6 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. ***
Joining mDNS multicast group on interface docker0.IPv4 with address 172.17.42.1.
New relevant interface docker0.IPv4 for mDNS.
Joining mDNS multicast group on interface bond0.IPv4 with address 192.168.170.11

I start my container with
docker start plex

Image is created with

docker create \
--name=plex \
--net=host \
-e VERSION=latest \
-e PUID=111 -e PGID=222 \
-e TZ=Europe/Berlin \
-v /var/lib/plexmediaserver/:/config \
-v /home/username/Music:/data/music_user \
-v /home/username2/Music:/data/music_user2 \
-v "/home/username/Shared/Lightroom Export":/data/pictures \
-v /home/username/Movies:/data/movies \
linuxserver/plex

Config file is from a previous, locally installed version of Plex. I'm a Plex Pass owner.

Multiple Plex Servers

I know this has been asked before but I need help with a walk through. I was given a set of IPs when I got my server setup. I'd like to have multiple Plex servers running on my server. I already have a plain one installed and running just fine. I'd like to have the other Plex server run though Docker on a different IP the company gave me.

They gave me these IPs.
198.xxx.xx.232/29

My server IP now has 198.xxx.xx.234
Could someone help me with walking me through with another docker for my Plex servers? I'd be willing to donate via Paypal at this point.

Crash on Startup/Setup >>'--serverUuid' should follow immediately after the equal sign

I did many test will different version, and values and can't get past this one step.

Look to be a equals sign in the wrong place.

Debian host
Direct pull and setup.
Also I am very familiar with this project.
I have had the same container for months but pulled a new one.


Brought to you by linuxserver.io
We do accept donations at:

https://www.linuxserver.io/donations

GID/UID

User uid: 1001

User gid: 1001

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-dbus: executing...
[cont-init.d] 30-dbus: exited 0.
[cont-init.d] 40-chown-files: executing...
[cont-init.d] 40-chown-files: exited 0.
[cont-init.d] 50-plex-update: executing...
Atempting to upgrade to: 1.2.3.2914-1ff0f18
2016-10-27 22:59:12 URL:https://downloads.plex.tv/plex-media-server/1.2.3.2914-1ff0f18/plexmediaserver_1.2.3.2914-1ff0f18_amd64.deb [101351844/101351844] -> "/tmp/plexmediaserver_1.2.3.2914-1ff0f18_amd64.deb" [1](Reading database ... 10950 files and directories currently installed.)
Preparing to unpack .../plexmediaserver_1.2.3.2914-1ff0f18_amd64.deb ...
/var/lib/dpkg/info/plexmediaserver.prerm: 13: /var/lib/dpkg/info/plexmediaserver.prerm: stop: not found
Unpacking plexmediaserver (1.2.3.2914-1ff0f18) over (1.1.4.2757-24ffd60) ...
Setting up plexmediaserver (1.2.3.2914-1ff0f18) ...
Processing triggers for systemd (229-4ubuntu10) ...
[cont-init.d] 50-plex-update: exited 0.
[cont-init.d] done.
[services.d] starting services
Starting dbus-daemon
Starting Plex Media Server.
[services.d] done.
6 3000 /config/Library/Application Support
8192
Starting Avahi daemon
Found user 'avahi' (UID 106) and group 'avahi' (GID 107).
Successfully dropped root privileges.
avahi-daemon 0.6.32-rc starting up.
Failed to open /etc/resolv.conf: Permission denied
No service file found in /etc/avahi/services.
*** WARNING: Detected another IPv4 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. ***
*** WARNING: Detected another IPv6 mDNS stack running on this host. This makes mDNS unreliable and is thus not recommended. ***
Joining mDNS multicast group on interface docker0.IPv4 with address 172.17.0.1.
New relevant interface docker0.IPv4 for mDNS.
Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.0.20.
New relevant interface eth0.IPv4 for mDNS.
Network interface enumeration completed.
Registering new address record for 172.17.0.1 on docker0.IPv4.
Registering new address record for 192.168.0.20 on eth0.IPv4.
Server startup complete. Host name is omv.local. Local service cookie is 660178480.
****** PLEX MEDIA SERVER CRASHED, CRASH REPORT WRITTEN: /config/Library/Application Support/Plex Media Server/Crash Reports/1.2.3.2914-1ff0f18/PLEX MEDIA SERVER/21839854-4d50-5ff5-524ff319-1ceb1362.dmp
terminate called after throwing an instance of 'std::runtime_error'
what(): Codecs: Initialize: 'Failed to create UUID file'
Segmentation fault
Starting Plex Media Server.
6 3000 /config/Library/Application Support
8192
Error in command line:the argument for option '--serverUuid' should follow immediately after the equal sign
Crash Uploader options (all are required):
--directory arg Directory to scan for crash reports
--serverUuid arg UUID of the server that crashed
--userId arg User that owns this product
--platform arg Platform string
--url arg URL to upload to
--help show help message
--version arg Version of the product
terminate called after throwing an instance of 'std::runtime_error'
what(): Codecs: Initialize: 'Failed to create UUID file'
****** PLEX MEDIA SERVER CRASHED, CRASH REPORT WRITTEN: /config/Library/Application Support/Plex Media Server/Crash Reports/1.2.3.2914-1ff0f18/PLEX MEDIA SERVER/6abcaa36-4fac-5a76-4cc2ae6e-034ffdab.dmp
Segmentation fault
Starting Plex Media Server.
6 3000 /config/Library/Application Support
8192
Error in command line:the argument for option '--serverUuid' should follow immediately after the equal sign
Crash Uploader options (all are required):
--directory arg Directory to scan for crash reports
--serverUuid arg UUID of the server that crashed
--userId arg User that owns this product
--platform arg Platform string
--url arg URL to upload to
--help show help message
--version arg Version of the product
****** PLEX MEDIA SERVER CRASHED, CRASH REPORT WRITTEN: /config/Library/Application Support/Plex Media Server/Crash Reports/1.2.3.2914-1ff0f18/PLEX MEDIA SERVER/743dc8c4-cd30-1314-478d360a-69d77e57.dmp
Segmentation fault

90_chown_plex_owned_files.sh

Recent versions of 90_chown_plex_owned_files.sh have changed from:

chown abc:abc

to

chown abc:root

is that correct? Shouldn't everything be owned by the PGID that is passed in to the docker?

Define a default transcode tmp directory

I like how this docker offers a /transcode volume, it is very powerful. But if the user doesn't define that, will transcoding still happen within docker.img?

Would it be possible for you to detect when /transcode isn't defined and have the docker create and use /config/transcode (or /config/tmp) instead? That would ensure the LS.IO docker never contributes to the docker.img filling up unnecessarily.

The Binhex version of Plex already does this, and I'm opening a similar request with Limetech.

Thanks for considering it!

ummmm multiple servers showing up in devices

This issue has emerged 2 times after restarting the container.

Usually after a "manual" restart. (I do restarts in cron as well)

It seems the container starts up a new instance of plex mediaserver, and both the new and the old shows up in the devices list. The new one is online and accessable, but the old one is shown as offline. All users I have shared libraries with ofc can't reach the libraries, as the original server is offline.

See screenshot: https://www.dropbox.com/s/pomf3wp7oa2e4eq/plexfail.png?dl=0

Workaround for me so far: Delete the original plex server device, and re-share all libraries with users.

Command run to initiate:
docker run --restart=always --name=plex --net=host -e VERSION="plexpass" -e PUID=108 -e PGID=116 -v /etc/docker/linuxserver/plex/config:/config -v /mnt/redstore/video/series:/data/series -v /mnt/rar2fs_video/:/data/norar linuxserver/plex

in nightly cron to allways be updated to latest version (aka I'm super lazy):
m h dom mon dow command
0 4 * * * /usr/bin/docker restart plex

Hangs on update

Hello,

On create i have no issue but when i restart i get stuck on update:

*** Killing all processes...
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/10_add_user_abc.sh...

-------------------------------------
          _     _ _
         | |___| (_) ___
         | / __| | |/ _ \
         | \__ \ | | (_) |
         |_|___/ |_|\___/
               |_|

Brought to you by linuxserver.io
We do accept donations at:
https://www.linuxserver.io/donations
-------------------------------------
GID/UID
-------------------------------------
User uid:    1000
User gid:    1001
-------------------------------------

*** Running /etc/my_init.d/10_dbus.sh...
*** Running /etc/my_init.d/20_apt_update.sh...
*** Running /etc/my_init.d/30_update_plex.sh...

i /bin/bash in the container and did a ping to linuxserver or any other adress it says unknown host.
If i ping by IP it works

creation:

docker create \
    -e VERSION=latest \
    -e PUID=1000 -e PGID=1001 \
    -v ...
    --restart=always \
    --name=plex \
    --net=host \
    linuxserver/plex

VERSION options

I like that you incorporated the plexpass variable into VERSION, but now the latest option doesn't really make sense, since it refers to the public version of Plex and will often not be the latest.

It might make sense to rename the latest option to public, so the instructions for -e VERSION become:

  • -e VERSION - Set this to a full version number if you want to use a specific version e.g. 0.9.12.4.1192-9a47d21, or set it to public or plexpass

is Avahi required when hosted remotely on VPS ?

when i start the container i get lots of 'stuff' about Joining mDNS multicast group on interface.... Since i have 20 containers i have 20 veth interfaces so i get many lines about mDNS.

Not the end of the world but since i run these containers on remote VPS i was wondering if running Avahi was even required ? On local network sure, it helps discovery etc.. but when hosted remotely can the container footprint be reduced by having option to disable Avahi ?

thanks.

Plexpass Error Downloading

I am getting an error when using your image with Plexpass downloading. I am guessing the URL is incorrect as I can't download it even when trying manually.

--2016-01-11 14:27:03-- https://downloads.plex.tv/plex-media-server/%22plexpass%22/plexmediaserver_%22plexpass%22_amd64.deb
plex | Resolving downloads.plex.tv (downloads.plex.tv)... 104.20.7.9, 104.20.6.9, 2400:cb00:2048:1::6814:609, ...
plex | Connecting to downloads.plex.tv (downloads.plex.tv)|104.20.7.9|:443... connected.
plex | HTTP request sent, awaiting response... 404 Not Found
plex | 2016-01-11 14:27:03 ERROR 404: Not Found.

According to the site the path for the latest release is: https://downloads.plex.tv/plex-media-server/0.9.15.0.1621-344f193/plexmediaserver_0.9.15.0.1621-344f193_amd64.deb

not updating to latest version

Hi,
first, thanks for this image.. I'm running it in the containerstation app on a qnap nas and it works great.

I noticed it is not updating plex to the latest version:

Using version: 0.9.16.6.1993-5089475 from Public latest                                                                                                                                                        
Upgrading from version: 0.9.15.6.1714-7be11e1 to version: 0.9.16.6.1993-5089475                                                                                                                                
https://downloads.plex.tv/plex-media-server/0.9.16.6.1993-5089475/plexmediaserver_0.9.16.6.1993-5089475_amd64.deb           

latests version from plex:

https://downloads.plex.tv/plex-media-server/1.0.2.2413-7caf41d/plexmediaserver_1.0.2.2413-7caf41d_amd64.deb

Bastian

Plex Startup Loop

I setup plex on a media library and everything seems fine, shortly after it updates to latest and fetches all the metadata it crashes and just repeats the following in the logs.

�;2017-04-01T01:08:06.514699177Z Starting Plex Media Server.
�J2017-04-01T01:08:06.542001764Z 6 3000 /config/Library/Application Support
�$2017-04-01T01:08:06.542040024Z 8192
�;2017-04-01T01:08:09.768303552Z Starting Plex Media Server.
�J2017-04-01T01:08:09.796615906Z 6 3000 /config/Library/Application Support
�$2017-04-01T01:08:09.796650185Z 8192
�;2017-04-01T01:08:13.021842939Z Starting Plex Media Server.
�J2017-04-01T01:08:13.036341442Z 6 3000 /config/Library/Application Support
�$2017-04-01T01:08:13.036372631Z 8192
�;2017-04-01T01:08:16.261960505Z Starting Plex Media Server.
�J2017-04-01T01:08:16.276077042Z 6 3000 /config/Library/Application Support
�$2017-04-01T01:08:16.276119886Z 8192
�;2017-04-01T01:08:19.501346794Z Starting Plex Media Server.
�J2017-04-01T01:08:19.529055749Z 6 3000 /config/Library/Application Support
�$2017-04-01T01:08:19.529095411Z 8192
�;2017-04-01T01:08:22.754229524Z Starting Plex Media Server.
�J2017-04-01T01:08:22.781426270Z 6 3000 /config/Library/Application Support
�$2017-04-01T01:08:22.781482921Z 8192

Ubuntu Latest

docker create 
--name=plex 
--net=host 
--restart=always 
-e VERSION=latest 
-v /media/Lutece:/data/lutece 
-v /media/Atlas/Plex:/config 
-e PGID=0 
-e PUID=0 
linuxserver/plex

Lutece is a MergerFS mount point and Atlas is a drive in that FS. any ideas on increasing the log verbosity ? I'll be opening an issue on the plex boards as well.

Experiencing random container crashes

I've noticed that my plex container will occasionally crash and restart itself. Here is the excerpt from docker logs

Starting Plex Media Server.
Starting dbus-daemon
Starting Avahi daemon
Found user 'avahi' (UID 104) and group 'avahi' (GID 107).
Successfully dropped root privileges.
avahi-daemon 0.6.31 starting up.
dbus_bus_get_private(): Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
WARNING: Failed to contact D-Bus daemon.
avahi-daemon 0.6.31 exiting.
6 3000 /config/Library/Application Support
8192
Aug 27 01:59:39 pms syslog-ng[120]: syslog-ng starting up; version='3.5.3'
Starting Avahi daemon
Found user 'avahi' (UID 104) and group 'avahi' (GID 107).
Successfully dropped root privileges.
avahi-daemon 0.6.31 starting up.
No service file found in /etc/avahi/services.
Joining mDNS multicast group on interface docker0.IPv4 with address 172.17.0.1.
New relevant interface docker0.IPv4 for mDNS.
Joining mDNS multicast group on interface ens160.IPv6 with address fe80::20c:29ff:fe85:46bc.
New relevant interface ens160.IPv6 for mDNS.
Joining mDNS multicast group on interface ens160.IPv4 with address 192.168.1.53.
New relevant interface ens160.IPv4 for mDNS.
Network interface enumeration completed.
Registering new address record for 172.17.0.1 on docker0.IPv4.
Registering new address record for fe80::20c:29ff:fe85:46bc on ens160.*.
Registering new address record for 192.168.1.53 on ens160.IPv4.
Registering HINFO record with values 'X86_64'/'LINUX'.
Server startup complete. Host name is pms.local. Local service cookie is 4113966059.
Aug 27 02:17:02 pms /USR/SBIN/CRON[1549]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Got SIGTERM, quitting.
Leaving mDNS multicast group on interface docker0.IPv4 with address 172.17.0.1.
Leaving mDNS multicast group on interface ens160.IPv6 with address fe80::20c:29ff:fe85:46bc.
Leaving mDNS multicast group on interface ens160.IPv4 with address 192.168.1.53.
avahi-daemon 0.6.31 exiting.
*** Shutting down runit daemon (PID 107)...
*** Killing all processes...

Doesn't seem to be anything related to the restart in the log that I can see. Any idea how to get more information on why this might be happening?

An update is available. Please install manually.

I am running the latest docker image. My server is currently at version 1.0.0.2261. My container will not update. In the server settings, it says "An update is available. Please install manually" with a link to the deb file. The What's New indicates the version available is 1.0.2.2413.

Container shutdown freezing

Trying to shutdown (or restart) this container is hanging. When I check the logs (ie, docker logs -f plex), it appears to be stuck on the following step;

[s6-finish] syncing disks.

Just checked, and I'm not sure if this is isolated to plex since I've got a similar issue with some other lsio containers.

Can't run without --net=host

Pretty much what it says in the title, plus:

diutsu@heimdall: sudo docker create \  
  --name="plex" \
  -e version=latest \
  -e PUID=0 -e PGID=0 \
  -p 32400:32400 \
  -p 32400:32400/udp \
  -p 32469:32469 \
  -p 32469:32469/udp \
  -p 5353:5353/udp \
  -p 1900:1900/udp \
  -v /data/tmp/plx:/config \
  -v /data/tmp/tv:/data/tvshows \
  -v /data/tmp/movies:/data/movies \
  linuxserver/plex

5278c85286403410ae6e52367b61e76365eb3e5141a7804c440787bbd64ced5d
diutsu@heimdall: sudo docker start plex
Error response from daemon: Container command '/sbin/my_init' not found or does not exist.
Error: failed to start containers: plex

also, if I run with an equivalent docker compose it outputs even more stuff:

Starting plex

ERROR: for plex  b"Container command '/sbin/my_init' not found or does not exist."
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 58, in main
    command()
  File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 109, in perform_command
    handler(command, command_options)
  File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 734, in up
    remove_orphans=remove_orphans)
  File "/usr/lib/python3.5/site-packages/compose/project.py", line 402, in up
    'Encountered errors while bringing up the project.'
compose.project.ProjectError: Encountered errors while bringing up the project.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 9, in <module>
    load_entry_point('docker-compose==1.7.1', 'console_scripts', 'docker-compose')()
  File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 63, in main
    log.error(e.msg)
AttributeError: 'ProjectError' object has no attribute 'msg'

Am I doing this wrong or missing a port?

Hangs while executing 10_add_user_abc.sh

No idea why, but after running the container I'll often find that it has hung on this script for some reason (I'm running it on ubuntu):

ross@dar-docker-01:~$ docker version
Client:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 22:00:43 2016
OS/Arch: linux/amd64

Server:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 22:00:43 2016
OS/Arch: linux/amd64

Not really sure what else I can do to try and track down why it hangs, and a restart of the container always fixes it.

Unable to register plex server from docker image

Tried to use your docker plex image and can't register it as a server. Upon starting up and initial connect, it takes you direct to a sign in screen. This is the incorrect behavior, it should allow you to setup the plex instance, then sign in to register it as a server.

Logging into the plex instance only gives you the ability to view friends media, the same as signing in to plex.tv and nothing else.

Running this on Ubuntu 14.04.4 LTS with Docker 1.12.3

docker run -d -p 32400:32400 -p 32469:32469 -v /remote:/remote --name plex linuxserver/plex

docker logs output - http://pastebin.com/4r9j6abc

Does not update to latest plex.

Restarting the container does not update it to the latest version of plex. Seems to be stuck on 0.9
*** Running /etc/my_init.d/30_update_plex.sh...
Using version: 0.9.16.6.1993-5089475 from Public latest
No need to update!

However latest plex is 1.0.0.2261-a17e99e.

ARM build for Raspberry Pi

Thank you so much for providing this image! I'd love to be able to run this on my RPi at home. Is there an ARM build of this image anywhere? If not, are there any plans for that? Anything I can do to help, please let me know.

Support plexpass

Could we support plexpass? The changes could be done by passing plex credentials in a file or environment variables. plexupdate could make it quite easy to do this or provide an example of how to get the plexpass download.

Doing this could also fix the download link, which I assume has been broken since the 1.0 update.

I wouldn't mind submitting a PR for this, but I would like to know if it would be fine to use plexupdate directly. I'm not sure if it would make a difference, but plexupdate seems to be licensed by GPLv2.

Download not available

I restarted my plex container and now I'm seeing this error in the docker logs.

--2016-03-05 03:55:14-- https://downloads.plex.tv/plex-media-server//plexmediaserver__amd64.deb Resolving downloads.plex.tv (downloads.plex.tv)... 104.20.6.9, 104.20.7.9, 2400:cb00:2048:1::6814:709, ... Connecting to downloads.plex.tv (downloads.plex.tv)|104.20.6.9|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2016-03-05 03:55:14 ERROR 404: Not Found.

Execute error of codecs

Getting errors when starting to play video.

Reason: need exec acces to plex config folder. Using docker on OMV which refuses execute.
Please move codec folder to docker image location. and rest of plex library can be as usual.

Thank you for looking into this

test2

last test, ignore me

Logs from Docker are inaccessible

When trying to access the logs for this container using docker logs <container-id> the following error is produced:

"logs" command is supported only for "json-file" and "journald" logging drivers (got: syslog)

Rockstor 3.8.16-1

Update to v1.0 not detected

Update issue, seems to be stuck at v0.9.16.6.1993 and doesn't do v1.0.0.2261

The GUI does detect the updates, seems the update script doesn't for some reason.

From the logs:
Using version: 0.9.16.6.1993-5089475 from Public latest
No need to update!

Seems that manually stepping through works and takes me to 1.0:
curl -L 'https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu' -o /tmp/plexmediaserver.deb
dpkg -i /tmp/plexmediaserver.deb
rm -f /tmp/plexmediaserver.deb

Soon as I restart it reverts back to 0.9:
*** Running /etc/my_init.d/30_update_plex.sh...
Using version: 0.9.16.6.1993-5089475 from Public latest
Upgrading from version: 1.0.0.2261-a17e99e to version: 0.9.16.6.1993-5089475
--2016-06-28 06:52:57-- https://downloads.plex.tv/plex-media-server/0.9.16.6.1993-5089475/plexmediaserver_0.9.16.6.1993-5089475_amd64.deb

Update Issues

Host OS: QNap TVS-663 running firmware 4.2.2 with Container Station 1.6.1709

Environment Vars
Name Value
DEBIAN_FRONTEND noninteractive
HOME /config
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PGID 0
PLEX_DOWNLOAD https://downloads.plex.tv/plex-media-server
PLEX_INSTALL https://plex.tv/downloads/latest/1?channel
PUID 0
TERM xterm
VERSION latest

When the docker container is rebooted I get this in the logs:

Atempting to upgrade to:
https://downloads.plex.tv/plex-media-server/%20/plexmediaserver_%20_amd64.deb:
2016-10-20 15:59:55 ERROR 404: Not Found.

Upgrade attempt failed, this could be because either

plex update site is down, local network issues, or

you were trying to get a version that simply doesn't

exist, check over the VERSION variable thoroughly &

correct it or try again later.

[cont-init.d] 50-plex-update: exited 0.
[cont-init.d] done.

Any assistance would be greatly appreciated.

Thanks!

PlexOnlineToken

I've successfully installed and run docker image, but always getting message:

plex    | #####################################################
plex    | #   Login via the webui at http://<ip>:32400/web    #
plex    | #   and restart the docker, because there was no    #
plex    | #      plex token found in the preference file      #
plex    | #####################################################

The web UI says (after login):
A server could not be found. Download and install Plex Media Server, and it will appear here. Where is my server?
and
Install your new server

Host OS:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:    16.04
Codename:   xenial

docker-compose.yml file:

version: '2'

services:
  plex:
    image: linuxserver/plex
    container_name: plex
    environment:
      - VERSION=latest
      - PUID=1000
      - PGID=1000
    volumes:
      - "../volumes/config:/config"
      - "../volumes/data:/data"
      - "../volumes/transcode:/transcode"
    ports:
      - "32400:32400"
      - "32400:32400/udp"
      - "32469:32469"
      - "32469:32469/udp"
      - "5353:5353/udp"
      - "1900:1900/udp"

run command:

docker-compose up

Docker output:

plex    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
plex    | [s6-init] ensuring user provided files have correct perms...exited 0.
plex    | [fix-attrs.d] applying ownership & permissions fixes...
plex    | [fix-attrs.d] done.
plex    | [cont-init.d] executing container initialization scripts...
plex    | [cont-init.d] 10-adduser: executing...
plex    |
plex    | -------------------------------------
plex    |           _     _ _
plex    |          | |___| (_) ___
plex    |          | / __| | |/ _ \
plex    |          | \__ \ | | (_) |
plex    |          |_|___/ |_|\___/
plex    |                |_|
plex    |
plex    | Brought to you by linuxserver.io
plex    | We do accept donations at:
plex    | https://www.linuxserver.io/donations
plex    | -------------------------------------
plex    | GID/UID
plex    | -------------------------------------
plex    | User uid:    1000
plex    | User gid:    1000
plex    | -------------------------------------
plex    |
plex    | [cont-init.d] 10-adduser: exited 0.
plex    | [cont-init.d] 30-dbus: executing...
plex    | [cont-init.d] 30-dbus: exited 0.
plex    | [cont-init.d] 40-chown-files: executing...
plex    | [cont-init.d] 40-chown-files: exited 0.
plex    | [cont-init.d] 50-plex-update: executing...
plex    |
plex    |
plex    |
plex    | #####################################################
plex    | #   Login via the webui at http://<ip>:32400/web    #
plex    | #   and restart the docker, because there was no    #
plex    | #      plex token found in the preference file      #
plex    | #####################################################
plex    |
plex    |
plex    | [cont-init.d] 50-plex-update: exited 0.
plex    | [cont-init.d] done.
plex    | [services.d] starting services
plex    | Starting dbus-daemon
plex    | Starting Plex Media Server.
plex    | 6 3000 /config/Library/Application Support
plex    | 8192
plex    | [services.d] done.
plex    | Starting Avahi daemon
plex    | Found user 'avahi' (UID 106) and group 'avahi' (GID 107).
plex    | Successfully dropped root privileges.
plex    | avahi-daemon 0.6.32-rc starting up.
plex    | No service file found in /etc/avahi/services.
plex    | Joining mDNS multicast group on interface eth0.IPv6 with address fe80::42:acff:fe12:9.
plex    | New relevant interface eth0.IPv6 for mDNS.
plex    | Joining mDNS multicast group on interface eth0.IPv4 with address 172.18.0.9.
plex    | New relevant interface eth0.IPv4 for mDNS.
plex    | Network interface enumeration completed.
plex    | Registering new address record for fe80::42:acff:fe12:9 on eth0.*.
plex    | Registering new address record for 172.18.0.9 on eth0.IPv4.
plex    | Server startup complete. Host name is 3b60b1204411.local. Local service cookie is 2452984411.

config/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml (not sure what is secret, so I will remove them)

<?xml version="1.0" encoding="utf-8"?>
<Preferences OldestPreviousVersion="1.1.4.2757-24ffd60" MachineIdentifier="VALUE REMOVED" ProcessedMachineIdentifier="VALUE REMOVED" AnonymousMachineIdentifier="VALUE REMOVED" agentAutoEnabled.com.plexapp.agents.lastfm.Artists.com.plexapp.agents.vevo="1" MetricsEpoch="1" GracenoteUser="VALUE REMOVED"/>

I have plex account but don't have paid subscription. Restarting docker doesn't change anything. I've removed VERSION env, but the result (except the message) is the same - no plex server

If you need any other information just let me know - I will do my best to help.

Web interface does not start, s6 errors

I create and start exactly as described:

docker create \
--name=plex \
--net=host \
-e VERSION=latest \
-e PUID=501 -e PGID=501 \
-e TZ=Europe/London \
-v /data/data1/SHARED/plex1/config \
-v /data/data1/SHARED/plex1/data/tvshows \
-v /data/data1/SHARED/plex1/data/movies \
-v /data/data1/SHARED/plex1/transcode \
linuxserver/plex

docker start plex
docker logs -f plex

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing... 
-------------------------------------
          _     _ _
         | |___| (_) ___
         | / __| | |/ _ \ 
         | \__ \ | | (_) |
         |_|___/ |_|\___/
               |_|
Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/index.php/donations/
-------------------------------------
GID/UID
-------------------------------------
User uid:    501
User gid:    501
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-dbus: executing... 
[cont-init.d] 30-dbus: exited 0.
[cont-init.d] 40-chown-files: executing... 
[cont-init.d] 40-chown-files: exited 0.
[cont-init.d] 50-plex-update: executing... 
#####################################################
#   Login via the webui at http://<ip>:32400/web    #
#   and restart the docker, because there was no    #
#   preference file found, possibly first startup.  #
#####################################################
[cont-init.d] 50-plex-update: exited 0.
[cont-init.d] done.
[services.d] starting services
s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise avahi: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise plex: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise dbus: warning: unable to spawn ./run - waiting 10 seconds
[services.d] done.
s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise avahi: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise plex: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise dbus: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise dbus: warning: unable to spawn ./run - waiting 10 seconds

and on and on...

I'm running

# docker --version
Docker version 1.10.3, build e03ddb8/1.10.3

On Fedora 24

Dockerfile should expose used ports

The readme.md explains which ports to map if you want to run Plex in bridge mode, would you please expose those ports in the Dockerfile? I think this would be the command:

EXPOSE 32400 32400/udp 32469 32469/udp 5353/udp 1900/udp

Conversion failed. The transcoder crashed or failed to start up. Its exit code was 1

Issue

When trying to start a video, it stalls for a while, then I get the error Conversion failed. The transcoder crashed or failed to start up. Its exit code was 1

A few months ago when updating to version 1.something I ran in to this, and found out that plex had moved the transcode binarys to the library folder (/config in this image), but since docker volumes are mounted with noexec it can't be run from there. My solution back then was to stick with version 0.9.16.6.1993-5089475 (last one before the move). But now that is not an option any more since plex updated their /web/app.

My question is, how has everyone else solved this? Or is nobody using volume mounts for /config?

My env

Host OS: Linux Mint
Log output: None (when error occures)
No symlinks in mounts

Using docker-compose to start container:

  plex:
    build: ./.plex/image/
    container_name: plex
    privileged: true
    network_mode: "host"
    restart: always
    environment:
      PUID: 1000
      PGID: 1000
      VERSION: latest
      TZ: europe/stockholm
    cap_add:
      - SYS_ADMIN
    devices:
      - /dev/fuse
    volumes:
      - ./.plex:/config
    volumes_from:
      - data:ro

I'm running rar2fs on the same container, that's why I'm using a different image (that has FROM linuxserver/plex)

Webinterface not starting anymore

I have a situation where Plex is running but the webserver is not.

I previously used Limetech Plex docker on Unraid for a while, but wanted to use the latest plex pass version so i switched to Linuxserver Plex. Odd thing is, it ran OK for a few hours before the issue appeared.

I document it here with all specifics i can find, it may be of use to others.

The conversion was simple:
I removed the old docker, then installed this one.
Set the config and media directories, and launched it.
For a few hours the webinterface was working fine. Now a day later i find that its offline.

Browser (Chrome) says:

The 192.168.2.30 page isn’t working
192.168.2.30 didn’t send any data.
ERR_EMPTY_RESPONSE

The Linuxserver Plex docker settings in Unraid 6.1.7:
image
edit: replaced screenshot, no plexpass version

The docker log in Unraid:

-------------------------------------
_ _ _
| |___| (_) ___
| / __| | |/ _ \ 
| \__ \ | | (_) |
|_|___/ |_|\___/
|_|

Brought to you by linuxserver.io
We do accept donations at:
https://www.linuxserver.io/donations
-------------------------------------
GID/UID
-------------------------------------
User uid: 99
User gid: 100
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-dbus: executing... 
[cont-init.d] 30-dbus: exited 0.
[cont-init.d] 40-chown-files: executing... 
[cont-init.d] 40-chown-files: exited 0.
[cont-init.d] 50-plex-update: executing... 
No update required
[cont-init.d] 50-plex-update: exited 0.
[cont-init.d] done.
[services.d] starting services
Starting Plex Media Server.
Starting dbus-daemon
6 3000 /config/Library/Application Support
unlimited
[services.d] done.
Starting Avahi daemon

Yep, that log just ends there when i reboot it. At this point the Plex server is usable via Android app (browsing and streaming) but not via a webinterface.

I once found some avahi errors via a ssh session somewhere, but right now cant find it anymore.

No symlinks involved that i am aware of, i didnt make any for sure.

I'm going to update this issue with my findings. I do this here instead of on the Limetech forum because i use this docker, i followed all instructions available that i am aware of, and because i saw avahi errors for this docker.

Consider supporting healthchecks

I know this image is mainly used by unraid, but I'm using v1.12 and it would be great to have healthcheck support so I can easily see if plex is running ok. Also with Swarm it could automatically restart plex for me.

Happy to do a PR with the healthcheck added.

[REQ] Update without CHMOD

Provide a general summary of the issue in the Title above

linuxserver.io

If you have an issue with the project, please provide us with the following information

Host OS
Ubuntu 16.10 / Docker
Command line users, your run/create command, GUI/Unraid users, a screenshot of your template settings
Docker-compose up -d
** Docker log output, docker log **

plex_1     | *** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
plex_1     | *** Running /etc/my_init.d/10_add_user_abc.sh...

** Mention if you're using symlinks on any of the volume mounts. **
Volume mounts to /opt/data/plex (in VM)

If you have a suggestion or fix for the project, please provide us with the following information

Please add a option to skip the chmod process, it takes over 15 minutes on a large library... and i'm already using NVME disks....

** What you think your suggestion brings to the project, or fixes with the project**
Adds to the user experience.

If it's a fix, would it be better suited as a Pull request to the repo ?

Possibly

Thanks, team linuxserver.io

Server not available (marked offline) to clients

On macOS, I have the following configuration and able to claim server with my account (PlexPass). I can use the browser on the local machine to access the server, but not with any clients (i.e. iOS). The server is listed, but marked offline all the time.

  plex:
    image: linuxserver/plex
    container_name: plex
    # network_mode: host
    #   does not work ib macOS currently
    #   https://github.com/docker/compose/issues/3800
    ports:
      - "32400:32400"
      - "32400:32400/udp"
      - "32469:32469"
      - "32469:32469/udp"
      - "5353:5353/udp"
      - "1900:1900/udp"
    volumes:
      - ~/.server-io/plex/config:/config
      - ~/.server-io/plex/transcode:/transcode
      ........
    environment:
      - PUID=501
      - PGID=20
      - TZ=Europe/XXXX
      - VERSION=latest

OSX Native Docker; Cannot connect to Plex

Summary

I've attempted to use linuxserver/docker-plex a couple different ways, and it just doesn't become accessible.. Connection refused on port 32400.
Connecting to the docker instance and running curl http://127.0.0.1:32400 does give the expected XML.

Host OS

OSX 10.12.1
Docker Version 1.12.3 (13776)

Create/Run command

docker create \
--name=plexzackreed \
--net=host \
-e VERSION=latest \
-e PUID=501 -e PGID=20 \
-e TZ=America/Halifax \
-v ~/plexconfigzackreed:/config \
-v /Volumes:/Volumes \
-v ~/plexconfigzackreedtranscode:/transcode \

Then docker start plexzackreed

Logs

docker logs -f plexzackreed
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing... 

-------------------------------------
          _     _ _
         | |___| (_) ___
         | / __| | |/ _ \ 
         | \__ \ | | (_) |
         |_|___/ |_|\___/
               |_|

Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/index.php/donations/
-------------------------------------
GID/UID
-------------------------------------
User uid:    501
User gid:    20
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-dbus: executing... 
[cont-init.d] 30-dbus: exited 0.
[cont-init.d] 40-chown-files: executing... 
[cont-init.d] 40-chown-files: exited 0.
[cont-init.d] 50-plex-update: executing... 



#####################################################
#   Login via the webui at http://<ip>:32400/web    #
#   and restart the docker, because there was no    #
#   preference file found, possibly first startup.  #
#####################################################


[cont-init.d] 50-plex-update: exited 0.
[cont-init.d] done.
[services.d] starting services
Starting Plex Media Server.
Starting dbus-daemon
[services.d] done.
6 3000 /config/Library/Application Support
8192
Starting Avahi daemon
Found user 'avahi' (UID 106) and group 'avahi' (GID 107).
Successfully dropped root privileges.
avahi-daemon 0.6.32-rc starting up.
No service file found in /etc/avahi/services.
Joining mDNS multicast group on interface vethf763e13.IPv6 with address fe80::d094:43ff:fe29:dfd1.
New relevant interface vethf763e13.IPv6 for mDNS.
Joining mDNS multicast group on interface docker0.IPv6 with address fe80::42:a2ff:fed9:d90e.
New relevant interface docker0.IPv6 for mDNS.
Joining mDNS multicast group on interface docker0.IPv4 with address 172.17.0.1.
New relevant interface docker0.IPv4 for mDNS.
Joining mDNS multicast group on interface eth0.IPv6 with address fe80::e703:e65f:a73b:5a0c.
New relevant interface eth0.IPv6 for mDNS.
Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.65.2.
New relevant interface eth0.IPv4 for mDNS.
Network interface enumeration completed.
Registering new address record for fe80::d094:43ff:fe29:dfd1 on vethf763e13.*.
Registering new address record for fe80::42:a2ff:fed9:d90e on docker0.*.
Registering new address record for 172.17.0.1 on docker0.IPv4.
Registering new address record for fe80::e703:e65f:a73b:5a0c on eth0.*.
Registering new address record for 192.168.65.2 on eth0.IPv4.
Server startup complete. Host name is moby.local. Local service cookie is 2290568700.
Exception AttributeError: "'ZipArchive' object has no attribute '_zip'" in <bound method ZipArchive.__del__ of <Framework.components.data.ZipArchive object at 0x307e1d0>> ignored

No Symlinks for Volumes mounts

[REQ

linuxserver.io

Thanks, team linuxserver.io

NFS setup issues.

Hey Guys

I'm using your image on my docker server (managed through docker cloud).
Yesterday I set up the image and this morning I get the following log messages:

2016-07-22T03:17:12.500184068Z Database corruption: sqlite3_statement_backend::prepare: unable to open database file for SQL: PRAGMA cache_size=4000

After a restart of the image, the server does not reach a stable state and I get the following error:

Error: Unable to set up server: sqlite3_statement_backend::prepare: unable to open database file for SQL: PRAGMA cache_size=4000 (N4soci10soci_errorE)

The setup has 1 speciality, I mount the config directory via NFS to my NAS.

Container -> Host -> NAS.

Is there any solution for this or am I doomed? :-)

Cheers
Chris

"Received packet from invalid interface" in logs

When I look at the logs for my Plex container (via docker logs -f plex), I see many lines reading, "Received packet from invalid interface". Here is the portion of my docker-compose.yml associated with Plex:

  plex:
    image: linuxserver/plex
    container_name: plex
    volumes:
      - /opt/appdata/plex:/config
      - /mnt/storage:/data
    network_mode: host
    restart: always
    environment:
      - VERSION=latest
      - PUID=${PUID}
      - PGID=${PGID}

The PUID and PGID are defined as vars, and they correspond to the IDs for dockeruser and dockergroup.

I don't recall seeing this when I first got it running, but I see it all of the time now. Restarting the Plex container doesn't change the behavior, nor does restarting the entire host.

30_update_plex.sh hangs on ping loop

I apologize in advance if I'm missing something simple, I've not messed with docker much until this setup. On my system, (Fresh stock Ubuntu 15.10 install), 30_update_plex.sh gets stuck in the ping loop indefinitely and hogs CPU. After running the commands below, the script runs fine.

$ docker exec plex ping -c1 tools.linuxserver.io
ping: unknown host tools.linuxserver.io
$ docker exec plex /bin/bash -c "echo 'nameserver 8.8.8.8' >> /etc/resolv.conf"
$ docker exec plex ping -c1 tools.linuxserver.io
PING tools.linuxserver.io (104.18.61.43) 56(84) bytes of data.
64 bytes from 104.18.61.43: icmp_seq=1 ttl=53 time=19.3 ms

--- tools.linuxserver.io ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 19.389/19.389/19.389/0.000 ms

unable to exec run

After updating to the latest CentOS 7.3 and all patches, I get a new error. This was working fine in the previous version of Docker, but with 1.10.3 (latest stock), it breaks on startup with this:

s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise avahi: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise dbus: warning: unable to spawn ./run - waiting 10 seconds
s6-supervise (child): fatal: unable to exec run: Permission denied
s6-supervise plex: warning: unable to spawn ./run - waiting 10 seconds

This may be related to this error:
just-containers/s6-overlay#158

Curl command to find plex version fails on reboot

When I have restart always set and I reboot the server, on restart, the container cannot find the downloads.plex.tv server. It says this in my logs over and over again.

If I do a docker restart then it downloads fine. If I docker exec into the container, I can ping downloads.plex.tv just fine.

--2015-12-25 07:14:29--  https://downloads.plex.tv/plex-media-server//plexmediaserver__amd64.deb
Resolving downloads.plex.tv (downloads.plex.tv)... 2400:cb00:2048:1::6814:609, 2400:cb00:2048:1::6814:709, 104.20.6.9, ...
Connecting to downloads.plex.tv (downloads.plex.tv)|2400:cb00:2048:1::6814:609|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-12-25 07:14:29 ERROR 404: Not Found.
--2015-12-25 07:14:29--  https://downloads.plex.tv/plex-media-server//plexmediaserver__amd64.deb
Resolving downloads.plex.tv (downloads.plex.tv)... 2400:cb00:2048:1::6814:709, 2400:cb00:2048:1::6814:609, 104.20.7.9, ...
Connecting to downloads.plex.tv (downloads.plex.tv)|2400:cb00:2048:1::6814:709|:443... connected.

Are you able to cast something to a chromecast using this image ?

Ok so I used to have the plexmediaserver installed on a ubuntu server and all worked just fine.

Recently I change all my infrastructure to use docker and suddenly the cast feature stopped working. I spent quite some time investigating on this and I have a beginning of a solution.

I think all comes down to the fact that I have my own DNS server internally so when I'm connected to Plex I use plex.myowndomain.com. As far as I understand, when the cast is asked to play something, Plex send it a url to play this url will contain plex.myowndomain.com. The first issue here is that the Chromecast is using google DNS regardless of what the DHCP server is telling giving it...

I was able to confirm that theory by routing 8.8.8.8 and 8.8.4.4 to my DNS and it worked ! Although some times when accessing the Plex server by it's ip:port it didn't work as well...

Right so you might says : what is docker-plex has to do with this !?

If I'm honest I don't know... I only know that it used to work all the time when Plex was used natively.
I will continue to investigate this but if you have any suggestion, that might be useful thanks !

Latest version appears to have a broken auto update

Hello,

Noticed with the latest release that restarting my plex container no longer appears to update the sever.

A quick check of the logs suggests it may be having trouble reading the $REMOTE_VERSION

Atempting to upgrade to:
https://downloads.plex.tv/plex-media-server/%20/plexmediaserver_%20_amd64.deb:
2017-02-02 18:32:34 ERROR 404: Not Found.

Haven't had a chance to properly read through the plex update script yet to debug any further, but was wondering if others were having the same issue (or if i've just manged to get my container in to a weird state)

In case it helps:

Host O/S: Ubuntu
Using: -VERSION=latest
Am a plexpass user

Have been using an old version of the container without issues for a while now & only recently updated. Previously updating the server stuff worked as expected.

EDIT:

Tiny bit more debugging, may be somthing on plex's end has changed
https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu&X-Plex-Token=<snip> appears to return blank for me

Bridged mode trouble

When running in bridged mode, the docker container IP gets published to Plex instead of the server IP hosting docker. This gives users the unreachable server error when trying to connect to their server.

If you'd be able to get to the remote access tab, you would see something like this:
Private 172.17.0.2:32400 <- Public External.IP.Address <- Internet

When you would really want to see something like this:
Private 192.168.1.15:32400 <- Public External.IP.Address <- Internet

You can fix running in bridged mode by adding customConnections=" https://docker.host.ip:32400" to preferences.xml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.