Why migrateLet's start with the why. First, you don't have to migrate yet. This release as well as at least the upcoming releases of own- and Nextcloud will be compatible so you'll be able to migrate between them in the future. We don't want to break compatibility if we can avoid it!
Of course, right now Nextcloud 9 has some extra features and fixes and future releases will introduce other capabilities. With regards to security, we have Lukas Reschke working for us. However, we promise that for the foreseeable future we will continue to report all security issues we find to upstream in advance of any release we do. That means well ahead of our usual public disclosure policy, so security doesn't have to be a reason for people to move.
Migration overviewIf you've decided to migrate there are a number of steps to go through:
- Make sure you have everything set up properly and do a backup
- Move the old ownCloud install, preserving data and config
- Extract Nextcloud, correct permissions and put back data and config
- Switch data and config
- Trigger the update via command line or the web UI
There are other great resources besides this blog, especially this awesome post on our forums which gives a great and even more detailed overview of a migration with an Ubuntu/NGINX/PHP7/MariaDB setup.
PreparationFirst, let's check if you're set up properly. Make sure:
- You are on ownCloud 8.2.3 or later
- Make sure you have all dependencies
- Your favorite apps are compatible (with ownCloud 9), you can check this by visiting the app store at apps.owncloud.com
- You made a backup
Removing old filesIn this step, we'll move the existing installation preserving the data and configuration.
- Put your server in maintenance mode. Go to the folder ownCloud is installed in and execute
sudo -u www-data php occ maintenance:mode --on(www-data has to be your HTTP user). You can also edit your
config.phpfile and changing
'maintenance' => false, to
'maintenance' => true,.
- Now move the data and config folder out of the way. Best to go to your webserver folder (something like
/var/www/htdocs/and do a
mv owncloud owncloud-backup
Deploying NextcloudNow, we will put Nextcloud in place.
- Grab Nextcloud from our download page or use wget:
- Optional: you can verify if the download went correct using our MD5 code, see this page. Run
md5sum nextcloud-9.0.50.zip. The output has to match this value:
- Now extract Nextcloud:
tar -xvf nextcloud-9.0.50.tar.bz2
- Put the config.php file in the right spot:
cp owncloud-backup/config/config.php nextcloud/config/config.php
- Now change the ownership of the files to that of your webserver, for example
chown wwwrun:www * -Ror
chown www-data *
- If you keep your data/ directory in your
owncloud/directory, copy it to your new
nextcloud/[*]. If you keep it outside of owncloud/ then you don't need to do anything as its location is in config.php.
* Note that if you have been upgrading your server from before ownCloud 6.0 there is a risk that moving the data directory causes issues. It is best to keep the folder with Nextcloud named 'owncloud'. This also avoids having to change all kinds of settings on the server, so it might be a wise choice in any case: rename the nextcloud folder to owncloud.
Now upgrade!Next up is restarting the webserver and upgrading.
- Restart your webserver. How depends on your distribution. For example,
rcapache2 restarton openSUSE,
service restart apache2on Ubuntu.
- You can now trigger the update either via OCC or via web. Command line is the most reliable solution. Run it as
sudo -u apache php occ upgradefrom the nextcloud folder. This has to run as the user of your webserver and thus can also be
- Then, finally, turn of maintenance mode:
sudo -u www-data php occ maintenance:mode --off