From Indie IT Wiki
Jump to: navigation, search



Plex is a media player system and an associated media server that organizes personal media stored on local devices. It organizes audio (music) and visual (photos and videos) content from personal media libraries and streams it to mobile devices, smart TVs, and multimedia boxes like Roku.

Plex is available for Windows, Android, Linux, OS X, and FreeBSD. Additionally, Integrated Plex Channels provide users with access to a growing number of online content providers, such as YouTube, Vimeo, TED Talks, and CNN, among others. Plex also provides integration for cloud services including Bitcasa, Box, Dropbox, and Google Drive.

Plex's front-end media player, Plex Media Player (formerly Plex Home Theater), allows the user to manage and play music, photos, and videos from a local or remote computer running Plex Media Server. Additionally, the integrated Plex Online service provides the user with a growing list of community-driven plugins for online content including Netflix, Hulu, and CNN video.

Plex Media Server


This will give you the latest stable package. If you have a Plex Pass you will get an even later preview version.

Download the Debian package from and follow the prompts.

Install the package...

sudo dpkg -i plexmediaserver_VERSION_amd64.deb


Install Plex Media Server On A Raspberry Pi


Download the latest version, then update. It will automatically stop and start the software.

Automatic Upgrade

Stop Start Status

service plexmediaserver start
service plexmediaserver stop
service plexmediaserver status

Disable Auto Start

sudo systemctl disable plexmediaserver.service


sudo nano /etc/init/plexmediaserver.conf
# start on filesystem and net-device-up IFACE!=lo


sudo echo "manual" >/etc/init/plexmediaserver.override

Media Preparation

Make sure you organise your movies and TV shows into separate folders.




~/Videos/TV Shows

Then, put your Movies and TV Shows in those folders like below, making sure you include the year...


|-- Movies
|   |-- Act of Valor (2012).mp4
|   |-- Annie (1981).mp4
|   |-- Battle Los Angeles (2011).mp4
|   |-- Eye in the Sky (2016).mp4
|   |-- Frozen (2013).mp4
|   |-- Green Zone (2010).mp4
|   |-- Love Actually (2003).mkv
|   |-- Men In Black 3 (2012).mp4
|   |-- Sucker Punch (2011).mp4
|   |-- Term Life (2016).mp4
|   |-- The Cat in the Hat (2003).mp4
|   |-- The DaVinci Code (2007).mp4
|   `-- Transformers Age of Extinction (2014).mp4
`-- TV Shows
    |-- Adventure Time
    |   |-- Adventure Time S08E01.mkv
    |   |-- Adventure Time S08E02.mkv
    |   |-- Adventure Time S08E03.mkv
    |   |-- Adventure Time S08E04.mkv
    |   |-- Adventure Time S08E05.mkv
    |   |-- Adventure Time S08E06.mkv
    |   |-- Adventure Time S08E07.mkv
    |   |-- Adventure Time S08E08.mkv
    |   |-- Adventure Time S08E09.mkv
    |   `-- Adventure Time S08E10.mkv
    |-- Archer (2009)
    |   |-- Archer (2009) S07E01.mkv
    |   |-- Archer (2009) S07E02.mkv
    |   |-- Archer (2009) S07E03.mkv
    |   |-- Archer (2009) S07E04.mkv
    |   |-- Archer (2009) S07E05.mkv
    |   |-- Archer (2009) S07E06.mkv
    |   |-- Archer (2009) S07E07.mkv
    |   |-- Archer (2009) S07E08.mkv
    |   |-- Archer (2009) S07E09.mkv
    |   `-- Archer (2009) S07E10.mkv
    `-- The Last Ship
        |-- The Last Ship S03E01.mkv
        |-- The Last Ship S03E02.mkv
        `-- The Last Ship S03E03.mkv

Trailers and Extras

You can organize your local extras into specific subdirectories inside the main directory named for the movie. Extras will be detected and used if named and stored as follows:

Movie/MovieName (Release Date)/Extra_Directory_Type/Descriptive_name.ext

