Nextcloud in web hosting: finish an update and run occ

Skip to main content
Du bist hier:
Drucken

Nextcloud in web hosting: finish an update and run occ

If you update a Nextcloud in web hosting via Plesk, it can remain in maintenance mode afterwards. The reason: the update runs in two steps. First the program files are replaced, then the database is adapted to the new version. For the second step, the Nextcloud updater needs a PHP function that is blocked on our hosting servers for security reasons. Your files and data are not affected.

You run the second step yourself with a scheduled task in Plesk. You set up the task once and then start it with one click after every update. A scheduled task is also the way to run other occ commands, because the SSH environment in web hosting is restricted.

Step 1: Create a scheduled task

Log in to Plesk and click «Websites & Domains». For your domain, click «Scheduled Tasks» («Geplante Aufgaben») and then «Add Task» («Aufgabe hinzufügen»).

Step 2: Configure the task

  • Task type: «Run a PHP script» («PHP-Skript ausführen»)
  • Script path: the occ file of your Nextcloud, for example httpdocs/nextcloud/occ
  • With arguments: upgrade
  • PHP version: the same version your Nextcloud runs with
  • Run: «Yearly» («Jährlich»). This way the task does not keep running by itself.
  • Description: for example «Finish Nextcloud update»

Click «OK».

Step 3: Run it after every update

Before the update, make sure a current backup is available, then start the update via Plesk as usual. If Nextcloud stays in maintenance mode afterwards, open «Scheduled Tasks», click your task and then «Run Now» («Jetzt ausführen»). Wait until the output appears. This can take a few minutes. At the end it should say that maintenance mode was turned off («Turned off maintenance mode»).

Good to know

  • Nextcloud can only move up one major version per run, for example from 33 to 34.
  • If Nextcloud switches off apps during the update that do not work with the new version, this is shown in the output. Your data is kept, and you can switch the apps on again as soon as a matching version is available.
  • Other occ commands, for example app:update –all for app updates, should work the same way. Enter the command under «With arguments» and try it out.
  • Running updates in your Nextcloud is not part of the hosting service. If we do it for you, we charge for the work.
Related Post