Witzker's picture

Hi

I tried the :

Nextcloud | TurnKey GNU/Linux (turnkeylinux.org)

Now I want to know what is the best procedure to update the server itself before updating Nextcloud version from 20.0.2  to 20.0.3.

Should I log in as root and use:

apt update && apt full-upgrade

or is there a better way to do the update with built-in Webmin?

 

Pls advice!

THX

 

Forum: 
Jeremy Davis's picture

Nextcloud is installed from upstream (i.e. direct from Nextcloud - not a Debian package) so you can't use apt to upgrade it. There isn't any functionality within Webmin either, so you can't use that.

However, if you follow the instructions as noted in the Nextcloud upgrade docs then that should work! :)

A couple of notes though. If you are using v16.1, then you can use the 'turnkey-occ <command>' command (rather than using 'sudo -u www-data php occ <command>'. If you'd rather just use the commands exactly as they are in the Nextcloud docs, then install 'sudo', like this:

apt update && apt install -y sudo

I encourage you to be sure you have a backup (of some sort) before you start, just in case something goes wrong. Ideally test that your backup works before you start as well.

If you have any further questions or concerns, please ask. If you hit any hurdles, please share as much info as possible, including sharing any error messages you get.

Jeremy Davis's picture

Hey Marcos. All things considered, I'm personally doing ok, albeit quite busy trying to get v17.0 done. I'm also quite concerned about the well being of our Ukrainian brothers and sisters, but other than that, I'm fine.

TBH, I have never used Nextcloud myself and have no idea what might cause that?! I have (previously) tested an update of our v16.1 appliance and it appeared to work fine.

Did you complete all the steps? As noted at the bottom of that doc page, the final step (DB cleanup & update) will likely take some time. I'm not completely clear how it tells what version it has, but perhaps the webUI and CLI use different version checking methods? Or perhaps one is being cached somehow? Even if you are sure you've run everything, perhaps it's worth re-running the DB steps again, just in case?! And if the weirdness continues, perhaps retry running the update?

Also, not sure if it has any relevance, but restarting Apache might also be worth a try. That may well explain why the webUI reports available updates, but not the CLI (PHP generally requires a webserver restart to reload files & config).

Another thought is perhaps file permissions? TBH, I'm not sure how (or why) that might affect things, but maybe? If you ran any commands within the web root as root, then perhaps the permissions are out of whack? To ensure that it's all owned by Nextcloud:

chown -R www-data:www-data /var/www/nextcloud*

Worst case scenario you could do a manual update. I would expect that to work for sure...

If you continue to keep hitting issues, please share as much info as possible and I'll see if I can reproduce your issue.

Marcos's picture

So i really think that Next Cloud has some issues running on LXCs, maybe it is to much stuff, like the Redis server maria db apache etc etc etc and it gets slow and dum LOL. Just kidding, but any ways. Im gonna tell you what is going on here.

I Managed to update NextCloud to V22.2.5 so is a Febreuary version pretty recent.

Problem one: The update had to be ran 3 time, from 20.0.1 to 20.0.9 than to 21.1.1 and than to 22.2.5

The Update procedure as you mentioned has partially be done with the command that you shown us. turnkey-occ <command>

STEPS FOR DOCUMENTATION

  1. Access the GUI > Settings > CHeck for Update
  2. Click on UPDATE (Download and Initialization screen will be shown)
  3. Update Download may fail, do not quit, please tryit again (maybe several times) to the LXC downloads and check hash
  4. When prompted to proceed Update Proceed the UPDATE (check services trought top or whatever tool possible to see that the machine will be on solid fire)
  5. Update will fail again. BUT now you go to CLI and run  $ turnkey-occ upgrade
  6. Update will probably fail again but now you have to run $turnkey-occ db:add-missing-indices
  7. Update will be successful but interface and GUI not accessible, go to /var/www/nextcloud/config/config.php and change the line: maintenante => 'true', to FALSE
  8. Than you have updated the NEXCLOUD server to the next updatable version. You should repeat the steps to update it to the latest version, in my case it took me 3 times repeating this steps.

Unfortunetly BCMATH is not recognized in LXC NEXCLOUD altouhgt 4 or 5 versions of the PHP Library come installed, 7.2 .3 and .4 and a general one that is globally installed. This is something to be "fixed" altought itdoesnt affect the ussage or performance of the nextcloud appication.

Anyways just leaving here my experience so you can have it documented.

Bye

Jeremy Davis's picture

That does sound a bit convoluted and PITA, although it does note in the Nextcloud docs, that you may need to update to individual specific versions (i.e. you can't always update directly to the latest).

In a perfect world, we'd provide update images more often and/or some (optional) firstboot update script (i.e. not just apt packages). Unfortunately, I'm still bogged down with the v17.x release, so working on a project like that won't happen anytime soon.

Re BCMATH, for v16.x, the default (Debian) package you need installed is php7.3-bcmath. If you are running an alternate PHP version, then you'll need to install the specific PHP version package and restart Apache.

Add new comment