Nextcloud update via command line

You can upgrade Nextcloud via the GUI, but this sometimes may not work. Thus an alternative solution is to do it via command line:

[email protected]:/var/www/html/nextcloud# sudo -u www-data php updater/updater.phar

Source: https://help.nextcloud.com/t/nextcloud-12-beta3-start-update-button-not-worky/12715