What if I want to update to non-beta releases of Nextcloud only, when using updater.phar on the CLI?

Nextcloud version: 23.0.2
Operating system and version: Debian 11.2
nginx version: nginx 1.18.0-6.1
PHP version: 7.4

Is there any sort of “–no-beta” option that updater.phar can utilize? I’d strongly prefer to remain on non-beta, or non-alpha releases.

Or maybe you’d let me specify the exact version of Nextcloud that I’d like to update to?

No such options are listed in the --help message:

sudo -u www-data php /var/www/nextcloud/updater/updater.phar --help                 
Usage:                                                                                                
  update [options]                                                                                    
                                                                                                      
Options:                                                                                              
      --no-backup       Skip backup of current Nextcloud version
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

BTW: My “channel” is currently shown as “stable” in the web interface’s Settings → Administration → Overview → Version-> Update Channel, as was the default. Is that all that matters here, and updater.phar magically respects that, never updating to a Beta version?

Considering that my “channel” is currently shown as “stable” in the web interface’s Settings → Administration → Overview → Version-> Update Channel

…I’m curious if I would just get a straightforward update from 23.0.2 to 23.0.3 (and not get any update to a Beta version), if I ran:

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

…as above.

AFAIK this is not needed. If 'updater.release.channel' => 'stable', is set in the config.php, it should only pull stable releases, regardless of whether you upgrade from the webUI or from the command line.

1 Like

I just looked in my existing config.php. This updater.release.channel variable wasn’t set whatsoever. I wondered, should I hand-edit config.php, adding it as you say (setting it to stable)?

After a recursive grep for updater.release.channel anywhere in my nextcloud files, it does get mentioned as usable in config/config.sample.php

/**
 * The channel that Nextcloud should use to look for updates
 *
 * Supported values:
 *   - ``daily``
 *   - ``beta``
 *   - ``stable``
 */
'updater.release.channel' => 'stable',

You could add it manually, but I think it defaults to stable anyways and therfore you don’t have to. On my instance it got added automatically, because I switched from “stable” to “beta” and back to “stable” again in the past via the webUI.

1 Like

Much appreciated for this explanation! :grinning: