Plex Media Server

Russell Bateman
November 2013
last update:

Table of Contents

Plex Media user's guide
Installing Plex Media Server
How does Plex know where your server is (IP address)?
Updating Plex Media Server
How to get DVD or Blu-ray content using Handbrake
Examples of organizing media content
Television example 1: Inspector Lewis
Television example 2: Fires of Faith
Movie example: Errand of Angels
Getting ready to rip media content
Episode-naming phenomena, specials, out-takes, bonus material
Subtitles and other things hard-to-ponder
Steps to getting "after-market" subtitles
Content type (TV or movie?)
Updating Plex' record of your content
Fixing an incorrect match
Fixing an incorrect match (2)
Blocking further changes by Plex
Fixing an incorrect match (television)
Splitting identical or similar titles
Handling DVD/Blu-ray "extras"
Sharing your Plex server with others
Help others sign up for and use your content
Appendix: Plexifying (ingesting) ripped content
To change or set the image for the series
Appendix: Handheld displayable formats
Appendix: Migrating (moving) Plex media content
Appendix: Getting lists of your media
Appendix: Firefly: DVD order agent
Appendix: Images for Plex metadata
Appendix: Music
Appendix: Miscellaneous

Installing Plex Media Server

Join up with Plex. I enrolled for $75 because I wanted in—grandfathering my paid membership (PlexPass) for less and for the later benefits that would establish. However, you can install and use the Plex server software free as well as view the content of friends' servers for free.

For me, Plex is two things: MyPlex, how I see Plex servers, and my own Plex server itself. I use the former to view the content on the latter. My PlexPass gets me both. I also use MyPlex to see content on a nephew's and a son's server.

After paying, here's what I did to get Plex running on my Ubuntu Linux webserver:

  1. Go to and click on Downloads.

  2. There's a button that says, Show Plex Pass Downloads. You'll want to use that because you get more features.

  3. I chose to download 64-bit Ubuntu (Debian) package, plexmediaserver_0.

  4. Because there's not an Aptitude repository with a reliable, latest version of Plex Media Server, you can't use apt-get install. Instead, use the Debian package directly. I installed it:
    [email protected]:~# dpkg --install plexmediaserver_0.

To see my Plex server via browser after it's installed and running, I go to

Trouble or the unexpected? See my last experience here.

How does Plex know where your server is (IP address)?

You don't have to tell it! It's sort of magic. Even when your ISP changes your IP address because it imposes DHCP on your (i.e.: you have no static IP address), your server quickly recovers its ability to serve up media content. This is because your Plex server broadcasts its IP to your account.

Go to your Plex Media server management page, click on Settings and then on Show Advanced under the Server section, it shows the global IP port that it uses. This setting is what tells Plex which address and port to use.

Updating Plex Media Server

Again, there's no Aptitude repository. Instead, repeat the installation instructions to get a Debian package. use that with dpkg which will replace whatever is there as long as what you're offering is later. If your browser was up looking at your Plex content, you'll see it go out to lunch for a while.

Here's what this looked like for me one time:

