Plex is a very useful cross-platform mediaserver, it supports many different media formats and has a good UI. So I decided to install a Plex mediaserver on my dedicated server.
The OS in my server is Ubuntu 16.04, the following code can be also used in Debian.
Plex can be deployed by following ways:
1.by apt (recommand)
you can easily update your server with this methode, instead of download deb packages from website each time.
add apt key and source list.
wget -q https://downloads.plex.tv/plex-keys/PlexSign.key -O - | sudo apt-key add - sudo echo"deb https://downloads.plex.tv/repo/deb/ public main" > /etc/apt/sources.list.d/plexmediaserver.list echo
install plex server:
sudo apt-get install apt-transport-https -y sudo apt-get -y update sudo apt-get install -y plexmediaserver
you can also download deb from official website:
wget https://downloads.plex.tv/plex-media-server/188.8.131.5232-21ab172de/plexmediaserver_184.108.40.20632-21ab172de_amd64.deb sudo dpkg -i plexmediaserver*.deb
enable startup and start the service
sudo systemctl enable plexmediaserver.service sudo systemctl start plexmediaserver.service
Configure Plex server:
We need to create a SSH Tunnel to connect to server before we setting our media server. e.g. in xshell:
Enter http://localhost:8787/web into your browser to view the Plex web interface, as shown below. Input your Plex account username and password to proceed with the setup process:
you should finish following guide to initial your server
add Media Library
Before you add the Library, you should modify permission of the directory you want to share. Plex server has their own usergroup, so you need to give the correct permission.
chmod -R 755 /your/path/to/MediaLibrary
if you don’t need write access of the media server, you can also give only read and execute access.
click add to add Libiraies:
guide to the sharing directory
ATTENTION: the scanner and the media proxy in advance tab will affect the information in your libraries(and even file format).
After initialisation, you can enter ip:32400 to modify your libraries or other settings. The Apps in the mobile phone will also works fine.