# Test our new work-in-progress upgrader script

**URL:** <https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214>\
**Category:** 🎁 Releases\
**Created:** [June 26, 2016, 10:02am UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214 "2016-06-26T10:02:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![LukasReschke](https://help.nextcloud.com/user_avatar/help.nextcloud.com/lukasreschke/32/1929_2.png) [@LukasReschke](https://help.nextcloud.com/u/LukasReschke)\
**Post date:** [June 26, 2016, 10:02am UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/1 "2016-06-26T10:02:46Z")

</div>

**Update:** We now ship this in 9.0.54 and 10.0.1 - see [Test our new work-in-progress upgrader script](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/151?u=morrisjobke) - Thanks for testing!

* * *

Hi there!

@MorrisJobke and me spend some time to work together on a revamped web updater, the reasoning behind this and what technically happens in the background can be read at [https://github.com/nextcloud/updater/issues/2](https://github.com/nextcloud/updater/issues/2)

In a nutshell: Instead of relying on the old ownCloud updater that does stuff like `shell_exec` (which often is blocked at shared hosting providers and so on), this is a simple script that simply does what it should do: Replace all program files.

We’d utmostly appreciate any testing from _YOUR_ side. It would be great to know whether we missed some test cases.

To test this upload the file from [https://raw.githubusercontent.com/nextcloud/updater/add-simplified-updater/index.php](https://raw.githubusercontent.com/nextcloud/updater/add-simplified-updater/index.php) to `/updater/index.php` in your ownCloud or Nextcloud. And add the following to your config file (remove this value later after testing again!):

```auto
'updater.server.url' => 'https://updates.nextcloud.org/updater_server/',

```

Then switch in your admin screen to another channel and back to “stable”. You should also get a message displayed that a newer version is available. (if a warning is displayed that shell\_exec is required, take a look at [Test our new work-in-progress upgrader script](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/18))

The following behaviour would be expected:

1. If you are on 9.0.50 it should update you to 9.0.51 if you go to /updater/
2. If you are on ownCloud 9.x or 8.2 it should update you to Nextcloud 9.0.51

You can either access the updater directly at `/updater/` (e.g. `https://example.com/updater/`) or change the channel in your admin screen to “daily”. Reload the page and then press the “Open updater” link.

Any feedback would be welcome! Something broke? Let us know. It worked fine? Let us know as well. 🚀

* * *

**Attention:** While we have tested the script quite a lot, we’d encourage you to make a backup of your instance before trying it out.

---

<div class="post-metadata">

**Author:** ![LukasReschke](https://help.nextcloud.com/user_avatar/help.nextcloud.com/lukasreschke/32/1929_2.png) [@LukasReschke](https://help.nextcloud.com/u/LukasReschke)\
**Post date:** [June 26, 2016, 10:23am UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/2 "2016-06-26T10:23:57Z")

</div>

Pinned the topic until Wednesday to get more awareness and attention on this one.

---

<div class="post-metadata">

**Author:** ![AlfredSK](https://help.nextcloud.com/user_avatar/help.nextcloud.com/alfredsk/32/447_2.png) [@AlfredSK](https://help.nextcloud.com/u/AlfredSK)\
**Post date:** [June 26, 2016, 12:14pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/3 "2016-06-26T12:14:07Z")

</div>

Well, I replaced the index.php file and restarted Apache. I switched to daily channel but **there is no link to the updater**. I have to admit that I’m on **9.0.51** already.

But if I go to …/updater/ manually I get an authentication error:

> To login you need to provide the unhashed value of “updater.secret” in your config file.  
> If you don’t know that value, you can access this updater directly via the Nextcloud admin screen or generate your own secret:  
> \<_some code to generate a password followed by a login field and button_\>

Is this intended or an error?

---

<div class="post-metadata">

**Author:** ![LukasReschke](https://help.nextcloud.com/user_avatar/help.nextcloud.com/lukasreschke/32/1929_2.png) [@LukasReschke](https://help.nextcloud.com/u/LukasReschke)\
**Post date:** [June 26, 2016, 12:18pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/4 "2016-06-26T12:18:04Z")

</div>

> [@AlfredSK](#):
>
> Well, I replaced the index.php file and restarted Apache. I switched to daily channel but there is no link to the updater. I have to admit that I’m on 9.0.51 already.

That one won’t do anything then. Only 9.0.50 or older gets a message at the moment, we’re working on adding daily support. Will let you know once that is there, possibly even today.

> But if I go to …/updater/ manually I get an authentication error:

That is intended, basically you need to create a password manually if you access it directly. If you press the button in the admin settings (which atm you won’t see since for you no update is available) you will be logged-in manually.

---

<div class="post-metadata">

**Author:** ![Bugsbane](https://help.nextcloud.com/user_avatar/help.nextcloud.com/bugsbane/32/172_2.png) [@Bugsbane](https://help.nextcloud.com/u/Bugsbane)\
**Post date:** [June 26, 2016, 12:22pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/5 "2016-06-26T12:22:35Z")

</div>

Should we still be disabling all third party apps before updating this way, or is it better for testing if we don’t?

---

<div class="post-metadata">

**Author:** ![LukasReschke](https://help.nextcloud.com/user_avatar/help.nextcloud.com/lukasreschke/32/1929_2.png) [@LukasReschke](https://help.nextcloud.com/u/LukasReschke)\
**Post date:** [June 26, 2016, 12:35pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/6 "2016-06-26T12:35:38Z")

</div>

> [@Bugsbane](#):
>
> Should we still be disabling all third party apps before updating this way, or is it better for testing if we don’t?

Please leave everything enabled. If it fails, let us know what fails 🙂

---

<div class="post-metadata">

**Author:** ![bertinets](https://help.nextcloud.com/letter_avatar/bertinets/32/6_22734026db12803ebb3e059622ac3534.png) [@bertinets](https://help.nextcloud.com/u/bertinets)\
**Post date:** [June 26, 2016, 2:16pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/7 "2016-06-26T14:16:08Z")

</div>

It worked fine for me going from 9.0.50 to 9.0.51 (Freebsd 9, Apache24, mysql56) leaving everything enabled.  
The only thing I find weird is that it asks for the upper dir level of the nextcloud root dir to be writable by the Apache demon. In other words, in my case, I have nextcould installed in path-to-www/nextcloud/… and the updater asks path-to-www to be writable by Apache. Is that the expected behaviour?  
Anyway great job!!!

---

<div class="post-metadata">

**Author:** ![Ben](https://help.nextcloud.com/letter_avatar/ben/32/6_22734026db12803ebb3e059622ac3534.png) [@Ben](https://help.nextcloud.com/u/Ben)\
**Post date:** [June 26, 2016, 2:54pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/8 "2016-06-26T14:54:45Z")

</div>

mh I don’t know whether this is a good idea but is it possible to copy all old files to a backup directory so you can rollback the update if something went wrong?

---

<div class="post-metadata">

**Author:** ![LukasReschke](https://help.nextcloud.com/user_avatar/help.nextcloud.com/lukasreschke/32/1929_2.png) [@LukasReschke](https://help.nextcloud.com/u/LukasReschke)\
**Post date:** [June 26, 2016, 3:00pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/9 "2016-06-26T15:00:18Z")

</div>

> [@Ben](#):
>
> mh I don’t know whether this is a good idea but is it possible to copy all old files to a backup directory so you can rollback the update if something went wrong?

We are actually doing that, the rollback is not yet implemented though. Basically if a step =\> 7 fails we should rollback. (ref [Rollback update after unsuccessful attempt after step 7 · Issue #9 · nextcloud/updater · GitHub](https://github.com/nextcloud/updater/issues/9))

Note however that the backup will _NOT_ include any user data or the database. This would simply be too much. But if a copy step fails it should gracefully fallback.

---

<div class="post-metadata">

**Author:** ![ANT\_Cloud](https://help.nextcloud.com/letter_avatar/ant_cloud/32/6_22734026db12803ebb3e059622ac3534.png) [@ANT\_Cloud](https://help.nextcloud.com/u/ANT_Cloud)\
**Post date:** [June 26, 2016, 3:21pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/10 "2016-06-26T15:21:14Z")

</div>

Hey I did a Fresh install on 9.0.50 and uploaded the index.php to the folder.  
If i go into the Update section on the Admin panel there is no update for me, does not matter which Chanel check into. If I go to the updater URL it gives me the following:

![](http://i.imgur.com/j88gSci.png)

---

<div class="post-metadata">

**Author:** ![Ben](https://help.nextcloud.com/letter_avatar/ben/32/6_22734026db12803ebb3e059622ac3534.png) [@Ben](https://help.nextcloud.com/u/Ben)\
**Post date:** [June 26, 2016, 3:25pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/12 "2016-06-26T15:25:22Z")

</div>

Really 9.0.50 or maybe 9.0.51? Normally a fresh install is with the latest version 😛

---

<div class="post-metadata">

**Author:** ![ANT\_Cloud](https://help.nextcloud.com/letter_avatar/ant_cloud/32/6_22734026db12803ebb3e059622ac3534.png) [@ANT\_Cloud](https://help.nextcloud.com/u/ANT_Cloud)\
**Post date:** [June 26, 2016, 3:26pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/13 "2016-06-26T15:26:01Z")

</div>

Should have said. “A fresh install a few days ago, before 9.0.51 was released” 🙂

---

<div class="post-metadata">

**Author:** ![LukasReschke](https://help.nextcloud.com/user_avatar/help.nextcloud.com/lukasreschke/32/1929_2.png) [@LukasReschke](https://help.nextcloud.com/u/LukasReschke)\
**Post date:** [June 26, 2016, 3:27pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/14 "2016-06-26T15:27:44Z")

</div>

> [@ANT\_Cloud](#):
>
> Hey I did a Fresh install on 9.0.50 and uploaded the index.php to the folder.If i go into the Update section on the Admin panel there is no update for me, doe not matter which chanelI check into. If I go to the updater URL it gives me the following:

Could also be caused by some caching as we don’t have enabled the updates officially yet for obvious reasons. You can get around this by adding this to your config file:

```auto
'updater.server.url' => 'https://updates.nextcloud.org/updater_server/',

```

However, there is some more caching in place. So you need to manually change the channels in your admin screen as well then. I’d suggest to switch from stable to beta and back to stable. 🙂

Let me know if that didn’t work! 🙂

---

<div class="post-metadata">

**Author:** ![LukasReschke](https://help.nextcloud.com/user_avatar/help.nextcloud.com/lukasreschke/32/1929_2.png) [@LukasReschke](https://help.nextcloud.com/u/LukasReschke)\
**Post date:** [June 26, 2016, 3:32pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/15 "2016-06-26T15:32:13Z")

</div>

> [@LukasReschke](#):
>
> That one won’t do anything then. Only 9.0.50 or older gets a message at the moment, we’re working on adding daily support. Will let you know once that is there, possibly even today.

@AlfredSK We just added support for different release channels, it requires a little bit more work right now to test since you are on a Nextcloud version that doesn’t do the automatic migration of the channel the config file. But it shouldn’t be hard 😉

Add the following to your config file:

```auto
'updater.release.channel' => 'daily',

```

And download the newest version of the updater script from [https://raw.githubusercontent.com/nextcloud/updater/add-simplified-updater/index.php](https://raw.githubusercontent.com/nextcloud/updater/add-simplified-updater/index.php)

---

<div class="post-metadata">

**Author:** ![ANT\_Cloud](https://help.nextcloud.com/letter_avatar/ant_cloud/32/6_22734026db12803ebb3e059622ac3534.png) [@ANT\_Cloud](https://help.nextcloud.com/u/ANT_Cloud)\
**Post date:** [June 26, 2016, 3:33pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/16 "2016-06-26T15:33:22Z")

</div>

This seem to do the trick… however shell\_exec is not available for me, does this mean I need to manually do it, or are you working on this too ?

![](http://i.imgur.com/3GRFuep.png)

---

<div class="post-metadata">

**Author:** ![Ben](https://help.nextcloud.com/letter_avatar/ben/32/6_22734026db12803ebb3e059622ac3534.png) [@Ben](https://help.nextcloud.com/u/Ben)\
**Post date:** [June 26, 2016, 3:35pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/17 "2016-06-26T15:35:40Z")

</div>

As I understand there is no shell\_exec anymore. It’s just copying files to the Application Directory

---

<div class="post-metadata">

**Author:** ![LukasReschke](https://help.nextcloud.com/user_avatar/help.nextcloud.com/lukasreschke/32/1929_2.png) [@LukasReschke](https://help.nextcloud.com/u/LukasReschke)\
**Post date:** [June 26, 2016, 3:36pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/18 "2016-06-26T15:36:56Z")

</div>

> [@ANT\_Cloud](#):
>
> This seem to do the trick… however shell\_exec is not available for me, does this mean I need to manually do it, or are you working on this too ?

Hehe. That’s another one, so Nextcloud 9.0.50 and 9.0.51 ship the broken ownCloud updater. To prevent breaking user data it is deactivated in a lot of cases. (if you would have clicked on the button here like you can in ownCloud your instance would get destroyed!)

I just created a revert PR at [Revert "[stable9] Don't show the updater if updater is incompatible" by LukasReschke · Pull Request #228 · nextcloud/server · GitHub](https://github.com/nextcloud/server/pull/228) for this, for you to test this the easiest way would be to change [server/apps/updatenotification/controller/admincontroller.php at 49a916fb46a2281aed818d20a9487b6af7e2b1dc · nextcloud/server · GitHub](https://github.com/nextcloud/server/blob/49a916fb46a2281aed818d20a9487b6af7e2b1dc/apps/updatenotification/controller/admincontroller.php#L135) into the following:

> ‘updaterRequirementsFulfilled’ =\>true,

The file for this is `apps/updatenotification/controller/admincontroller.php`.

> [@Ben](#):
>
> As I understand there is no shell\_exec anymore.

That’s correct, unfortunately some things like this check we can’t super easily change. Let’s see what we can do about this to make it as easy as possible for users to update 😉

Likely it might be an app that can be installed via appstore that ships the corrected code. Also would allow ownCloud users to easily migrate with one click.

---

<div class="post-metadata">

**Author:** ![ANT\_Cloud](https://help.nextcloud.com/letter_avatar/ant_cloud/32/6_22734026db12803ebb3e059622ac3534.png) [@ANT\_Cloud](https://help.nextcloud.com/u/ANT_Cloud)\
**Post date:** [June 26, 2016, 3:47pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/19 "2016-06-26T15:47:29Z")

</div>

> [@LukasReschke](#):
>
> ‘updaterRequirementsFulfilled’ =\>true,

Ok, done this and I could do the update now

if there weren’t this warning 🙂

[http://imgur.com/a/xdK2f Album click me](http://imgur.com/a/xdK2f)

These folders are put into the root of each domain for web statistics reasons.

---

<div class="post-metadata">

**Author:** ![LukasReschke](https://help.nextcloud.com/user_avatar/help.nextcloud.com/lukasreschke/32/1929_2.png) [@LukasReschke](https://help.nextcloud.com/u/LukasReschke)\
**Post date:** [June 26, 2016, 3:49pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/20 "2016-06-26T15:49:47Z")

</div>

> [@ANT\_Cloud](#):
>
> These folders are put into the root of each domain for web statistics reasons.

Yeah. Sadly there is not much here what we can do about this. Our belief is that we don’t want in any case to operate in a case where we could by incident delete user data. That’s something that happened quite often with other updaters.

So the updater will only run in scenarios where we have a very high level assurance that we won’t overwrite user changes. We do recommend users to install Nextcloud in it’s own directory. If that isn’t possible the only thing we can recommend then is a manual update 😉

---

<div class="post-metadata">

**Author:** ![John](https://help.nextcloud.com/user_avatar/help.nextcloud.com/john/32/255_2.png) [@John](https://help.nextcloud.com/u/John)\
**Post date:** [June 26, 2016, 4:07pm UTC](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214/21 "2016-06-26T16:07:19Z")

</div>

Wonderful work, thanks heaps for all your efforts!

A few glitches I noticed:

- if directory /$NC/data\_old is present, the updater stops telling (only) “data\_old is present” Why is that: apparently no backup of /data/ is done

- After the first half of updating the German version carries a spelling mistake: “Nextcloud wird auf Version 9.0.51 **aktuallisiert** ”

- **Installation is halted on this page as button “Start Update” does not respond to clicks!** :-/

[Next page](https://help.nextcloud.com/t/test-our-new-work-in-progress-upgrader-script/1214.md?page=2)