Where Extra_Directory_Type is one of:

  • Behind The Scenes
  • Deleted Scenes
  • Featurettes
  • Interviews
  • Scenes
  • Shorts
  • Trailers

It is recommended that you provide some sort of descriptive name for the extras filenames...

   /Avatar (2009)
      Avatar (2009).mkv
      /Behind The Scenes
         Performance Capture.mkv
      /Deleted Scenes
         Bar Fight.mp4
         Lost Sister.mkv
         Sigourney Weaver.mp4
         Stephen Lang.mp4
          Teaser Trailer.mp4
          Theatrical Trailer #1.mp4
          Theatrical Trailer #2.mp4


Add the external subtitle file using the same name as the movie, including the ISO Country code.

  Avatar (2009).mkv
  Avatar (2009)

If you have extra subtitles like forced (only foreign speaking parts) then you can put them in the same way.

  Avatar (2009).mkv
  Avatar (2009)
  Avatar (2009)

It is best in UTF-8 encoding.

$ file "Avatar (2009)"
Avatar (2009) UTF-8 Unicode (with BOM) text, with CRLF line terminators

Allow Firewall Ports

To allow from anywhere (when using Friends Sharing)...

sudo ufw allow 32400,32469,3005,8324/tcp
sudo ufw allow 1900,5353,32410,32412,32413,32414/udp

To allow from only your local network...

sudo ufw allow from to any port 32400,32469,3005,8324/tcp
sudo ufw allow from to any port 1900,5353,32410,32412,32413,32414/udp

Old method...

sudo ufw allow from to any port 32400 proto tcp
sudo ufw allow from to any port 3005 proto tcp
sudo ufw allow from to any port 1900 proto udp
sudo ufw allow from to any port 5353 proto udp
sudo ufw allow from to any port 8324 proto tcp
sudo ufw allow from to any port 32410,32412,32413,32414 proto udp
sudo ufw allow from to any port 32469 proto tcp

Custom SSL Certificate Lets Encrypt

sudo ./ -d

Server Configuration

Log in to the web interface...


Add folders to the Library...

Hover mouse over Libraries > click + > Select Library Type > Name > Next > Browse > Add Library


Filters let you narrow your list of Movies or TV Shows based on various criteria, such as year or genre or actor.

Related Items

When using the mobile app and you are on the details page for a Movie or TV Show, scroll down and click the Related button.


Collections let you gather related movies together. Plex Apps let you choose a Collection for quick access. For example, you might add all the James Bond movies together in a "James Bond" collection.

To Add Items To A Collection

From Library List View

  1. Open the Library to create the collection
  2. Click the tickbox in the left action bar
  3. Click the poster for each item to be added to the Collection
  4. Select Add to Collection... under ... in the left actionbar menu
  5. Choose an existing Collection or type the name for a new one
  6. Click Save

From Item Details View

  1. Open the Edit details screen for the item
  2. Click the Collections box
  3. If the Collection already exists, choose it from the list
  4. If not, type the name
  5. Click Save

To Use Your Collections

  1. Start the mobile App
  2. Click on Movies
  3. Click the Filter menu (3 horizontal lines next to Cast Screen)
  4. Click Collection
  5. Tick your Collection
  6. Click Close

Thanks -

To Delete Or Edit Collections

  1. Click on 'New Filter', then 'Collections', and select the Collection you want to rename/remove.
  2. Click the 'Select' button to enable multi-select mode (clearing the checkbox enables this. Not intuitive.).
  3. Select all the movies in the Collection. Click each movie, or click first, then shift-click last.
  4. Click the 'Edit' button.
  5. On the 'Tags' page, delete the existing name in the Collection field by clicking the little 'x' next to it (this eliminates the collection).
  6. If you are renaming the Collection, enter the new name in the Collection field and press Enter.
  7. Click 'Save.'

Thanks -

Updating Media Details Manually

Using the Web interface, you can change the details for any media item, such as a movie poster.

