Skip to content

PSA: Do not upgrade to Nextcloud 21 yet

Those using Docker/containers need not read further.

If you have a bare-metal Arch installation of Nextcloud, beware that Nextcloud 21 introduces a number of breaking changes including but not limited to:

  1. Transition from PHP 7.4 to PHP 8
  2. A new directory structure for configuration options, user data, and other critical information
  3. A new dedicated nextcloud user

This can cause various dependency errors, permissions issues, and other inconvenient weekend troubles. The nextcloud-systemd-timers auxiliary package is not yet wrapped for PHP8 (though this is a trivial patch). True to the nature of Arch's swiftness, there is not currently documentation provided by Nextcloud on how to migrate as of the timing of this post.

If you value your sanity, wait a bit for more information to arise before upgrading.


I was not careful enough to realize these hazards and upgraded anyway despite having previously devoted many hours to Nextcloud upgrade interventions. Good thing I have backups... ๐Ÿ™„


Here is the associated Arch Linux forum post where some users are trading tips on how to recover their installations/migrate to NC21

Edited 21 Feb 2021. We only hold this version.

26 points16 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
26 ยท 81% up
Kind
Text
ID
losnii

Author

28
posts
111
comments
9
media
View profile

16 comments

I agree with the general sentiment of the changes being introduced in an untested and very counterproductive way (and in fact against my explicit suggestion). There's unfortunately not much I can do about that now - although there will be an internal post-mortem about this situation.

As I had to spend my weekend doing bug fixes for this and revising the wiki article, I have also added a troubleshooting subsection about the changes in the article, for anyone running into issues after upgrade.

However, some people seem to still experience issues with certain setup scenarios. I believe that the wiki article will require improvements for the following environments: php-apache, nginx/apache + uwsgi/php-fpm though. In case you use those (successfully), please make sure to document them accordingly!

Please also note, that currently uwsgi does not yet have php >= 8.0.0 support (a fix has been proposed upstream, but it is not backported for our release yet). This means nextcloud can only be used with the php7 equivalents in that scenario (php7, php7-gd, etc.). If time permits I will look into that later today though.

Sorry for any inconveniences due to these changes.

4 points

Any updates on the php-apache improvements? Been trying to upgrade for days, but the wiki instructions are not complete. Following the wiki verbatim Nextcloud still wont use the new user account and spits out permission errors.

1 points

I appreciate your work these past few days. Yesterday evening I reprovisioned my server and all is well. Made a contribution to the wiki for good measure, too. A lot of helpful information was added to the wiki over the last 48 hours

1 points

With 21.0.0-6 I believe that the 'instability phase' (a.k.a what should've been in [community-testing]) is done, so people with some time on their hands can upgrade now.

4 points

Do you know why 21 was pushed to [community]? Just seems a week premature.

Thanks for your work maintaining the Jellyfin AUR packages by the way.

1 points

From the different comments in the bug tracker it seemed that one of the two maintainers has indeed pushed the package too early, while the other wanted to wait. And then many band aids followed to try and fix the situation. They also have a note in the PKGBUILD now to not push .0 but just the .1 releases.

2 points

Inevitably in these kinds of threads somebody will mention how smooth their Docker/Nextcloud setup is. I am genuinely glad to hear this since that means more people can be readily exposed to open-source Nextcloud with minimal hassle.

I would love to use docker for something complex like Nextcloud. However the hardware Iโ€™m running not does not support ARMv7 images for MariaDB and for the sake of mental clarity it would be more tedious to transfer all of my reverse proxies and their modifications to docker-compose.yml just to appease Nextcloud.

2 points

Not gonna lie, was about to until i read this. I run mine on k8s with postgres, maybe you could find an image that suits you.

1 points

A new directory structure for configuration options, user data, and other critical information

A new dedicated nextcloud
user

So like it already was when using:

https://aur.archlinux.org/packages/nextcloud-uwsgi-service/

โ€‹

Great.

โ€‹

It makes sense that the nextcloud instance runs as its own user and not shares the user with the other services that are exposed to the web like the webserver.

2 points

Yup, sensible changes ultimately but definitely not a smooth upgrade process

2 points

As someone who did an install of Nextcloud a couple weeks ago... went through all the steps. Started it and was greeted with an error telling me to use php 7.4...

... Iโ€™m just not in the mood to upgrade this.

Honestly why the heck is the install process for this just so horrible.

2 points

It's strange that the package requires php>=8.0.0, but then it also works with the uwsgi-plugin-php which is currently limited to php7.

1 points

I agree 100%. Cannot even upgrade properly to 21 yet (from 20.0.7). Good thing that I have a backup from last night - will restore the whole LXC container... and will wait a bit.

1 points

Hey ! :)

i cant agree. i'm running nextcloud 21 with php8 on a manjaro mini-server for private use with no problems.

things i had to do:

  • changed all occurences of ,,php7" in http.conf to ,,php"
  • added user ,,nextcloud" to group ,,http"
  • changed ownership of ../webapps/nextcloud/* to user ,,nextcloud"
  • set permissions of ../webapps/nextcloud/* to 0770

that's it. if nextcloud instance is corrupted just backup config.php, create CAN_INSTALL and reinstall the instance. then open up your old config.php and insert all entries (except instance ID and salt). shooooould work. so did it for me at least.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

โ†orโ†’
Previous / next file
โ†‘orโ†“
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.