[email protected]:~/Downloads# dpkg --install plexmediaserver_0.
(Reading database ... 309102 files and directories currently installed.)
Preparing to unpack plexmediaserver_0. ...
plexmediaserver stop/waiting
Unpacking plexmediaserver ( over ( ...
Setting up plexmediaserver ( ...
plexmediaserver start/running, process 32405
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for mime-support (3.54ubuntu1) ...

To benefit from advances or new features, you'll now need to Update Library of each group of content. Examine this illustration: see Update Library in the upper-right of the page. There is an illustration of this below at Updating Plex' record of your content.

How to get DVD or Blu-ray content using Handbrake

First, note that the "digital copy" some disk sets comes with isn't worth the bother or the plastic the disk is made from. Ignore it, rip the content yourself and put it up on Plex. Here's how.

  1. Please see Steps Steps to rip DVDs or Blu-rays with Handbrake.

  2. Copy the resulting media file to Plex server on the path you've set up, something like hostname:/plex-server/Movies/movie-name. To see how to set this up, examine Plex support, scroll down to Media Preparation and read topics such as Naming your Movie media files, Naming and Organizing TV Shows and Naming and Organizing Music media.

  3. There's a lot to digest between these steps, but they are to explain how to get content to the Plex Media Server, not how to organize it.

  4. Go to Plex server in a browser and perform a deep scan to ensure the new content is picked up by Plex. It's rare that you have to type in Summary data as Plex' deep scan will usually bring something in including multiple images for the thumbnail, summary, dates, etc. You may wish to adjust it for spelling, grammar, content, etc.

Examples of organizing media content

Television example 1: Inspector Lewis

For episode names, season and episode numbers, I used these links:

Here's what the content looks like copied to my Plex server:

[email protected]:/plex-server$ ll
total 40
drwxr-xr-x  7 russ russ  4096 Sep 15 18:31 ./
drwxr-xr-x 24 root root  4096 Nov  8 06:46 ../
drwx------  2 russ russ 16384 Aug  3 18:17 lost+found/
drwxrwxr-x 17 russ russ  4096 Nov 25 07:44 Movies/
drwxrwxr-x 97 russ russ  4096 Sep 25 04:47 Music/
drwxrwxr-x  6 russ russ  4096 Nov 29 15:37 TV/
drwxrwxr-x  2 russ russ  4096 Sep 15 18:24 Videos/
[email protected]:/plex-server$ cd TV
[email protected]:/plex-server/TV$ ll
total 24
drwxrwxr-x  6 russ russ 4096 Nov 29 15:37 ./
drwxr-xr-x  7 russ russ 4096 Sep 15 18:31 ../
drwxrwxr-x  3 russ russ 4096 Nov 29 15:39 Endeavour/
drwxrwxr-x  8 russ russ 4096 Nov 29 16:36 Inspector Lewis/
drwxrwxr-x 15 russ russ 4096 Nov 27 22:39 Inspector Morse/
drwxrwxr-x  3 russ russ 4096 Nov 28 18:58 Messiah/
[email protected]:/plex-server/TV$ tree Inspector\ Lewis/
Inspector Lewis/
+-- Season 1
|   +-- Inspector Lewis - s01e01 - Whom the Gods Would Destroy.m4v
|   +-- Inspector Lewis - s01e02 - Old School Ties.m4v
|   `-- Inspector Lewis - s01e03 - Expiation.m4v
+-- Season 2
|   +-- Inspector Lewis - s02e01 - And the Moonbeams Kiss the Sea.m4v
|   +-- Inspector Lewis - s02e02 - Music to Die For.m4v
|   +-- Inspector Lewis - s02e03 - Life Born of Fire.m4v
|   `-- Inspector Lewis - s02e04 - The Great and the Good.m4v
+-- Season 3
|   +-- Inspector Lewis - s03e01 - Allegory of Love.m4v
|   +-- Inspector Lewis - s03e02 - The Quality of Mercy.m4v
|   +-- Inspector Lewis - s03e03 - The Point of Vanishing.m4v
|   `-- Inspector Lewis - s03e04 - Counter Culture Blues.m4v
+-- Season 4
|   +-- Inspector Lewis - s04e01 - The Dead of Winter.m4v
|   +-- Inspector Lewis - s04e02 - Dark Matter.m4v
|   +-- Inspector Lewis - s04e03 - Your Sudden Death Question.m4v
|   `-- Inspector Lewis - s04e04 - Falling Darkness.m4v
+-- Season 5
`-- Specials
    `-- Inspector Lewis - s00e01 - Reputation.m4v

6 directories, 16 files

Television example 2: Fires of Faith

For this television series of three episodes and bonus short features, I went to Fires of Faith. This didn't avail much more than the DVD had to offer. Using Plex' Naming TV Show 'Specials' page example for Heroes, I decided on the following arrangement which imitates Heroes and its special for the peculiar numbering while using information on names for bonus material from the DVD cover and the names of the episodes.

[email protected]:/plex-server/TV$ tree Fires\ of\ Faith/
Fires of Faith/
+-- Season 1
|   +-- Fires of Faith - s01e01 - Yearning for the Word.mkv
|   +-- Fires of Faith - s01e02 - Martyrs for a Book.mkv
|   `-- Fires of Faith - s01e03 - The King James Bible.mkv
`-- Specials
    +-- Fires of Faith - s00e01 - The Bible and America.mkv
    +-- Fires of Faith - s00e02 - Other Translations.mkv
    +-- Fires of Faith - s00e03 - The Bible Today.mkv
    +-- Fires of Faith - s00e04 - The Translators.mkv
    +-- Fires of Faith - s00e05 - Martin Luther.mkv
    +-- Fires of Faith - s00e06 - King Henry.mkv
    +-- Fires of Faith - s00e07 - King James.mkv
    +-- Fires of Faith - s00e08 - Religion Today.mkv
    +-- Fires of Faith - s00e09 - Tyndale's Legacy.mkv
    +-- Fires of Faith - s00e10 - Favorite Passage.mkv
    +-- Fires of Faith - s00e11 - Bible Literacy Today.mkv
    `-- Fires of Faith - s00e12 - The Making of Fires of Faith.mkv

To see what I did after this, please see Appendix: Ingesting ripped content.

Movie example: Errand of Angels

Movies are pretty much a no-brainer.

[email protected]:/plex-server/Movies$ tree Errand\ of\ Angels/
Errand of Angels
`-- Errand of Angels.mkv

...except that if you want to rip and includes lots of extras from your disk, you'll want to examine the section entitled, Organized in Subdirectories, at the bottom of this page:

Local Media Assets - Movies

Getting ready to rip media content


For movies, I do nothing special except to ensure I've got a home in the server's files sytem, by the same name as the movie, ready to receive it when I will copy it there.

There is one thing you could do if you wish to include bonus material from your movie. If you want to do that, and it's on the same disk, note that Handbrake has the ability to enqueue ripping commands such that you can set up what will be ripped and how it will be ripped ahead of time, creating a queue, then launching it. That way, you don't have to sit there waiting for one thing to finish before setting up ripping for the next thing. It saves on babysitting the rip.


Here's where preparation will save on a) monotony and b) mistakes.

First, create a list in a text file of all the episodes. You can get the particulars from IMDB or Wikipedia, but craft all the names carefully so you don't have to agonize over your solution as you go.

For example, I created the following after doing research (during which I discovered that the sale of this series in the US had different and wrong seasonal divisions than those Plex would find when it went to get the metadata for it):

Season 1
Foyle's War - s01e01 - The German Woman.mkv
Foyle's War - s01e02 - The White Feather.mkv
Foyle's War - s01e03 - A Lesson in Murder.mkv
Foyle's War - s01e04 - Eagle Day.mkv

Season 2
Foyle's War - s02e01 - Fifty Ships.mkv
Foyle's War - s02e02 - Among the Few.mkv
Foyle's War - s02e03 - War Games.mkv
Foyle's War - s02e04 - The Funk Hole.mkv

Season 3
Foyle's War - s03e01 - The French Drop.mkv
Foyle's War - s03e02 - Enemy Fire.mkv
Foyle's War - s03e03 - They Fought in the Fields.mkv
Foyle's War - s03e04 - A War of Nerves.mkv

Season 4
Foyle's War - s04e01 - Invasion.mkv
Foyle's War - s04e02 - Bad Blood.mkv

Season 5
Foyle's War - s05e01 - Bleak Midwinter.mkv
Foyle's War - s05e02 - Casualties of War.mkv

Season 6
Foyle's War - s06e01 - Plan of Attack.mkv
Foyle's War - s06e02 - Broken Souls.mkv
Foyle's War - s06e03 - All Clear.mkv

Season 7
Foyle's War - s07e01 - The Russian House.mkv
Foyle's War - s07e02 - Killing Time.mkv
Foyle's War - s07e03 - The Hide.mkv

Season 8
Foyle's War - s08e01 - The Eternity Ring.mkv
Foyle's War - s08e02 - The Cage.mkv
Foyle's War - s08e03 - Sunflower.mkv

Season 0
Foyle's War - s00e01 - Writer, Anthony Horowitz.mkv
Foyle's War - s00e02 - Writer, Anthony Horowitz.mkv
Foyle's War - s00e03 - Recap of Seasons 1.-6.mkv

Using this text file, I can:

  1. compare the titles easily and ensure that I have composed them accurately, uniformly and aesthetically,
  2. correct spelling and, especially, capitalization (which is done so poorly in the English-speaking world now as to believe that speakers of this language are all uneducated and illiterate),
  3. easily see what I've got to do to create a home in the server's filesystem,
  4. sweep the episode titles with my mouse to copy and paste them into Handbrake's Destination → File: field.

Last, and this was not the case for the example series here, but as the (nominally two-hour) episodes were one per disk, I could not enqueue the rip in Handbrake, but for usual, American half-hour series, this is often a benefit.

Episode-naming phenomena, specials, out-takes, bonus material

Typically, material that does not fall solidly in the category of an episode is placed under Season 0 and given a title similar to how episodes are named. And it doesn't matter in what season's disk you get this material. An example of this is the season 0 list for Foyle's War in the example above where the was an interview with the series script writer, Anthony Horowitz, at the outset of season 1 and again several seasons later—hence "episodes" 1 and 2 with the same title in this example.

Typically, you cannot have an episode numbered as 0, but it might work. Realize that if you're counting on Plex finding such a thing in a media content database, it likely will not. If you're hand-tweaking the content and use this naming scheme, you might get away with it even when choosing to view all episodes.

Canonically, though, the system in use for bonus material is done as just explained. You might get particular guidance on a television series by looking at details by browsing to the database likely to cough up the information Plex uses.

Subtitles and other things hard-to-ponder

It's possible to acquire subtitles as separate files, for example, a rip of The Lord of the Rings might only subtitle Elf and Orc speach or The Wolverine Japanese bits and Thor: The Dark World the dialog between dark elves, etc. Though you turn on subtitles in this case, you won't see any until you reach those parts of the movie that are subtitled.

In other words, the movie you're copying and watching might not have, say, English subtitles while it does have separate subtitles in a separate file to handle the bits you'd otherwise not get subtitles for. Thus your movie isn't subtitled per se, but it handles the bits that are incomprehensible to (English) speakers while the rest of the movie is just in their tongue.

For ripping full subtitles, please see here.

Steps to get "after-market" subtitles...

One place to get subtitles separate from the media file is YIFY Subtitles. You drop the downloadable .srt file into the subdirectory with the movie you've already downloaded, ripped, etc.

  1. Go to YIFY Subtitles.

  2. Type the name of the movie you're looking to subtitle into the edit field at the top of the screen. (Note: in some browsers, this field is occluded by the top of the page. Just type accurately. After your first set of subtitles, that field will begin to display correctly.)

  3. Having typed in "The Lord of the Rings" Yify starts to display all the possibilities and I can choose the movie I'm looking for.

  4. Next, I can select the language I want.

  5. Then click the download button and save the .zip file.

  6. Downloading and exploding the .zip file gets you a .srt file which you can copy to your Plex server content:
    ~/Videos/plex $ ll the-*
    -rw-r--r-- 1 russ russ  43407 Jul 29 17:27
    -rw-r--r-- 1 russ russ 125233 Dec  2  2013
    ~/Videos/plex $ scp \
  \\\ Lord\\\ of\\\ the\\\ Rings--The\\\ Fellowship\\\ of\\\ the\\\ Ring/
                                              100%  122KB 122.3KB/s   00:00

Maybe you'll need to refresh your movies before this will work. From your browser, you'll see...

...that Plex offers you an "unknown" subtitle file. Unless you have many, this is what you want. Or Plex may tell you the language. It's supposed to.

Content type (TV or movie?)

You can create as many "libraries" on your Plex Media server as you like, Videos, TV shows, Movies, Music, etc. But let's say you found some content and you can't decide whether it's a televsion show or a movie. How to decide?

If it's on, put it in TV. If it's on, put it in Movies. Otherwise, you'll need to make a Home Videos section that you define the metadata yourself.

I wanted to separate out my episodes of Alton Brown Good Eats because my copies were "loose," taped off-air years ago, and I didn't want to research the whole season and episode thing.

Updating Plex' record of your content

Once you've ripped new content and uploaded it to the library of choice on your server (i.e.: television, movies, videos, specially named libraries, etc.), you just need to pop your Plex Media content up in a browser and click Update Library:

At this point, Plex will use a list of popular databases for retrieving metadata like disk-cover thumbnails, titles, dates, etc. If you're unhappy with the choices, there is a way you can order its search of these databases and even add or eliminate the list.

Here's a partial list of databases I'll add to as time goes on and I end up caring about and using them directly. Often, especially when trying to put together season and episode lists for television shows, it's useful to go to a database and see what it's got. If you go to a database using your browser, there's a search engine you can use.

Fixing an incorrect match (movie)

With obscure movies, movies that are particularly public and movies sharing identical names with other, especially popular movies, it's frequently possible for Plex to corral the metadata during the Update Library step of the wrong movie and assign it to the one you just ripped.

For example, let's pretend that Plex mistook (as incredibly as that seems) a movie I just uploaded to my movies section at for the more recent offering, 47 Ronin. I go to the new movie, click the three-dots icon at the bottom of the pile of controls down the extreme left-hand side and choose Fix Incorrect Match. This will negate the metadata including poster photo already assigned and I'm free to figure out what to correct it.

Solutions include typing in my own metadata or changing the database used.

Fixing an incorrect match (movie-2)

Another situation is where no database has the correct metadata you want for your movie because it's obscure, not a commercial movie, etc. What you want to do is enter the metadata by hand and thereafter you don't want Plex rethinking it. You need to lock that data.

To do this, choose Unmatch from the pile of controls shown here.

Having done this, you can click on Edit (the pencil icon for the title), then fill out

  1. General stuff—Title, Sort Title, Original Title, Year, etc. As you edit each field, click the padlock icon so that it shows bright orange (for "locked").
  2. Poster—these are the available images used as thumbnails for the title. You can supply your own .png, .jpg, .gif, etc. You'll quickly learn what aspect makes a good thumbnail as some images you paste in will turn up unsightly when you're done. No matter, you can choose another image, resize or crop the one you tried, etc. until you get something you want.

Blocking further changes by Plex

Once you've labored over metadata in Plex by hand, that data isn't immune to Plex mucking it up all over again. Once solution is to go back in after you've finished making your changes (and before updating any Plex Library) and clicking on the orange padlock icon to the left of each field. During update library, Plex may still say it's looking at the media associated with what you've locked it out of, but it won't actually change it.

Fixing an incorrect match (television)

Television shows don't benefit from the same interface as movies and there's no easy way to prevent Plex from cocking it all up. For example, no amount of correcting (via the pencil icon) Inspector Lewis Season 8 shows would do the trick: during Library Update engaged for other, newly added television shows, Plex consistently returned these episodes to it mostly inexplicably wrong titles and metadata.

What appears to work is to tell Plex to leave everything alone and let you do the naming, metadata, etc. The way to achive this appears to be to thwart its plug-in database bundle for television. What I did was go to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins and rename TheTVDB.bundle to not-TheTVDB.bundle-not hoping Plex would not find it or refuse to recognize it. It appeared to work: the next time I ran the Library Update (clicked on the circular arrows) for television shows, checking Inspector Lewis Season 8 shows proved they had not changed.

Important: this must be done and done again, probably after Plex updates. I've put a request into the forums for assistance on this.

Another option...

See and experiment with instructions from:

Another option, if you've got lots of commercial television series that are more than certainly in the television database, is to create a separate television library to put your less well known or personal stuff into and turn off Plex' helpful attempts to ingest.

The idea I've followed is that I know better than Plex and I don't want it mucking about with my lesser known television series.

Splitting identical or similar titles

Sometimes you get two movies by the same title—or near enough that Plex will just toss them into the same bucket. For example, I have Pride and Prejudice, Pride and Prejudice and Pride & Prejudice. To fix this (put them into their own buckets alone), once you see a sigle above with 2, 3, etc. (just as the one that says how many episodes are in a television series, see illustration below), click on the movie to get to its page, then click the three-dots icon down the left column and choose Split Apart. You'll be asked to confirm after which Plex will split them, but you'll see the same metadata for both as if duplicates except that the lengths will be different.

You'll have to fix up the one that's wrong by choosing Fix Incorrect Match, Unmatch etc., as covered elsewhere on this page.

Handling DVD/Blu-ray "extras"

Extra features obtained when ripping a disc can be placed under the title's subdirectory thus (before ingestion):

[email protected]:/plex-movies/Movies$ tree "Roots and Wings"/
Roots and Wings/
+-- Behind the Scenes
|   `-- Behind the Scenes.mkv
`-- Roots and Wings.mkv

The list of recognized subdirectories was available here at one time, and consisted of:

The name of the media file does not appear to make any difference to Plex.


You've loaded in and done an Update Library to get Plex to ingest your new uploads including lots of extra materials. However, none or only some of the extra material is shown. Click the ... icon and choose Analyze.

Sharing your Plex server with others

Once set up, you can share your videos with family and friends.

  1. Browse to
  2. Click myPlex.
  3. Click Servers.
  4. All the servers your friends or family have shared with you, plus your own, will be listed.

  5. Find your server (the one you want to share) and click on its name. This is probably your Linux server's hostname.
  6. Where it says "Share with n others", click on n others.
  7. Add your family member's or friend's e-mail address (which is also his or her Plex username) where solicited and click Share.

Help others sign up for and use your content

See notes on this at Signing up for Plex. Also, see notes for other, end-user activities on that page.

Appendix: Plexifying (ingesting) ripped content

After ripping, carefully naming and locating the content files (.mkv) for my television series on my Plex server, I went to my browser to go to the TV content and clicked Update Library:

After that operation finished, I went down into the new Fires of Faith content and clicked Refresh, which produces nothing because this DVD is of rather narrow interest and Plex cannot locate content, images, information, etc. to support it:

So, I'll have to populate the metadata for this series myself. I click Edit:

...and fill in the detail taking care to a) click outside the field I've added, then b) click the padlock in the orange background to the left of the field in order to make the lock go away. After I've finished, I click Save Changes:

If I get the message "Your changes could not be saved," it's likely that I didn't clear the lock for a field and that edit may not have taken. (This would be the case for the Rating field above if left in that state.)

To change or set the image for the series

How this works changes a little over time.

  1. Click the pencil (Edit) icon; you'll see an option to browse for an image, drag and drop one or type in a URL.
  2. Choose one of the methods. Dragging and dropping works well from Linux. Just open a Nautilus browser to the subdirectory where you have the image, double click the image to launch the Image Viewer application, click on the image and drag it over into the browser.

    You can also just drag the image file.

Please note that the displayable image is crucially predicated on aspect. Plex will not modify it to fit, but it will clip to the center of the image (and you'll lose plenty of it at least horizontally).

Note also that some of this may have you working blind because of apparent bugs in the Plex web application. You might drag the image over and drop it only to fail to see it there (another already there is still the only one visible). usually, when you dismiss the dialog, the one you just dropped is the one you'll see.

Appendix: Handheld displayable formats

Please see notes about this topic here.

Appendix: Migrating (moving) Plex media content from one server to another

Just links for now until I've done it. These notes are only for Linux. I would never use Windows for anything except running TurboTax (period) and I would never waste a Macintosh in a server role when it's really a glorious GUI (even if I don't choose it myself). Linux is free, Linux server is lightweight yet performant, Linux is ubiquitous (just Google for anything), Linux simply rules for running this sort of thing.

I'm following Move an Install to Another System.


from "Moving an Install[ation] to Another System"

—easier if migrating between the same OS platform.

Preparation of old (source) system and new (destination) system

  1. Disable automatic emptying of trash.

    On your source Plex Media Server, you'll want to disable automatically emptying the trash automatically after every scan preference for the server. See Plex Media Server → Managing the Server → Library.

    Click on Settings.

    Then uncheck the emptying of trash setting and save changes.

  2. Install Plex Media Server on the destination system.

    Install the Plex Media Server on the new computer/system. If the set-up wizard in the browser launches, just exit out. See Plex Media Server → Installation and Basic Setup

    (The best is just to install it using my personal instructions at the top of this page.)

  3. Stop the Plex Media Server on the destination system if running.

    [email protected]:~$ sudo bash
    [email protected]:# ps -ef | grep [p]lex
    plex  1239  1230  0 09:31 ?  00:00:00 /bin/sh /usr/sbin/start_pms
    plex  1243  1239  0 09:31 ?  00:00:01 ./Plex Media Server
    plex  1582  1243  0 09:31 ?  00:00:08 Plex Plug-in [com.plexapp.system] /var/lib/plexmediaser...
    plex  1678  1243  0 09:31 ?  00:00:02 /usr/lib/plexmediaserver/Plex DLNA Server
    plex  1775  1243  0 09:31 ?  00:00:02 Plex Plug-in [com.plexapp.agents.localmedia] /var/lib/...
    plex  1777  1243  0 09:31 ?  00:00:01 Plex Plug-in [] /var/lib/plexme...
    [email protected]:# service plexmediaserver stop
    plexmediaserver stop/waiting
    [email protected]:# ps -ef | grep [p]lex
  4. After installation is complete, be sure to quit or exit the Plex Media Server so that it is no longer running.

Copy from source system

  1. You'll want to make a copy of all the content in the directory listed below for your operating system except for the Plug-ins subdirectory.

    Warning: Do not include the contents of the plug-ins directory when copying the content location mentioned for your operating system.

    Tip: In many cases, you may find it faster to "zip up" (or tarball) the contents here before transferring them to the destination system. The larger your library, the more useful this may be for you as it could otherwise take a very long time to copy thousands of individual metadata files.

    In general, the location for the various Linux versions of Plex Media Server will be found on the following path. Please make a note of it.

    $PLEX_HOME/Library/Application Support/Plex Media Server/

    In my case, $PLEX_HOME is the documentation's representation (since this environment variable isn't set for me) of /usr/lib/plexmediaserver. (But, don't stop here, read on!) The way to find this is to locate the most unordinary filename element I knew would be in the Plex Media Server filesystem. I chose "DLNA" then I looked for a suitable path:

    [email protected]:/plex-server# locate DLNA
    /usr/lib/plexmediaserver/Plex DLNA Server
    /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex DLNA Server Neptune.log
    Here, I had lots of paths located, but I happen to know that /usr/lib isn't a metadata path since it's where the software binaries and other, permanent data are kept. That's not the stuff I'll need to copy since the installation on the new server will put it all there. Instead, I know that /var/lib/plexmediaserver is the path I want because it's where Plex has kept all my variable data (hence /var) and that's what I want to preserve from my source host to the new destination.

    So, what did I do here exactly? I went to the path /usr/lib/plexmediaserver/Library/Application Support and began copying the subdirectories from this location to tol-eressea. I could not copy them directly; instead, I have to copy them to my user's home directory first:

    # scp -rp Cache [email protected]:/home/russ/plexmediaserver
    # scp -rp "Crash Reports" [email protected]:/home/russ/plexmediaserver
    # scp -rp Logs [email protected]:/home/russ/plexmediaserver
    # scp -rp Media [email protected]:/home/russ/plexmediaserver
    # scp -rp Metadata [email protected]:/home/russ/plexmediaserver
    # scp -rp Scanners [email protected]:/home/russ/plexmediaserver
    # scp -rp Preferences.xml [email protected]:/home/russ/plexmediaserver
    Note: The Media appear to be images, thumbnails, subtitles, etc. e.g.: art1.jpg, art2.jpg, art3.jpg, Subtitles.xml, index-sd.bif, thumb3.jpg, thumb2.jpg, thumb1.jpg. This subdirectory takes forever to copy.

    The Metadata appear to lots of Info.xml and some other files like c5cc8a84436166c653adaa8b1eecdcd10940eeaa and com.plexapp.agents.themoviedb_a76702420550cb61dd9f69e34e83ebcc6f3ac038. This subdirectory takes forever to copy, but nothing like how long it takes to copy Media.

    The Cache appear to be stuff like

    +-- ff1db11c17ff63cf743b7876b6bc6b2c60a9ec4b.jpg
    +-- ff4e12b8622acdc0195ee9160fe614ef87c3fe38.jpeg
    +-- ff60d01cc068c945e4e2d14773ccad5eebcc6cee.jpeg
    +-- ff615d2afcf7661d9391d7a16c14cfb8575c740e.jpg
    +-- ff6fc9b4337208d42596f9ecf670c80c6cc4ab2b.jpg
    +-- ff8d4e62186876cb168fc24cb590ef533b000c35.jpg
    +-- ff8e92c3221ee2f2bc89f17eee3f9f13ba39c2ce.jpg
    +-- ffb45a6f8c9e03ce661722213b8a136b89c7b4e8.jpg
    +-- ffc42370cf0e7785b675544a58674a8020a313d0.jpg
    +-- ffc44063006098a0902341e99c1ec593eacffd93.jpg
    +-- ffc61697306659e2f194756239fe991eb4b11e60.jpg
    +-- ffc73c86143753586ae3554382af2855137267a5.jpg
    `-- ffdda6a70526faba48aedf51fdb3499b08b87955.jpg

Place on destination system

  1. Using the copy of the content you previously made, place it in the location specified for your operating system.

    Note: You'll need to replace any of the existing files and subdirectories that will be there from the installation you performed earlier.

    Tip: If you zipped the content earlier, you'll want to unzip it on the destination system before placing it in the appropriate location.

    In general, the location for the various Linux versions of Plex Media Server will be found under:

    $PLEX_HOME/Library/Application Support/Plex Media Server/

    Make sure that the directories and contents are all owned by plex:plex.

    [email protected]:/var/lib/plexmediaserver/Library/Application Support/Plex Media Server# rm -rf \
    Cache/ Logs/ Preferences.xml "Plug-in Support"/ "Crash Reports"
    [email protected]:~/plexmediaserver# mv * \
    /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server

Copy over media content, i.e.: the big copy

This is going to be successful, so...

  1. ...copy over the masses of movies, videos, television series, music, etc. you're going to want on your new server. Your tools are, in order of utility:
    1. scp -rp directory hostname:destination-path
    2. rsync --progress -avhe ssh directory-or-file-to-be-copied user@hostname:destination-path
    3. Create a tarball and use scp to copy it over.

Update Plex Media Server configuration

  1. Start the Plex Media Server.

    Once you start/launch the Plex Media Server on the destination system, you should notice that the contents of the plug-ins subdirectory that you did not copy over are now being populated.

    [email protected]:/# service plexmediaserver start
    plexmediaserver start/running, process 6070
  2. Launch Plex web application.

    Open your Plex Web App and you should see your libraries, though your content is unlikely to work yet. See Plex Media Server → Using Plex Web App → Opening Plex Web App

    I opened my browser to

    Uh, guess what? It actually came up with much of the same stuff I had seen on my old one:



    ...including that I had actually been watching a movie while waiting for the big file copy above.

  3. Edit your libraries.

    In order to update the content location for your media, you'll need to Edit a library and then add the appropriate folder for where your content is located on the destination system. Leave the existing/previous folder location in there for now.

    You'll need to do this for each of your libraries, but you should probably complete the process for one at a time. See Plex Media Server → Libraries → Editing Libraries.

    Here's what I did, following the page at this link a little bit, but carefully using my head (because the last thing I want is to get this content screwed up somehow):

    1. Click on a library, like Good Eats (see illustrations above).
    2. Click on pencil Edit Library (pencil icon).
    3. Since I know the actual filesystem path is changing from taliesin:/plex-server/Good Eats to tol-eressea:/plex-television/Good Eats, I click on Folder (on the left-hand side).
    4. Seeing /plex-server/Good Eats (the old path), I change it to plex-television/Good Eats. This put is on my larger disk mirror where I want all the television and maybe some other stuff.
    5. I click the orange Save Changes button and Plex begins to ruminate for a while.
    6. Using the big, white back arrow icon, I return to the index page to do the same thing for other libraries including Videos and West Films. For example:

    Once I get this done, I need to copy over all the television to plex-television and movies to /plex-movies, which will take a long time, and the set up the other libraries I had on taliesin, to wit: TV, Movies and Mormon Cinema.

  4. Update the library.

    After adding the new content folder, an update for the library will probably start. If not, simply do an Update library. The Server will examine the contents of the new location and associate the content with the existing media items in your library. See Plex Media Server → Libraries → Library Actions.

    Of course, the update did start without me asking. This is the bit that I dread: Plex is real enthusiastic about making a pig's breakfast out of my carefully laid metadata usually. I don't want that to happen. It's why I'm being so fastidious about this.

  5. Remove old content location.

    Once everything is completed and you've verified that things are working correctly and you can access your content, you can remove the old content location for your libraries. To do so, Edit the library and remove the old/previous folder location. See Plex Media Server → Libraries → Editing Libraries.

  6. Done

Appendix: Getting lists of your media

This isn't as straightforward as you'd like unless you're a software developer in which case it actually works just the way you'd best like in the sense that you get it as comma-separated values in a .csv file ready for importing into a database, spreadsheet, etc. This work is free from a very nice Dane.

This utility runs as a "Plex Channel plug-in" which means you must install it in Plex and run it from a browser. I'll explain this in a moment.

To get this, go to ukdtom/plex2csv.bundle. You can follow the doc there through or you can just follow my instructions here. Note that this plug-in is updated from time to time.

Please note that, despite what you may have read elsewhere on this page, the real PLEX_HOME is /var/lib/plexmediaserver. This path is used in the instructions for this bundle.

  1. Download from here.

  2. You now have a zip file that you must put into the Plex Media server plug-ins subdirectory. On my Ubuntu Linux server installation, this path is /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins.

  3. Once you've copied it there, unzip it.

  4. Rename it because the product of unzip isn't the right name:
    # mv plex2csv.bundle-master/ plex2csv.bundle
  5. Bounce your Plex Media server:
    # service plexmediaserver restart
    plexmediaserver stop/waiting
    plexmediaserver start/running, process 16228
  6. Create a place for the output to go. It must be somewhere the Linux plex user has privileges. The easiest is:
    # cd /tmp
    # mkdir PlexExports
    # chmod a+rwx PlexExports
    Please note that if you screw this up, you'll never see any indication that this plug-in is working, neither files on this path nor lists of libraries in your browser. And it won't give you an error. Simply put, you must get this instruction 100% and you must note this path exactly in all its spelling in the step below where you tell the plug-in where the files are to be put or you'll wonder why you wasted your time.

  7. Now bring a browser up on your Plex Media server.

  8. In the left column near the top, find Channels. If you can't find this, click the Home icon and look again.

  9. This will display all the channels you can get like PBS, Apple Move Trailers, Vimeo, etc. If you don't have any channels, you won't see any. Anyway, click the orange Install Channels button. You should see "Export 2 csv" in the list. Click on it. You should see something like this (I happen to have the Plex PBS channel installed too):

  10. Now click on the new icon.

  11. Click on the gear icon at the upper right.

  12. Enter the filesystem path to where you want it to put lists it creates, i.e.: /tmp/PlexExport. Do not screw this up as there will be no error to help you if you do. (See earlier note on this.)

  13. You may wish to uncheck Wrap lines depending on what you plan to do with the CSV file.

  14. I bumped my Max lines length, but the previous step makes this unnecessary, I think.

  15. I set all the levels to Simple, which isn't the default, because I wanted only the minimum. Even this is more than I want. You can read about all the information you can get at the website link above.

  16. I don't use Home mode, but I entered my log-in information—no one can see it anyway.

  17. Click Save.

  18. You should see all your libraries listed. I have many beyond just Movies, TV, etc., something like this:

  19. Click on whichever one you want to give a list.

  20. Go to the export output directory, /tmp/PlexExport.

  21. Go underneath there to directory Plex2csv.

  22. You should start seeing files like:
    [email protected]:/tmp/PlexExport/Plex2csv# ll
    total 120
    drwxr-xr-x 2 plex plex   4096 Jan 10 10:15 ./
    drwxrwxrwx 3 root root   4096 Jan 10 09:30 ../
    -rw-r--r-- 1 plex plex   7668 Jan 10 09:41 Foreign-Simple-20150110-094106.csv
    -rw-r--r-- 1 plex plex 103778 Jan 10 10:15 Movies-Simple-20150110-101507.csv
  23. Launch an editor on one of the files. The very first line is the header telling you what fields you're seeing. All the fields in the subsequent lines, one for each piece of media, will follow this order and be comma-delimited:
    "Media ID","Title","Sort title","Studio","Content Rating","Summary","Rating","Year","Genres"
    "5079","2010","","Metro-Goldwyn-Mayer","PG","A joint American-Soviet space expedit...","6.3","1984","Drama - Adventure Film"
    "3786","47 Ronin","","Universal Pictures","","Based on the original 1941 movie fro...","6.4","2013","Action - Adventure"
  24. If you wanted only a list of the titles, try using Python's CSV parser (I'm doing this all on one command line) to excerpt only the second, delimited item:
    [email protected]:/tmp/PlexExport/Plex2csv# head Movies-Simple-20150110-101507.csv \
          |  python -c 'import csv,sys;[sys.stdout.write(line[1]+"\n") for line in csv.reader(sys.stdin)]'
    47 Ronin
    American Gunmaker the John M Browning Story
    Anxiously Engaged
    Astérix et Obélix--Mission Cléopâtre
    Baptists at Our Barbecue
    Or that and pipe it to wc to count the movies:
    [email protected]:/tmp/PlexExport/Plex2csv# head Movies-Simple-201... | wc
        257     893    5261

Just in case you're disgusted by the single-line Python utterance, here it is in good Python (the reason it's 1 instead of 2 is because a Python list is 0-based), but you'll have to put it into a file:
import csv,sys

for line in csv.reader( sys.stdin ):
  print line[ 1 ]

Execute it thus:

[email protected]:/tmp/PlexExport/Plex2csv# head Movies-Simple-20150110-101507.csv | python

Appendix: Firefly: DVD order agent

There are television shows that appear on-disk in a different order than the original broadcast or that of the databases Plex consults when it ingests the media for these shows. Someone has created a special agent to fix that, i.e.: put them into the intended order (in the case where it's different). The prime example is Firefly. See here.

I believe that the DVD/Blu-ray order of the Firefly episodes is the correct one. The plug-in discussed here does more shows than Firefly including 24 and still others, but I only have Firefly.

On first inspection, even if you find a download link, there are no instructions. You have to squint through a couple of forum posts to get this. I'll put it all right here.

  1. Find the link and download the agent bundle as a zip file.

  2. Unzip it to your Downloads folders, copy it to your server (which may also be your desktop—who am I to judge?). You may be confused as it's not only one file, but a whole filesystem of two Python scripts, a data file and an image in a complex hierarchy. Yup, something made by a programmer for other programmers.
    ~/Downloads/plex $ tree
    `-- DVD Order Agent.bundle
        `-- Contents
            +-- Code
            |   +--
            |   `--
            +-- Info.plist
            `-- Resources
                `-- icon-default.png
    4 directories, 4 files
    The answer is found by looking at the contents of Plex' Plug-ins subdirectory: it's all similar stuff with a .bundle suffix. So, the answer is to copy the top-level directory, DVD Order Agent.bundle (with everything under it, but leaving it all just as it is).

  3. Put it on the Plex Media server path for plug-ins. Depending on your host architecture (Windows, Macintosh OSX or Linux), this might be different. On Linux, it's /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins.

    You'll need to fix ownership once it's in the filesystem:

    [email protected]:~# chown -R plex:plex "DVD Order Agent.bundle"/
  4. You might have to bounce your Plex server to see it show up.

  5. How to use it? Well, since it was written in 2010, the Plex browser interface has changed from the forum illustration. Here's how to do it in early 2015. (Click any image to see full size if you need to.)
    1. Go to Firefly on your server, right-click the   ...   control at the bottom of the left column and choose Fix Incorrect Match.

    2. (Please note from the count that I'm still awaiting the ripping of my last episode though I'm writing and illustrating these instructions. Don't be confused.)

    3. This will bring up a menu. Click on Auto Match, then select TheTVDBdvdorder. This is the plug-in you just added to your Plex Media server. By clicking and releasing your mouse button on TheTVDBdvdorder, you launch Plex off on this adventure.

    4. Click on the thumbnail for Season 1. You should find the Firefly episodes in a slightly different order than originally, like this:
      1. Serentiy
      2. The Train Job
      3. Bushwacked
      4. Shindig
      5. Safe
      6. Our Mrs. Reynolds
      7. Jaynestown
      8. Out of Gas
      9. Ariel
      10. War Stories
      11. Trash
      12. The Message
      13. Heart of Gold
      14. Objects in Space

Appendix: Images for Plex metadata

Many of the titles on my Plex Media server are nothing that exists in film or episode databases so I find myself obliged to ferret out images, synopses, etc.

Here you will find my collections of images and maybe other metadata aids.

Appendix: Music

As near as I've been able to figure, Plex offers support for music, but this support does not work.

When I first set up my Plex Media server, I simply moved all my MP3s in the subdirectory structure I've been consuming on Windows (Winamp) and Linux (Audacious) over to my Plex Media server and caused them to be ingested. The result was a big mess, most of my music wasn't available, much of it inaccurately named if named at all.

Thinking that this was going to be a lot of work, I set it aside for a couple of years before hitting it again. In February, 2016, I tried again by removing the library, creating a new one using an empty subdirectory (folder) and carefully adding one artist with one album:

Music/Natalie Cole/Natalie Cole - Unforgettable with Love with the following contents:

-rw-r--r-- 1 russ russ 4169474 Jan 11  2007 01 - The Very Thought of You.mp3
-rw-r--r-- 1 russ russ 3356948 Jan 11  2007 02 - Paper Moon.mp3
-rw-r--r-- 1 russ russ 2964900 Jan 11  2007 03 - Route 66.mp3
-rw-r--r-- 1 russ russ 3684627 Jan 11  2007 04 - Mona Lisa.mp3
-rw-r--r-- 1 russ russ 2496785 Jan 11  2007 05 - L-o-v-E.mp3
-rw-r--r-- 1 russ russ 2211330 Jan 11  2007 06 - This Can't be Love.mp3
-rw-r--r-- 1 russ russ 3560907 Jan 11  2007 07 - Smile.mp3

On that day, I followed these links:

However, clicking the Update Library control when looking at an empty library yields "The library has no content yet. Click here to add content to the library."

I played around with this several times also trying the documented filesystem format all to no avail. As I don't care at all for Plex' Premium music features, I tried the basic music library option too.

Appendix: Miscellaneous

Mid-November 2015 update.

Plex has released a major update to the Plex Media Server, version This release features

Why these matter

The transcoder is used when you watch the server on any device other than a computer. The new upgraded transcoder should be able to handle more file types as well as offer better subtitle support (such as the Elvish in LoTR that never seems to show up on half the devices).

The Roku is the most popular device among Plex viewers around me. While this device is fantastic, using it to stream 1080p video encounters far more buffering unless it's on the local network with the server (the case basically at my house since that's where the server is). This update may fix some of those issues.

Chapter thumbnails are a very desirable feature of DVDs and Blu-rays that most have been living without when watching Plex (but also Netflix and Amazon). Chapters are useful for skipping past introduction sequences for television shows, skipping over scenes, etc.

It's unclear whether and how well these will work and on what devices (like the Roku), but one can hope. It's unclear, for instance, whether all or which media on the server will have them. It may depend on how it was ripped and what format it's been ripped to. It's expected that Matroska, the most common format on my server (especially because of how well it does subtitles and especially because it keeps subtitle content inside the same file as the movie so it's not lost when copied), may be the most likely to benefit from chapter titles.