Can’t wait for the Nextcloud 16 update any longer?

Update to Nextcloud 16

Did you create a backup yet? Please be aware, some apps have to be re-activated manually afterwards.

Let’s begin the manual Nextcloud upgrade and stop all related services:

sudo -s
service nginx stop && service mysql stop && service redis-server stop && service php7.3-fpm stop

Move, download and extract the Nextcloud binaries:

mv /var/www/nextcloud/ /var/www/nc15
cd /usr/local/src
wget https://download.nextcloud.com/server/releases/nextcloud-16.0.0.tar.bz2
tar -xjf nextcloud-*.tar.bz2 -C /var/www && chown -R www-data:www-data /var/www/ && rm nextcloud-*.tar.bz2

Restore your previous config.php file and set the proper permissions:

cp /var/www/nc15/config/config.php /var/www/nextcloud/config/
chown -R www-data:www-data /var/www/nextcloud

Restart all services and optimize Nextcloud:

service mysql restart && service redis-server restart && service php7.3-fpm restart
sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices
sudo -u www-data php /var/www/nextcloud/occ db:convert-filecache-bigint
sed -i "s/upload_max_filesize=./upload_max_filesize=10240M/" /var/www/nextcloud/.user.ini
sed -i "s/post_max_size=./post_max_size=10240M/" /var/www/nextcloud/.user.ini
sed -i "s/output_buffering=.*/output_buffering='Off'/" /var/www/nextcloud/.user.ini
service nginx restart

Perform the upgrade itself:

sudo -u www-data php /var/www/nextcloud/occ upgrade
sudo -u www-data php /var/www/nextcloud/occ app:update --all

If the Nextcloud integrity check will fail please set the config.php value

'integrity.check.disabled' => true,

to true, then re-scan your files within your Nextcloud Admin-Panel and set the paramatere back to false again.

'integrity.check.disabled' => false,

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


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 7 years.