For the installation, we need the media server file matching our system from the Plex website, which can be found here.

Copying the package download link, download it to the VPS or server machine:

wget https://downloads.plex.tv/plex-media-server/0.9.15.3.1674-f46e7e6/plexmediaserver_0.9.15.3.1674-f46e7e6_amd64.deb

Then install the downloaded file:

dpkg --install plexmediaserver_0.9.15.3.1674-f46e7e6_amd64.deb

If it complains about missing dependencies, you can install them with the following command:

apt-get -f install

Then navigate to the /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/ directory, and edit the Preferences.xml file using nano or vi, by adding the following line after the Preferences word in the file (replacing 1.2.3.4 with your own IP address):

allowedNetworks="1.2.3.4/255.255.255.0"

Once you’re done with all that, restart the Plex service:

service plexmediaserver restart

Then visit your server’s IP address:

http://yourserverip:32400/web

And configure the server accordingly.