When viewing a Library:

  • Find the media item (movie, TV series or episode, music album, etc.) in which you're interested
  • Hover over the item poster
  • Click the Edit button icon button (pencil)

Refreshing An Item

Sometimes, just refreshing the details for an item, will be enough to change the poster.

  • Find the media item (movie, TV series or episode, music album, etc.) in which you're interested
  • Hover over the item poster
  • Click the 3 dots (menu)
  • Click Refresh

Thanks -

Fix Video Unavailable

Plex Web Admin > Settings > Server > Transcoder > Transcoder temporary directory > /tmp/ > Save Settings

Thanks -

Merge or Split Items

When you have 2 versions of a movie (e.g. Mad Max: Fury Road (2015), Mad Max: Fury Road (2015) Black & Chrome Edition) you can tell Plex to Split Apart if it has 'joined' them in to 1 movie entry. This is useful when you want a different poster for the different version.

Fix Incorrect Match

Sometimes Plex will get things wrong. Somehow, it managed to think "Robin Hood (2010)" was "Madagascar 3". Yeah, I know right.

To fix a stray item...

  1. Open the details/preplay screen for the item in Plex Web App
  2. Click the ... in the left actionbar to expose additional actions
  3. Choose Fix Incorrect Match
  4. Choose the correct Movie
  5. Click Save


There are a couple of neat tricks you can use to help with matching...

When in a Movie library, you can enter the IMDB ID in the title and search for that. For instance, the IMDB entry for "Brave" is If you enter tt1217209 as the search term, it will search for that exact movie to try to match.

For a TV Shows library, you can similarly enter the TVDB ID as the title to search for that particular show. "Archer (2009)" has the URL, so entering 110381 as the search term will search for that exact show.

Fix Missing Files - The Plex Dance

  1. Move all files for the show out of 'sight' of plex
  2. Update Library (not 'Force Update', and not 'Refresh all')
  3. Empty Trash
  4. Clean Bundles (Libraries ... Clean Bundles) More info
  5. Double check naming schema and move files back
  6. Update Library (not 'Force Update', and not 'Refresh all')

Thanks -

Emptying Library Trash

If you delete or move an item in your Library server, then Plex will mark it as in the "Trash" for a while and show an icon on top of the poster. When viewing the details for such an item, there will also be an "Unavailable" indicator.

After a while, the missing item will automatically be removed from the "Trash" and disappear from the Library.

However, you can choose to either "Empty Library Trash" manually or whenever it performs a Library Scan.


  1. Open Plex Web App
  2. Select your Plex Media Server in the left sidebar on the Dashboard
  3. Use the Global Library Actions dropdown and select Empty Trash...
  4. Confirm the action

On Library Scan

  1. Open Plex Web App
  2. Go to Settings > Server > Library
  3. Enable the Empty trash automatically after every scan option
  4. Save Changes

Thanks -

Transmission FileBot Script

This is a variation on the script used for Kodi, but because it's Plex it does not require artwork or subtitle downloading.

/usr/bin/filebot -script "/home/user/Bin/amc.groovy" --output "/home/user/Plex" --log-file "/home/user/.filebot/logs/amc.log" --action copy --conflict override -non-strict --def "seriesFormat=TV/{n}/{n} {s00e00}" "movieFormat=Movies/{n} ({y})" clean=y "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"

System Requirements

Plex Media Server Requirements

Building Ultimate Plex Server


Minimum: Dual Core 2Ghz
Recommended: Quad Core 3Ghz
Ideal: Six Core 3.5Ghz
  • 1 Core = 1 x Transcoding Streaming Video
  • 2 Core = 2 x Transcoding Streaming Video
  • 3 Core = 3 x Transcoding Streaming Video
  • 4 Core = 4 x Transcoding Streaming Video

So, probably a quad core processor to allow streaming to 4 different devices simultaneously.


Minimum: 2GB
Recommended: 4GB
Ideal: 8GB

Example Transcoding Test Video

