How to upgrade to the current stable major version?

I can’t help but upgrading Nextcloud is a sure source of frustration every single time. Each upgrade makes me think about looking for alternatives but then I can’t find the time for that.

This time I have installed 21.0.3 and the web settings page tells me that I could have 21.0.7. The Nextcloud website, however, mentions the version 22.2.3 as the latest stable version. Why won’t this work for once?

So I googled the upgrade instructions for the CLI upgrade (hadn’t seen them on the website and googling is usually faster than figuring out how to navigate websites like this). The web based upgrade won’t work because Nextcloud’s server requirements are so strange (and unsafe) that I always need to remove some lines from the .htaccess files to make it work at all. Losing access to the web interface halfway through the upgrade process certainly wouldn’t lead to a successful result. So the CLI way is the only way that works for me.

I ran the command php ./occ upgrade and it plain said “Nextcloud is already latest version”, nothing more. I guess the green colour of the text should tell me that everything is good, but it’s not. No minor upgrade, no major upgrade, just a complete failure. Am I stuck to this (old?) version now and should I probably never care about upgrades again? (Like it won’t improve much anyway.)

Please advise.

Nextcloud version (eg, 20.0.5): 21.0.3
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.something (not relevant)
PHP version (eg, 7.4): 7.4 (but 8.0 is available, too, as php8.0 command and via web server config)

The issue you are facing:
See above

Is this the first time you’ve seen this error? (Y/N): I have the strange feeling that it’s not. But it’s been a while since the last upgrade.

Steps to replicate it:

  1. Try to upgrade
  2. Do a web search and figure out you’re the only one having this problem or even trying to do this
  3. Try to shake off the constant frustration
  4. Ask for help, again

The output of your Nextcloud log in Admin > Logging:

What is that? Can't find it.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

Please tell me if you need that and I should do the work to prepare it.
I believe it's not useful here.

The output of your Apache/nginx/system log in /var/log/____:

Does not apply.

The latest major release is NC 22. NC 21 is still supported an gets updates. Normally you just update within your NC 21 branch and once you are on the latest version, you are offered an upgrade to NC 22. The updates within your branch contain security fixes that should be installed quickly. For the major upgrade to NC 22, it’s better to take some time, check if all the apps are available on the new version, if you need the new features and if they require more dependencies.

yes, unfortunately that is just applying an update. If you want to use the updater:

sudo -u www-data php updater/updater.phar

The documentation contains this part as well:

(documentation is as well opens source, you can submit bug reports and even propose your own changes via pull requests, on the top left there is a link to edit the current documentation page in github)

Thank you, that worked.

Great, so next time I’ll not only have to find the documentation backwards, I’ll also have to read it backwards, literally, maybe then it’ll work. The first command for a CLI-based upgrade is what I mentioned above. What you showed comes later on that page. I’m wondering why the text uses such an unintuitive order.

Sorry, I probably won’t contribute to the documentation or Nextcloud in some way. I’m only using it because there are no acceptable alternatives and I don’t have the time yet to roll my own calender (don’t need anything else from it). I’m not a convinced Nextcloud user, I’m somewhat forced to it. This is to help me organise my full days, I currently cannot accept more work.

I wrote an issue. Perhaps someone changes the order.

1 Like