Site Overlay

Updating Nextcloud via Updater GUI

While the updater GUI is really comfortable, I regularly run into difficulties with file permissions and timeouts. This post summarizes the steps needed to run an update via Nextclouds Update GUI successfully.

1. Acquire su privileges and produce a fresh backup

This step contains preliminary work and the removal of the assets directory which is normally empty but causes the Updater to stall immediately.

2. Set ownership to www-data

This step is needed to prevent the Nextcloud updater from failing the file and directory permissions check:

In case the check still fails, you can set file permissions as follows (takes a while to perform on my Pi ZeroW):

3. Increase timeout of Nginx

To prevent Nginx from running into a timeout during the creation of the backup, you have to edit /etc/nginx/nginx.conf. Uncomment the fastcgi_read_timeout parameter and increase it from 600 to 6000.

Do not forget to reload the new configuration settings of Nginx by

In case, the update still fails, also try to uncomment and modify the parameter proxy_read_timeout in the same way as above.

4. Start the updater web service

Log in as admin on your Nextcloud GUI navigate to the update pane click on “Start Update” in the Updater. The Update should now run through without any problems.

At the end of the update procedure, choose to switch off maintenance mode. In case this does not happen automatically, you can switch it off via console:

5. Finalize Update by reopening the Login home page

Use your browser of your desktop to navigate to the Nextcloud login page. It may be that you have to trigger the finalization of the update by clicking some button like “Finish update”. This will take another couple of minutes.

To be on the safe side, log in with your administrator account and go to the Settings, choose “Overview” from the “Administration” section on the left side of the window and check the Security and Setup warnings.

Keep in mind though, that not all warnings require immediate action:

  • Updating the database to support 4-byte characters has failed on my MariaDB 10.1 installation and led to trouble with the database. There are a lot of postings out which report problems with exceeding the maximum key length (1000 or 761). While this issue is not sorted out, I recommend to disregard the instruction from Nextcloud and leave everything as it is.
  • Equally little sense makes the instruction to upgrade to a new PHP version. If this was available for my Raspian it would already have been installed by the usual update / upgrade routine.
  • I could not find any explanations on how to configure a memory cache on an RPi Zero device. Given that the device has limited RAM, I suppose that the recommendation makes only sense for servers equipped with larger memory.

6. Cleanup

Reset file permissions by running the sudo fixperm.sh script in the /home/pi directory.

Reset the Nginx timeouts by putting them back to 600 and commenting them out. Keep in mind, that you have to reload the parameters into nginx by sudo service nginx reload.