YouTube: Planet Earth - Birds Scene

Backing Up Plex Media Server Data

/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/

Moving To Different Server


Server Identity

wget -q -O - "http://localhost:32400/identity?X-Plex-Token=XXXXXXXXXXXX"
wget -q -O - "http://localhost:32400/servers?X-Plex-Token=XXXXXXXXXXXX"

Server Preferences

wget -q -O - "http://localhost:32400/:/prefs?X-Plex-Token=XXXXXXXXXXXX"

Listing Sessions

wget -q -O - "http://localhost:32400/status/sessions?X-Plex-Token=XXXXXXXXXXXX"

Number Sessions

wget -q -O - "http://localhost:32400/status/sessions?X-Plex-Token=XXXXXXXXXXXXXX" | grep -c 'Session'

Stopping Sessions

SESSION=$( wget -q -O - "http://localhost:32400/status/sessions?X-Plex-Token=XXXXXXXXXXXXXXX" | grep -A2 'USERNAME' | grep 'Session id' | awk '{ print $2 }' | sed 's/id="//;s/"//' ); echo "${SESSION}"; wget -q -O - "http://localhost:32400/status/sessions/terminate?sessionId=${SESSION}&reason=YES&X-Plex-Token=XXXXXXXXXXXXXX"

Internet Bandwidth Usage

Upload from Server

720p 5.1 = 1.5Mpbs

Leave Remove Server

Go to Settings / Users. Find the friend that is providing the shared server and click the pencil icon next to their name. Then on the left it should list the servers that are being shared with you by that person. Click on it, then on the right side it will show the libraries. Scroll down to the bottom, there should be an option to Leave Server.

Move Data Directory

If you move your Plex Server data to a fast SSD then loading of information and images will be much quicker.

Even better, what you SHOULD do, is install the OS and PLEX on to the SSD, then keep the VIDEO files on a spinning large TB disk or RAID array of disks.

Dedicated Stream Hosting

Byte Sized Hosting for Plex Media Server

Remote Logging


11-12 21:30:28.312 i: [PlaybackManager] Preparing for The File with DTS
11-12 21:30:28.313 i: [DefaultPlaybackManager] Passthrough is enabled.
11-12 21:30:28.317 i: [PlaybackManager] Audio codec required: dca
11-12 21:30:28.320 i: [DefaultPlaybackManager] Playback possible, downloading codecs…
11-12 21:30:28.322 i: [CodecManager] Attempting to download: dca
11-12 21:30:28.322 i: Fetching [method:POST]
11-12 21:30:28.343 i: [pms] / - POST /services/codecs/decoder/dca
11-12 21:30:28.362 e: Error parsing XML from Unexpected end of document
11-12 21:30:28.362 e: [CodecManager] Unknown return code (0)
11-12 21:30:28.363 i: [DefaultPlaybackManager] Codec failed to downloading, continuing…
11-12 21:30:28.363 i: [PlayQueues] Creating remote PQ.

Plex Media Player

This is the new GUI front end to replace 'Plex Home Theatre'.

Download Disk Image > Apps & Devices > Plex Media Player > Embedded Platforms > Raspberry Pi

Create SD Card From Disk Image

Getting Started


Community Build of Plex Media Player 2.x for Raspberry Pi

Phlex Flex TV

Flex TV can be used by a user to remotely control their home theater systems by interfacing with the API's of several other popular web applications, including Plex, Couchpotato, Sonarr, Radarr, and Sickbeard/Sickrage. Flex TV supports a wide array of commands, from "Play ghostbusters" to "What new movies do I have?". If media is not available, you can add it to watch lists in your favorite application. Requires installation of the Phlex agent on a home PC. Supports Windows, Linux, Mac, and Docker.

For more information, visit -

Plex Home Theatre

A GUI front-end to access the Plex Media Server.

Keyboard Shortcuts



Raspberry Pi

Debian Ubuntu Linux

sudo dpkg -i openpht_1.6.2.123-e23a7eef-xenial_amd64.deb
sudo apt-get -f install

