Upgrade ownCloud From Packages

Upgrade Steps

The alternative to a manual upgrade is add the ownCloud package repository to your system’s installation sources. Then stay current by using your Linux package manager to install fresh ownCloud packages. However, you should exclude the ownCloud package during system upgrades. For more information, check out the section on Linux Package Manager Installation

This approach should not be used unattended nor in clustered setups.

In general, we discourage upgrades with a Linux package manager because you might encounter unwanted side effects and you’ll have to manage the PHP installation separately. For further information on upgrading PHP, see section Prepare Your Server

If you want to proceed anyway, read the release notes for important information first.

Before installing upgraded packages, perform the following steps:

Now you can upgrade your ownCloud packages, then run
sudo -u www-data ./occ upgrade.

The optional parameter to skip migration tests was removed in ownCloud 10.0. See Testing a Migration for background information.

After the upgrade is finished, perform the following actions:

When upgrading, also check the minimum and maximum supported PHP version of the ownCloud target release. An ownCloud release may require a particular minimum and/or maximum PHP version. Check that the PHP version provided by the Operating System meets the requirements. For details see the Server Release Notes and the System Requirements for the latest Release.

If required, you can skip major releases when upgrading your ownCloud installation. However, we recommend that you first upgrade to the latest point release of your respective minor version, e.g., 10.9.1. See Upgrading Across Skipped Releases for more information.

If you are on ownCloud 8.2.11, 9.0.9, 9.1.X, or 10.X.Y you can go directly to the latest server version.

Here are some examples:

Version Can Upgrade to 10.14.0 ? Requirements (always check the System Requirements too)

10.X.Y

Yes

PHP 7.2 to 7.4

9.1.8

Yes

PHP 7.0

9.1.0

Yes

PHP 7.0

9.0.9

Yes

PHP 7.0

9.0.8

No

PHP 7.0, must upgrade to 9.0.9 first

8.2.11

Yes

PHP 5.6 or 7.0

8.2.10

No

PHP 5.6, must upgrade to 8.2.11 first

7.0.15

No

PHP 5.6, must upgrade to 8.0.16, then to 8.1.12, and then to 8.2.11 first.

7.0.10

No

PHP 5.6, must upgrade to 7.0.15, then to 8.0.16, then to 8.1.12, and then to 8.2.11 first.

When upgrading from oC 9.0 to 9.1 with existing Calendars or Address books please have a look at the release notes for important information about the needed migration steps during that upgrade.

Upgrading Only ownCloud or the Complete System

Upgrading ownCloud from our package repositories works like any normal Linux upgrade. For example, on Debian or Ubuntu Linux the standard system upgrade command is:

sudo apt-get update && apt-get upgrade

Or you can upgrade just ownCloud with this command:

sudo apt-get update && apt-get install owncloud-files

On Fedora, CentOS, and Red Hat Linux use yum to see all available updates:

sudo yum check-update

You can apply all available updates with this command:

sudo yum update

Or update only ownCloud:

sudo yum update owncloud-files

Your Linux package manager only downloads the current ownCloud packages. Then your ownCloud server is immediately put into maintenance mode. You may not see this until you refresh your ownCloud page.

image

Then use occ to complete the upgrade. You must run occ as your HTTP user. This example is for Debian/Ubuntu as well as CentOS/RHEL/Fedora:

sudo -u www-data ./occ upgrade

The optional parameter to skip migration tests during this step was removed in ownCloud 10.0.

Setting Strong Directory Permissions

After upgrading, verify that for your ownCloud the correct permissions are set.

Upgrading Across Skipped Releases

It is best to update your ownCloud installation with every new point release (e.g., 8.1.10) and to never skip any major release (e.g., don’t skip 8.2.x between 8.1.x and 9.0.x). If you have skipped any major release, you should upgrade your ownCloud step by step:

  1. Add the repository of your current version (e.g., 8.1.x)

  2. Upgrade your current version to the latest point release (e.g., 8.1.10) via your package manager

  3. Run the occ upgrade routine

  4. Add the repository of the next major release (e.g., 8.2.x)

  5. Upgrade your current version to the next major release (e.g., 8.2.8) via your package manager

  6. Run the occ upgrade routine

  7. Repeat from step 4 until you reach the last available major release (e.g., 9.1.x)