Enable automatic updates on Ubuntu

I recently found out how to do it
It took me a while, so I'll share it with all of you: to enable completely automatic updates of Plex Media Server on Ubuntu
[list]
[*]install package unattended-upgrades (as mentioned [here](https://help.ubuntu.com/12.04/serverguide/automatic-updates.html))
[*]modify your /etc/apt/apt.conf.d/50unattended-upgrades file to add the "Plex Team" origin to the "Allowed-Origins" section, it should look like this:

<br />
// Automatically upgrade packages from these (origin:archive) pairs<br />
Unattended-Upgrade::Allowed-Origins {<br />
        "${distro_id}:${distro_codename}-security";<br />
        "${distro_id}:${distro_codename}-updates";<br />
        "${distro_id}:${distro_codename}-proposed";<br />
        "${distro_id}:${distro_codename}-backports";<br />
        "Plex Team:";<br />
};<br />



[/list]

The key here is that the syntax apparently is "origin:suite". In the Plex repo there is an origin, but no suite... leaving it blank works, nonetheless.

This tip doesn’t work anymore

This does work: https://forums.plex.tv/discussion/comment/1386123/#Comment_1386123

https://support.plex.tv/hc/en-us/articles/235974187-Enable-repository-updating-for-supported-Linux-server-distributions

1 Like

Is there a way to check release via command line, I would like to check current and available so I can script alert when new release is available.

Use Mr. Worf’s script.

I don’t really want to completely automate updates, just would like to get a command line version of clicking through the web ui: settings-> server -> check for updates

Mr. Worf’s script does not automate updates by default. It will tell you that your installed version of PMS is either current or that an update is available. Isn’t that what you wanted?

If you run it on cron, it will email you if there is an available update. It can also be told to download the updated package for you.

Or,

Do you use the repo provided by Plex.tv? If so you can run this command:

apt-cache policy plexmediaserver

That will tell you the installed version, a candidate version (which may or may not be different than the installed version), and a list of every version available from the repo.

@“frederick.grayson” said:
Mr. Worf’s script does not automate updates by default. It will tell you that your installed version of PMS is either current or that an update is available. Isn’t that what you wanted?

If you run it on cron, it will email you if there is an available update. It can also be told to download the updated package for you.

Or,

Do you use the repo provided by Plex.tv? If so you can run this command:

apt-cache policy plexmediaserver

That will tell you the installed version, a candidate version (which may or may not be different than the installed version), and a list of every version available from the repo.

Thanks, that is a step in the right direction, I just need to script a compare or clean up all the version table

I guess I don’t understand what it is you want to do.

@“frederick.grayson” said:
I guess I don’t understand what it is you want to do.

Change this:

$ apt-cache policy plexmediaserver
plexmediaserver:
Installed: 1.10.0.4523-648bc61d4
Candidate: 1.10.0.4523-648bc61d4
Version table:
*** 1.10.0.4523-648bc61d4 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
100 /var/lib/dpkg/status
1.9.7.4460-a39b25852 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.9.6.4429-23901a099 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.9.4.4325-1bf240a65 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.9.2.4285-9f65b88ae 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.9.1.4272-b207937f1 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.8.4.4249-3497d6779 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.8.3.4235-2d20185b0 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.8.1.4139-c789b3fbb 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.7.5.4035-313f93718 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.5.7.4016-25d94bad9 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.5.6.3790-4613ce077 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.5.5.3634-995f1dead 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.5.4.3596-0d2d8c2be 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.5.3.3580-4b377d295 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.4.4.3495-edef59192 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.4.3.3433-03e4cfa35 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.3.4.3285-b46e0ea 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.3.3.3165-ed2f710 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.3.3.3148-b38628e 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.3.2.3112-1751929 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.2.7.2987-1bef33a 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.1.4.2757-24ffd60 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.1.3.2700-6f64a8d 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.0.3.2461-35f0caa 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages
1.0.2.2413-7caf41d 500
500 https://downloads.plex.tv/repo/deb public/main amd64 Packages
500 https://downloads.plex.tv/repo/deb ./public/main amd64 Packages

To this (similar to the web gui) :

Version 1.10.0.4523 - Up to date.
or this
Version 1.10.0.4523 - An update is available.

Not a big deal, I just need to create a script to clean up the output of “apt-cache policy plexmediaserver”

Mr. Worf’s script does that for you. Why don’t you just try it?

Might, thanks for that too, but the apt-cache policy plexmediaserver seems to be all I was looking for, thanks for both.

On Debian Stretch this works for me:

/etc/apt/apt.conf.d/50unattended-upgrades

add in the Unattended-Upgrade::Origins-Pattern block:

"site=downloads.plex.tv";

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.