Giter VIP home page Giter VIP logo

plex-media-server's Introduction

Latest Version Image Size Docker Pulls Docker Stars Build Status

The smallest* Plex Media Server docker image, built FROM scratch with musl provided by Plex and supporting libraries and binaries built from source. The container hosts a fully featured Plex Media Server, with almost all of the useless crap removed, resulting in the smallest container possible whilst maintaining full functionality.

*last we checked

Getting Started

Navigate to plex.tv/claim and obtain a token in the form claim-xxxx...

Start the container, as demonstrated below, passing the claim token via the PLEX_CLAIM environment variable. This only has to be present on the first run (when the configuration is generated/if you need to re-claim the server at any time) and can be removed for subsequent runs. The Plex claim token is optional however it will make the server available to your account immediately.

Setting the container hostname on first boot will set the Plex server name.

docker run -dt \
    --name=plex \
    --restart=unless-stopped \
    --hostname=my-plex-server \
    -p 32400:32400 \
    -e PLEX_CLAIM=claim-xxxx... \
    -v /config/plex:/config \
    -v /transcode:/transcode \
    -v /media:/media \
    spritsail/plex-media-server

Finally, navigate to app.plex.tv/desktop or your-ip:32400/web and you're done!

Volumes

  • /config - Configuration, logs, caches and other Plex crap. You should keep this
  • /transcode - Transcoder temporary directory. This should be backed by fast storage, ideally tmpfs/RAM.
  • Don't forget to mount your media (tv-shows/movies) inside the container too!

Environment

  • $SUID - User ID to run as default: 900
  • $SGID - Group ID to run as default: 900
  • $ALLOWED_NETWORKS - IP/netmask entries which allow access to the server without requiring authorization. We recommend you set this only if you do not sign in your server. 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.
  • $ADVERTISE_IP - This variable defines the additional IPs on which the server may be be found. For example: http://10.1.1.23:32400. This adds to the list where the server advertises that it can be found.
  • $DISABLE_REMOTE_SEC -
  • $PLEX_CLAIM - The claim token for the server to obtain a real server token. If not provided, server will not be automatically logged in. If server is already logged in, this parameter is ignored.
  • $LOG_DEBUG - Disables debug logging if set to 0, and enables it if set to 1. This overwrites preferences set in the Plex Web user interface.
  • $LOG_VERBOSE - Disables logging (except warnings and errors) if set to 0, and enables it if set to 1. This overwrites preferences set in the Plex Web user interface.

Network

The following ports are all used by Plex for various applications

  • 32400/tcp Plex Web/Client Access
  • 5353/udp Bonjour/Avahi
  • 3005/tcp Plex Home Theatre via Plex Companion
  • 8324/tcp Plex for Roku via Plex Companion
  • 1900/udp Plex DLNA Server
  • 32469/udp Plex DLNA Server
  • 32410/udp GDM network discovery
  • 32412/udp GDM network discovery
  • 32413/udp GDM network discovery
  • 32414/udp GDM network discovery

See also: https://support.plex.tv/articles/201543147-what-network-ports-do-i-need-to-allow-through-my-firewall/

At the very least, you should expose 32400/tcp to your network, and port forward it through your router if you would like Plex access outside your home network.

If you wish, you can map the Plex port to any other port outside your network, just be sure to update the port in Settings > Server > Remote Access (Show Advanced) under Manually specify public port.

Troubleshooting

  • Help, I accidentally logged my server out and I can no longer access it Just get another claim token from plex.tv/claim and restart the container with it in the environment variable PLEX_CLAIM. This should re-claim your server and it'll appear in your server list once again. You can remove the claim token as soon as the server has been claimed- they expire after 5 minutes anyway

plex-media-server's People

Contributors

adam-ant avatar dpini avatar frebib avatar qdm12 avatar spritsailbot avatar tbk 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plex-media-server's Issues

PROMOTION ISSUE CANT ACCESS MY MEDIA FILES

HI THANKS FOR YOUR HARD WORK ON THIS BUILD BUT
I HAVE SINOLOGY
SUID AND SGID DONT LET ME ACCESS MY MEDIA DRIVER

I TRIED FIRST TO CHANGE 900 TO MY ACCOUNT BUT STUCK ON RESTART CONTAINER
CHANGE IT TO PLEX_UID AND PLEX_GID DOSENT WORK ETHER
AFTER THAT CHANGE IT TO PUID AND PGID ALSO NOTHING CHANGE AND I STILL CANT ACCESS MY MEDIA ON PLEX
IS THERE A SOLUTION ?

Add nvidia libraries for hardware-accelerated en-/decoding

Please add librarys required for HW acceleration to work to the container.

