UNTESTED: Update ownCloud to v8.x upstream

It is no longer recommended that you install ownCloud from their Debian repo. You are best to install direct from ownCloud via their downloaded tarball.

These instructions cover a previous install method, namely the ownCloud upstream Debian repo. If you attempt this, then please post feedback.

[update] I recently found this thread which discusses the upgrade from the Debian package to the upstream version. I found this post particularly enlightening...

Please note that these instructions are UNTESTED!
Use at your own risk!


Unless you need a newer version of ownCloud (TKL v14.0/v14.1 comes with v7.0) it is highly recommended that you leave your ownCloud server as is. The main reason is that the v14.x TurnKey ownCloud appliance is packaged with ownCloud from the official Debian repositories. That means that your server will automatically receive security updates.

So if you change to upstream then:

  • you will no longer receive auto security updates to ownCloud (you will still get other OS security updates)
  • as per above you'll need to manually check for and install ownCloud updates
  • upstream do not provide security patches so you will need to update to whatever the latest version is
  • new upstream packages may not provide a nice upgrade path from your current version to the newest version (as has happened in the past)
  • TKLBAM will no longer work properly OOTB (it will still save your data but restore/migration to a new machine will not work without manual intervention. (This can be resolved using hooks if you so desire). Before you start make sure that you have backed up your data. Ideally, test your backup too! No use having a backup if it doesn't work!

Here we go...

These instructions are for upgrading v7.0 to 8.1 (current upstream stable at the time of writing):

Temporarily add the old v8.0 upstream repo (we'll add the new repo at the same time but leave it disabled):

echo "deb $REPO:/8.0/Debian_8.0/ /" >> /etc/apt/sources.list.d/owncloud-8.0.list
echo "deb $REPO/Debian_8.0/ /" >> /etc/apt/sources.list.d/owncloud.list.disabled
wget -q -O- $REPO/Debian_8.0/Release.key | apt-key add -
apt-get update
apt-get install owncloud

Now you'll need to remove a few left over packages:

apt-get remove owncloud-apps owncloud-client-l10n owncloud-doc libowncloudsync0 owncloud-client-doc owncloud-client-cmd owncloud-client 

Adjust the config (for Apache and ownCloud) and move your data:

sed -i "s|/usr/share|/var/www|" /etc/apache2/sites-available/owncloud.conf
ln -s /etc/owncloud/config.php /var/www/owncloud/config/config.php
sed -i "s|/usr/share|/var/www|" /etc/owncloud/config.php
mv /var/lib/owncloud/data/* /var/www/owncloud/data/
service apache2 restart

Then open your site in the web browser and follow the prompts to update your database.

Then disable the temp v8.0 repo and enable the current repo:

mv /etc/apt/sources.list.d/owncloud-8.0.list /etc/apt/sources.list.d/owncloud-8.0.list.disabled
mv /etc/apt/sources.list.d/owncloud.list.disabled /etc/apt/sources.list.d/owncloud.list

Open your web browser again and do the upgrade. Hopefully that should work...