Automated Plex Media Server Updates
Plex Media Server updates on Linux don't arrive via apt upgrade — they require a manual download and dpkg install. To eliminate the need to remember this process, two new scripts were added: one to perform the update, and one to check daily and send a Telegram alert when a new version is available.
1. plex-update
A self-contained update script installed at /usr/local/bin/plex-update. Must be run as root.
- Queries the official Plex downloads API (
plex.tv/api/downloads/5.json) for the latest public release. - Compares against the installed version via
dpkg-queryand exits cleanly if already up to date. - Downloads the
.debpackage to a temp directory, verifies the SHA1 checksum, and installs withdpkg. - Cleans up the temp file automatically on exit.
Usage: sudo plex-update
2. plex-check
A lightweight version-check script installed at /usr/local/bin/plex-check. Requires no root access.
- Queries the same Plex API and compares against the installed version.
- If an update is available, sends a Telegram notification (via
telegram_notify.sh) with the current and available version numbers and a reminder to runsudo plex-update. - Silent on success — no notification if Plex is already current.
3. Cron Job
Added to the user crontab to run nightly at 4:00am, after backups complete:
0 4 * * * /usr/local/bin/plex-check >> /var/log/plex-check.log 2>&1
Note: the pre-existing /usr/local/bin/plexupdate (mrworf/plexupdate project) was found to be non-functional — its plexupdate-core dependency was missing. The new scripts replace it entirely.