Skip to main content
  1. 2022/
  2. July/

Updating Nextcloud through the CLI

Updating Nextcloud Server is a whole lot easierI don’t like the k8s version of Nextcloud server. It simply feels like the wrong tool for the job. #

Instead I run a VM and manage nextcloud as usual.

CLI Updating for the win #


Check to see if there’s an update #

root@bluebox:~# cd /var/www/nextcloud && sudo -u www-data /var/www/nextcloud/occ update:check && cd $OLDPWD


Update it for me #

root@bluebox:~# cd /var/www/nextcloud && sudo -u www-data php --define apc.enable_cli=1 /var/www/nextcloud/updater/updater.phar && cd $OLDPWD

Reboot #


Perform the Major version update #

root@bluebox:~# cd /var/www/nextcloud && sudo -u www-data php --define apc.enable_cli=1 /var/www/nextcloud/updater/updater.phar


Validate everything’s Kosher #

root@bluebox:/var/www/nextcloud# cd /var/www/nextcloud&& sudo -u www-data /var/www/nextcloud/occ update:check && sudo -u www-data /var/www/nextcloud/occ upgrade:


Mischief Managed #

Stupendously simple now.

Thanks Nextcloud team :)