Get up-to-date with the new Nextcloud updater

As you might know the Nextcloud 9.0.54 and 10.0.1 releases came with a new updater. This new updater allows reliable upgrading to new Nextcloud versions via the web and in the upcoming 11 release even via the command line interface.

However, as they lack the new updater, versions before 9.0.54 currently receive no update notifications. Neither do the have an easy way to update via the built-in updater. As there are still a significant number of users on Nextcloud 9.0.53 and these users are potentially at risk of security breaches and missing stability bugs, we devised an easy way to upgrade to a newer release. Users of 9.0.53 and older will receive a notification pointing to this blog so they can follow the steps and get to a new Nextcloud, easily and safely.

2016-12-08_14-44-22

Seven steps

To upgrade an older Nextcloud system without manually having to extract and replace the files, follow these instructions:

1. Log into your server with SSH or FTP and go to the folder where Nextcloud is installed, for example /srv/www/htdocs/nextcloud
2. Delete the file updater/index.php. The folder updater/ can be found in the subfolder of the folder where you installed your Nextcloud.
3. Create a new file updater/index.php. Copy-paste this content into it and save it.
4. Add the following at the end of your /config/config.php file, right before the line consisting of );:
'updater.server.url' => 'https://updates.nextcloud.com/updater_server/',
5. Log into Nextcloud. In your admin panel go to the updater section and switch to the channel “production” and then to “stable”. This ensures that your update cache is cleaned.
6. Reload the admin page with F5. You should now see an update notification to the Nextcloud 10 release. Scroll down to the “Updater” section and follow the instructions in the updater app.
7. When upgraded, remove the updater.server.url line that you’ve added to /config/config.php

Congratulations! Now you are on an up-to-date version with a properly working updater including update notifications for the admin account.

Those who prefer to do the entire process from the command line can grab this file, put it in the updater subfolder of Nextcloud and run it with php updater.phar
If you run the command but get no output whatsoever, check if you have the php-phar module is installed on your system. You can check by running php -m | grep -i Phar and looking at the output. If you get nothing, phar is not installed. You have to install it, running zypper in php7-phar or the equivalent for your distribution. Once you get notified that there is a new version, follow the instructions to install it.

We apologize for the inconveniences caused by the broken updater and are constantly working on improving the updater experience. And your help is welcome! If you manage to discover a bug in our new updater while upgrading to Nextcloud 11 Release Candidate you can earn a free T-Shirt.

Notable Replies

  1. guddl says:

    One question, why should I remove the line again?!

    Cheers,
    Andreas

  2. Because we may change the update servers in the future and then you're stuck with an old update server. Don't do any changes to config.php that are not really necessary.

  3. guddl says:

    Thanks for the explanation.

  4. dude says:

    ok so I followed the guide but I got stuck on the stage "check permissions"
    that I don't have permission to /updater/index.php

    Parsing response failed. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>403 
    Forbidden</title> </head><body> <h1>Forbidden</h1> <p>You don't have permission to access /updater/index.php on this 
    server.<br /> </p> <hr> <address>Apache/2.4.18 (Ubuntu) Server

    but when I ssh in and go to the nextcloud updater folder and run ls -l I get

    -rwxrwxr-- 1 www-data www-data 57356 Dec 10 21:27 index.php

    I got the file by wgeting it from the url in the post, I'm not sure what is wrong

  5. Made successful Update from 10.0.1 to 10.0.2 without facing issues via the Web-Updater.

    :grinning: nice flow :smiley:

  6. When i do those 7 steps it got stuck on this:

    Initializing
    Current version is 9.0.53.

    It doesnt move further.
    Can anyone help me?

  7. Yep :slight_smile: for the sake of the upgrade you could temporarily change htaccess too, then back once the upgrade finishes.

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

    Then later:

    sudo chown root:www-data /var/www/nextcloud/.htaccess

  8. I got as far as step 5 and when I try to login all I get is a blank white page
    https://pcloscloud.,com
    The service had been working fine till this upgrade. Anyone have any ideas on what might be causing this snafu

    Thanks in advance

  9. The updater worked great for me from version 9.0! Just wanted to post to say thanks.

  10. I'm in the same position. Were you able to resolve this?

Continue the discussion The Nextcloud forums

8 more replies

Participants