Apr 07, 2021 12:12:08.892 [0x7fd516ffd640] ERROR - [Transcode] [FFMPEG] - Cannot load libnvidia-encode.so.1
Apr 07, 2021 12:12:08.892 [0x7fd516ffd640] ERROR - [Transcode] [FFMPEG] - The minimum required Nvidia driver for nvenc is 418.30 or newer
Apr 07, 2021 12:12:08.934 [0x7fd516ffd640] WARN - [Transcode] Codecs: avcodec_open2 returned -1 for encoder 'h264_nvenc'
Apr 07, 2021 12:12:09.164 [0x7fd516ffd640] ERROR - [Transcode] [FFMPEG] - Cannot load libnvidia-encode.so.1
Apr 07, 2021 12:12:09.164 [0x7fd516ffd640] ERROR - [Transcode] [FFMPEG] - The minimum required Nvidia driver for nvenc is 418.30 or newer
Apr 07, 2021 12:12:09.200 [0x7fd516ffd640] WARN - [Transcode] Codecs: avcodec_open2 returned -1 for encoder 'h264_nvenc'
Apr 07, 2021 12:12:09.990 [0x7fd532515640] ERROR - Error issuing curl_easy_perform(handle): 3
Apr 07, 2021 12:12:09.990 [0x7fd532515640] WARN - HTTP error requesting GET /media/providers (3, Error) ()
Apr 07, 2021 12:12:10.188 [0x7fd532515640] ERROR - Unknown metadata type: 
Apr 07, 2021 12:12:11.403 [0x7fd4ff7fe640] ERROR - [Transcoder] [h264 @ 0x393a700] Cannot load libnvcuvid.so.1
Apr 07, 2021 12:12:11.403 [0x7fd4bbfff640] ERROR - [Transcoder] [h264 @ 0x393a700] Failed loading nvcuvid.
Apr 07, 2021 12:12:11.404 [0x7fd516ffd640] ERROR - [Transcoder] [h264 @ 0x393a700] Failed setup for format cuda: hwaccel initialisation returned error.

Any plans for a raspberry pi (4) build?

Hi all,

would a raspberry pi build be possible too? Can this be added to the process? Has this been tried already?

Would not mind giving a hand, if you point me to a starting point?

with kind regards,
G

SUID and SGID cannot be set

I cannot set the SUID and SGID. It is setting back to 900 which I believe is the default here. Is there a way to set to 1000?

Error I am getting ... host and group id is 1000
Jan 05, 2022 02:18:01.025 [0x7fbd5f3b06e8] ERROR - IsFileWritable: failed to create file '"/transcode/689019a8-0626-46a3-a8d7-b0dfbefcc548"'

Below is my docker compose file ...

version: "2.1"
services:
plex:
image: spirit/plex-media-server
container_name: plex-amd
network_mode: host
environment:
- SUID:1000
- SGID:1000
volumes:
- /home/firestorm/plex/config:/config
- /home/firestorm/plex/transcode:/transcode
- /mnt/NAS:/media
- /dev/dri:/dev/dri
restart: unless-stopped

Add timezone variable/bind mount option.

I don't see any way to set the timezone. It defaults to UTC and would like to change that.

Typical approaches for setting timezone in docker containers would be to either set an environment variable or bind mount /etc/localtime or /etc/timezone.

Neither of these options work, unless I'm doing something wrong.

Environment variable for less Debug logs?

Hi there,

First of all thanks for this great image and maintenance! I see there are a lot of debug lines in my Docker logs, would it be possible to change the verbosity level? An environment variable would be great for that purpose.

Thanks!

Plex pass latest (1.40.X)

I was attempting to upgrade container running :plexpass and all I have is a /sbin/tini: accessing a corrupted shared library. Rolling back to :plexpass-1.32.8.7639 fixed the issue so I would assume something stopped working on 1.40 version.

Thanks for the great docker images

Is there any way to specify the internal listening port as something else than 32400?

Hi there!

Do you think there is any way to change the listening port to something else than 32400.?

The use case is to have your container plugged in a vpn client container (github.com/qdm12/gluetun) and access plex through the VPN server IP and a VPN server side port forwarded, so you cannot fiddle with Docker port mapping.

For now I can do it with:

  • a reverse proxy container plugged in the vpn client as well
  • with iptables (since a VPN client container already has NET_ADMIN capability

But it would be quite nice to just have an environment variable to change the internal listening port ๐Ÿ˜‰

Thanks!

Error shared library under alpine server

Hi!

I tried to start the new versions (1.15) under Alpine Linux, but I always get the following error message:
/usr/lib/plexmediaserver/Plex Media Server: error while loading shared libraries: libgnsdk_dsp.so.3.10.1: cannot enable executable stack as shared object requires: Permission denied

The older ones (1.14 and before) work without error. Is it possible to work with the new versions? Thanks in advance!

What exactly was removed?

Hello,

I feel like the README is lacking information. All the 'useless crap' removed sounds good, as I can probably ASSUME what it is. But wouldn't it be better if you specify exactly what it is that was removed?

As you also say 'fully functional'.

Thank you for your work and time.

Not getting TVDB agent matches

Hi, since TVDB switched to HTTPS only, the agent is not working anymore (no results). But in the Plex forums it seems fixed.
I took a look into the agent log file (Logs/PMS Plugin Logs/com.plexapp.agents.thetvdb.log) and found some urlopen errors:

...
2020-01-08 00:04:10,654 (xxxxxxxxxxxx) :  INFO (__init__:369) - Searching for exact match with: Blood (lang: en)
2020-01-08 00:04:10,655 (xxxxxxxxxxxx) :  DEBUG (networking:143) - Requesting 'https://tvdb2.plex.tv/login'
2020-01-08 00:04:10,714 (xxxxxxxxxxxx) :  INFO (__init__:140) - JWT Error: (<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>) - 
2020-01-08 00:04:10,717 (xxxxxxxxxxxx) :  DEBUG (networking:143) - Requesting 'https://tvdb2.plex.tv/search/series?name=Blood'
2020-01-08 00:04:10,759 (xxxxxxxxxxxx) :  INFO (__init__:175) - Problem with the request: 
2020-01-08 00:04:10,760 (xxxxxxxxxxxx) :  INFO (__init__:385) - There was a problem attempting an exact TVDB match in Blood (lang: en)
...

Could this maybe be related to certificates missing or the libressl version?

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.