HowTo: Ubuntu 14.04 & Owncloud 9.0.1 to 16.04 Nextcloud 11

Since we profit a lot from Nextcloud, I´d like to give some experience back.
Can someone move this topic to the HowTo section please?

Basics …
Current installation: Ubuntu 14.04 and Owncloud 9.0.1
Target: Ubuntu 16.04 and Nextcloud 11

OPTIONAL PART

(but I think, we are not the only ones, using this):
Since a matching package php5-apcu for OC 9.0.1 is not available from the repos for 14.04, it is installed manually and prevents clean updating.

Due to this I will remove the package php5-apcu first:

sudo service apache2 stop
sudo apt-get purge php5-apcu

And delete the MEMCache entry in the config file as well:

/var/www/html/owncloud/config/config.php

REMOVE: '\\OC\\Memcache\\APCu',

sudo service apache2 start

END OF OPTIONAL PART.

Install latest updates:

sudo apt-get update && apt-get upgrade

Update OC to 9.1.4:

Migrate to Nextcloud 10:

  • Enable Maintenance Mode with the command line tool:
    User www-data (in OC directory):
    sudo -u www-data php occ maintenance:mode --on

sudo service apache2 stop

  • Backup existing configuration and database ( config.php and directory data )

  • Delete the ownCloud code and extract the Nextcloud code

  • Copy back the configuration file & data directory

  • Change version in config.php to 9.0.2.2

sudo service apache2 start

  • Start the upgrade process with the command line tool
  • Disable Maintenance Mode

In this state, the installation should work fine, for example logging in, opening files. In my environment we have an AD integration as well which is working.

Update OS:

sudo do-release-upgrade

After Release-Upgrade:

sudo apt-get purge php5-common
sudo apt-get install libapache2-mod-php

In this state, the nextCloud page should show just plain text without pictures or
formatting.

sudo apt-get install php7.0-{mysql,gd,curl,zip,mbstring,ldap}
sudo apt-get install php-mysql

Update Nextcloud from 10 to 11 on the “broken” installation

  • Enable Maintenance Mode with the command line tool:
    User www-data(in OC directory):

sudo -u www-data php occ maintenance:mode --on

sudo service apache2 stop

  • Backup existing configuration and database ( config.php and directory data )

  • Delete the old nextCloud code and extract the Nextcloud code

  • Copy back the configuration file & data directory

sudo service apache2 start

  • Go to OC directory:

sudo -u www-data php occ upgrade
sudo -u www-data php occ maintenance:mode --off

OPTIONAL PART:

Enable Caching again:

sudo apt-get install php-apcu

  • MEMCache Eintrag aus /var/www/html/owncloud/config/config.php hinzufĂĽgen:

'memcache.local' => '\\OC\\Memcache\\APCu',

sudo service apache2 restart

END OF OPTIONAL PART

Nextcloud is running in this configuration for 2 weeks now.

We experienced one small problem:

LDAP authentication is currently not so fast as with the Owncloud installation. If there are updates on this topic, I will insert them here.

For any questions, don´t hesitate to ask.

This isn’t standard though, do you expect other users in your situation (14.04 => 16.04) to need to do this? If not you risk people blindly following your guide and reinstalling APCu for no reason.

Worth knowing we can update directly to 11, no need for 10 in between as far as I know (happy to be corrected).

Formatting

Pop your code snippets between 2 backticks ( ` ) like:

service apache2 stop

And two or more lines of code can be indented with 4 spaces like:

this
and this 

Convert your **'s to 1 * to create bullets:

** from this

  • to this

And that’ll make it super easy to read and follow :slight_smile: Happy to move it when you’ve edited.

did they at ubuntu already fix/worked around the my.cnf parameter issue which was not supported anymore by the newer mysqlversion of 16.04? Or does the user still need to handle that by himself?

I honestly do not know, which parameter you mean.
In and after the upgrade process my.cnf was not edited manually.

Thanks for your guide @joho :slight_smile:

ah ok thanks for the update so that got fixed :slight_smile: