Nextcloud updates in terminal only?

Hello,

is it possible to download and install nextcloud updates completely with the terminal?

I do not check the admin interface frequently.

It is possible to check for new upgrades in the terminal and install them in a terminal upgrader?

Something that could be checked automatically via script, and notify me by log in via ssh.

You can take one of the linux packages: Linux packages status

There is no automatic routine implemented, you could write a small script that does this job for you (perhaps there is such a script somewhere) by implementing the steps from the manual upgrade:
https://docs.nextcloud.com/server/11/admin_manual/maintenance/manual_upgrade.html?highlight=manual%20upgrade

I wouldn’t run a fully automated update/upgrade procedure, rather an automatic notification and then run start the script manually (after a backup).

Downloading the correct zip file (with pgp,md5sum check) with a script would be difficult, the archiv name is changing any time (version number).

Nextcloud has the admin interface updater, I thought about something similar in terminal mode.

This could be used on servers and autonomous from the distribution.

  • automatic update notification via terminal
  • manual download & upgrade via terminal, so we can fix problems (if there are some), but via script

The same is also implemented as CLI tool, try php updater/updater.phar in your Nextcloud root folder as web server user.

2 Likes

I tried, is the command wrong?

sudo -u www-data php updater/updater.phar
Nextcloud Updater - version: 1.0.3

Current version is 11.0.3.
PHP Warning:  simplexml_load_string(): Entity: line 1: parser error : Space required after the Public Identifier in phar:///var/www/owncloud/updater/updater.phar/lib/Updater.php on line 408
PHP Warning:  simplexml_load_string(): <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in phar:///var/www/owncloud/updater/updater.phar/lib/Updater.php on line 408
PHP Warning:  simplexml_load_string():                                                  ^ in phar:///var/www/owncloud/updater/updater.phar/lib/Updater.php on line 408
PHP Warning:  simplexml_load_string(): Entity: line 1: parser error : SystemLiteral " or ' expected in phar:///var/www/owncloud/updater/updater.phar/lib/Updater.php on line 408
PHP Warning:  simplexml_load_string(): <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in phar:///var/www/owncloud/updater/updater.phar/lib/Updater.php on line 408
PHP Warning:  simplexml_load_string():                                                  ^ in phar:///var/www/owncloud/updater/updater.phar/lib/Updater.php on line 408
PHP Warning:  simplexml_load_string(): Entity: line 1: parser error : SYSTEM or PUBLIC, the URI is missing in phar:///var/www/owncloud/updater/updater.phar/lib/Updater.php on line 408
PHP Warning:  simplexml_load_string(): <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> in phar:///var/www/owncloud/updater/updater.phar/lib/Updater.php on line 408
PHP Warning:  simplexml_load_string():                                                  ^ in phar:///var/www/owncloud/updater/updater.phar/lib/Updater.php on line 408

                                               
  [Exception]                                  
  Could not parse updater server XML response  
                                               

update

This seems to have been a temporary issue on our update server. I’ve taken
a look and this should work now. Can you retry? :slight_smile:

1 Like

ok, seems to work :slight_smile:

Nextcloud Updater - version: 1.0.3

Current version is 11.0.3.

No update available.

Nothing to do.