Install Plex Media Server on Ubuntu

Install (for ubuntu)

It's Back! After a long abscence the repo has returned

echo deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
curl | sudo apt-key add -

sudo apt-get update
sudo apt-get install plexmediaserver

You may wish to relocate the library database for space or security reasons

sudo service stop plexmediaserver
sudo mv 
/var/lib/plexmediaserver /mnt/crypt
sudo ln -s /mnt/crypt/plexmediaserver 
sudo chown plex:plex 

You may also need to adjust the range of IPs allowed in without Auth for initial setup

sudo vim "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Preferences.xml"

... allowedNetworks="" ...

Allow Firewall Access

sudo vim /etc/ufw/applications.d/plexmediaserver

title=Plex Media Server
description=Plex Media Server is the back-end media server component of Plex

# Add custom rules as needed
sudo ufw allow from to any app plexmediaserver
sudo ufw deny from to any app plexmediaserver
sudo ufw allow plexmediaserver

Setup Command Line Control

You can kick off scans via the command line, but you have to invoke the commands as the plex user


sudo su -c "export LD_LIBRARY_PATH=/usr/lib/plexmediaserver;/usr/lib/plexmediaserver/Plex\ Media\ Scanner --scan" plex


curl http://localhost:32400

http://<server name>:32400/web


cd /var/lib
tar -czf ~/plexmediaserver.tgz plexmediaserver


sudo vim /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Preferences.xml 

tail -20 /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log

apt update gives the warning:

W: Conflicting distribution: public InRelease (expected public but got )

From Plex

Yes, There is a warning. Ignore it.
There are two different requirements for the layout based on the distro itself (Debian vs Ubuntu).
We ended up with a compromise which works except for Ubuntu 17 and that warning.