Monitor Whether Updates Are Available

Hi! :wave:

I manage a Nextcloud installation for a sports club, which I don’t use myself.

I install updates as follows:

# create file system snapshot
btrfs subvolume snapshot -r / /snapshot/$(date +%Y%m%d-%H%M)

# update nextcloud
php ~/www/updater/updater.phar

It works great and I have never had a problem :partying_face:

My question is now:

  • I monitor the Nextcloud installation and perform various tests to ensure that Nextcloud is always available. This includes the availability of WebDAV, CalDAV, ect.
  • I would also like to have a test that checks whether a Nextcloud update is available.
  • My monitoring system can access the system via SSH and can execute shell scripts.

Is there an easy way to see on the console if an update is available? Theoretically, updater.phar is an indicator, but it doesn’t really seem to be suitable for this.

  • If it is executed non-interactive (by a script via ssh) then it installs the update without asking
  • There is no exit code which indicates an update. Seems like the exit code is always 0
  • There is no mode/option-flag to check for update and exit

So, in general, how do you monitor your Nextcloud installation for updates? And do any of you use an automatic mechanism (external monitoring) for that? Is there an API or occ command for this?


The best would be to add a feature that you can just check for updates and it returns available versions or something like that, so you can use it by external scripts.
Alternative way could be to check the tags on the server repository → GitHub - nextcloud/server: ☁️ Nextcloud server, a safe home for all your data and filter the versions.

No, the problem with the automatic updater is that it would run major upgrades as well:

The minor upgrades are generally less problematic and I like to install them very quickly, I wait with major upgrades on purpose, I want to run it on a test setup first and I want to make sure that all the used apps are available on the new version as well.

Hi tflidd,

thank you for your answer

I have created a feature request:

I already had that idea. But that is not so reliable. Often several hours or days pass between git tag and release, as Nextcloud makes a staged release (I would do the same).

Automatic updates are not an option for me. The question was more about whether someone does automatic update monitoring. I mean, whether updates are available.

You can monitor the latest github releases from Nextcloud using RSS. Simply setup a client on your phone or computer and add the feed. Viola.

I know. That’s what I’m currently doing (with a different RSS reader).

According to this issue there are also rss feeds available for the appstore.

Here is the full feed for all apps in the store

it matches the latest apps list