Nextcloud update using cli only


Nextcloud can be updated using the Nextcloud command line interface only. Even your enabled apps will be updated as far as they are available on the Nextcloud app store. But first backup your Nextcloud system (database and data).


sudo -s
cd /var/www
sudo -u www-data php nextcloud/updater/updater.phar

Press y to start updating your Nextcloud

Now the code was updated and the occ upgrade should be performed. Press y to continue.

Press n to disable Nextclouds maintenance mode and the update has ben finished already.

You are on the latest Nextcloud release – can be verifed by

sudo -u www-data php /var/www/nextcloud/occ status
sudo -u www-data php /var/www/nextcloud/occ -V

Enjoy your personal data in your secured and hardened Nextcloud-Server!

Don’t forget to backup your Nextcloud

Find more instructions here: Nextcloud Backup and Restore



Carsten Rieger

Carsten Rieger

Carsten Rieger is a senior system engineer in full-time and also working as an IT freelancer. He is working with linux environments for more than 13 years, an Open Source enthusiast and highly motivated on linux installation and troubleshooting. Mostly working with Debian/Ubuntu Linux, Nginx and Apache web server, MariaDB/MySQL/PostgreSQL, PHP, Cloud infrastructure (e.g. Nextcloud) and other open source projects (e.g. Roundcube) and in voluntary work for the Dr. Michael & Angela Jacobi Stiftung for more than 6 years.

Leave a Reply

Your email address will not be published. Required fields are marked *