Microsoft Windows

Apple OSX

Mobile Apps



There are 4 options, which give you different features.

  1. Free + Anonymous = £0.00
  2. Free + Account = £0.00
  3. App Only + Account = £3.30 one-off payment *
  4. Plex Pass + Account = £4.00 per month payment

Creating a Plex Account is free, and it's just a way to link all your content together, recommend things, and link with other Plex users. You don't have to create an account, but it will help for the App only purchase.


  1. Install Plex for Android > Start > SKIP > Free Trial > SKIP. With this, you can use the app to connect to a server, browse and then cast to a device.
  2. Create an account, install the app, then SKIP as above, but SIGN IN. With this, you can use the app to connect to a server, browse and then cast to a device. It also remembers your Plex Media Servers.
  3. Create an account, install the app, ACTIVATE the in-app purchase for £3.30, then SIGN IN. With this, you can use the app to connect to a server, browse, cast to a device and play media on the phone or tablet you are using. *
  4. Create an account, install the app, buy the PLEX PASS, then SIGN IN. With this, you can use the app to connect to a server, browse, cast to a device, play media on the phone or tablet you are using, and have members of the same family use their own logins in the house.

* I have chosen this option.



Plex For Devices


Sony PlayStation 3 and 4



Amazon Echo

To listen to your Plex music collection on an Echo device:

  • Install Plex skill
  • Link skill to Plex account
  • Open Plex web interface - Settings - Server - Network - Secure connections - select 'Preferred' from the drop down menu - Save changes

Google Home


Yeah, they've already thought of that. Just go to the Samsung App Store on your TV and install the Plex App, then go to, log in, and enter the code from the Samsung Plex App on the web site.

There are 2 versions of this TV app:-

OLD - Samsung Smart Hub (2010-2015 models)

NEW - Smart TVs (LG, 2016 Samsung)

NEW Forum

BETA v2 Forum START Page

BETA v2 Changelog

Supported Media Formats


Yes, of course. Just install the Plex channel on your Roku and launch it, then go to, log in, and enter the code from the Roku Plex channel on the website.

Thanks to Roku Blog.


Depending on your devices firmware version you may be able to sideload a special version of Plex.

See this guide for details.


Scrobbling to is activated not from within the Plex programme but via your Plex account, go to the following page (signing in if necessary):

Scroll to the bottom of the page to the Social Media section and link your accounts.




Why are videos watched by other users being scrobbled to my profile?

Sending Videos To Watch Later And Plex It!

You can email a special address and it will add any video links in the body of the message to your Plex Media Server in the 'Watch Later' section.

You can also drag a special bookmark to your web browser toolbar and click on it when you find a page with a video to watch later.

Go to this page on your Plex Media Server Web App (adjust IP address as necessary):-!/playlist/queue/help

Statistics Reporting Tools

Tautulli (formerly PlexPy)


Linux Install

# Install git
sudo apt-get install git-core

# Change directory to /opt/ the default location for Tautulli 
sudo cd /opt/

# Clone Tautulli to /opt/Tautulli
sudo git clone

# Create a service account for Tautulli
sudo adduser --system --no-create-home tautulli

# Change permissions on the folder for the new service account
sudo chown tautulli:nogroup -R /opt/Tautulli

# Set permissions on the Tautulli service file
sudo chmod +x /opt/Tautulli/init-scripts/init.ubuntu

# Link the Tautulli service file to the init (startup/services) folder
sudo ln -s /opt/Tautulli/init-scripts/init.ubuntu /etc/init.d/tautulli

# Update the startup/services
sudo update-rc.d tautulli defaults

# Start PlexPy
sudo service tautulli start

Thanks to Chase Wright

Firewall settings:

sudo ufw allow from to any port 8181 proto tcp


Custom Scripts

PlexPy --> Python --> Google Calendar


Documentation Manual

Step-By-Step Guide

Getting Started



Forum Signature

Forum Profile



Media Files For Streaming Tests