Upgrade NC19 to NC 20 Docker failed

Running NC19 as Docker on a Unraid Server, the upgrade to NC20 failed when trying to update the app “mail”. It then got stuck in maintance mode.


Clicking “start update” gives a error: Possible CSRF attack. Connection will be closed.

what should I do now?

Edit: I mistake the occ command to not work too.

Well, as the error message says, you are missing some php modules. In a normal linux environment you could just install them,e.g.

$ apt install php-bcmath php-gmp

IMHO, you can either:

  • connect into the docker container and install them there manually
  • install the updated docker image which contains these packages

P.S. What strikes me as weird is also that it is only now complaining about the XML package. AFAIK it was already required by Nextcloud 19.

I could not find out how to install these modules within the docker environment.

I got “forced” to update to NC20 after my docker (auto-) updated the image.

What is the source of the docker image? Something official/reputable? IMHO it is faulty if it is missing required packages.

It’s the official docker image

I am not familiar with unraid, but the thread you linked specifically says “Nextcloud 18”. I don’t think this image is meant for Nextcloud 20.

thread description was not updated. It’s more for the template I think since it is the official docker image.

I reverted back to a backup with a empty data path and the upgrade was now successful, but not flawless.
After updating the docker image, the log showed the following:

Initializing nextcloud 20.0.0.9 ...
Upgrading nextcloud from 19.0.3.1 ...
Initializing finished

but stuck then at 1 cpu core 100%. I did let it run for 2 hours just to be sure but nothing happened. The webinterface was not working.

I restarted the docker and then the webinterface was showing the upgrade page.

After I switched back to my real data path, it did want to update mail (and this time also notes) again as seen above. I removed the appdata_xxxxx folder in the data dir and NC20 is finally running.

I tried to use the old database with this install but it gets a internal error. There must have happened something to it. So what I am missing now is a day of file uploads.