Hello. Until recently, my Ubuntu 14.04.4 server has been setup that once a week it runs a CRON job to run a script that will check for updates to Plex Media Server and if there are any, perform the update. This has worked perfectly until recently when Plex changed the website slightly. Now I can’t get the script to work at all as fetching https://www.plex.tv/downloads no longer has ANY links that can be pulled out with a script. Is there an API to access this information easier than scraping it from the website? Plex does NOT support auto updating Plex Media Server on Linux at all, so without a 3rd party script to do it for me, it becomes a hassle. (The server is headless and requires having to download the file on a different computer, transferring to the server, and then installing. Way more difficult to do automatically than it was.)
I am also interested in this. I have a headless server with a nightly script that is supposed to grab the newest version of PMS but the plex.tv/downloads website now gives me a 403 error. It is horribly annoying to manually update the server all the time. It would be nice to have an easy way to do this on linux.
EDIT:
Just looking around I found that they do have a version api with the version and download links. you should be able to modify your script to use the api.
https://plex.tv/api/downloads/1.json
That should do the trick.
then add a daily cron job
Bob’s your uncle.
~~Something to consider, if you are auto updating you may want to check and see if a file is currently being accessed/played before you start the process.
I’m thinking you could do this with a little bash-fu (lsof and grep), unles the plex devs have a way to query plex from cli to see if anything is playing.~~
Missed the part of the script that was already doing that, cheers!
From my experience running servers, having one auto-update anything is generally a bad idea. In the case of my PMS, I always make sure nothing is going on at the moment that I do the update.
I’ve done this script based on information I could find around, it does the job 
#!/bin/bash
#####
#
# This Script will update Plex Media Server to the latest version for Ubuntu
#
# To automatically check & update plex, run "crontab -e" and add the following lines
#
# # Check for Plex Media Server Updates every day @6:00 am
# 0 6 * * * /root/update-plexmediaserver.sh
#
# 2018 - Matthieu Guerry
#
###
# Check Current installed version and exit if latest is already installed
VersionInstalled=$(dpkg -s plexmediaserver | grep -Po '(?<=Version\: )(\S+)')
VersionAvailable=$(curl -s "https://plex.tv/downloads/details/1?build=linux-ubuntu-x86_64&channel=16&distro=ubuntu" | grep -Po '(?<=(\" version=\"))(\S+)(?=(\"))')
if [ $VersionAvailable = $VersionInstalled ]; then echo "Plex Media Server is already up-to-date (version $VersionInstalled)"; exit; fi
# Download latest installation package to /tmp folder
curl -s "https://plex.tv/downloads/details/1?build=linux-ubuntu-x86_64&channel=16&distro=ubuntu" | grep -Po '(?<=url=\")(\S+)(?=\")' | xargs wget -P /tmp/
# Stop Plex Service
sudo service plexmediaserver stop
# Install latest version
sudo dpkg -i /tmp/$(curl -s "https://plex.tv/downloads/details/1?build=linux-ubuntu-x86_64&channel=16&distro=ubuntu" | grep -Po '(?<=fileName=\")(\S+)(?=\")')
# Start Plex Service
sudo service plexmediaserver start
# Remove installation package from /tmp folder
rm /tmp/plexmediaserver_*