How to migrate from ownCloud to Nextcloud

Nextcloud is a fork of ownCloud which is quickly gaining in popularity and many ownCloud users are migrating from ownCloud to Nextcloud. The migration process is quick and quite simple. In one of our previous articles we wrote about how to Install Nextcloud on an Ubuntu 16.04 VPS and today we will show you how to migrate from ownCloud to Nextcloud. The transfer from ownCloud to Nextcloud should be seamless, as the user interface and features of both apps are quite similar.

At the time of writing, the following migration paths are possible:

We will assume that ownCloud is installed in the /var/www/oc directory and that the web server runs as www-data user. You can change the commands below according to your server’s setup.

Backup the old ownCloud installation

First, let’s make a copy/backup of the ownCloud directory. It’s always smart to do a backup before doing anything that alters your configuration and data.

[user]$ sudo mv /var/www/oc /var/www/oc-backup

Download and extract the latest Nextcloud archive

We will download and extract the latest Nextcloud release from https://nextcloud.com/install/#instructions-server

[user]$ sudo wget https://download.nextcloud.com/server/releases/nextcloud-10.0.0.tar.bz2
[user]$ sudo tar -xjf nextcloud-10.0.0.tar.bz2

At the time of writing this tutorial, the latest version of Nextcloud is 10.0.0, but you can update the commands above according to the current Nextcloud version.

Move the Nextcloud files and set the correct permissions and ownership

Next, we need to move all Nextcloud files and directories to the /var/www/oc directory

[user]$ sudo mv nextcloud /var/www/oc

and set the correct permissions and ownership of the files and directories

[user]$ sudo chown www-data: -R /var/www/oc
[user]$ sudo find /var/www/oc -type d -exec chmod 755 {} \;
[user]$ sudo find /var/www/oc -type f -exec chmod 644 {} \;
[user]$ sudo chmod +x /var/www/oc/occ


Finally we can trigger the update either via web or via OCC. In this example we’ll use the command line and occ upgrade which is a more reliable method:

[user]$ sudo cd /var/www/oc
[user]$ sudo -u www-data php occ upgrade

That’s it. The migration process from ownCloud to Nextcloud is done. The migration steps may be different for you based on your server environment. If you encounter any problems feel free to comment below.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to do the ownCloud/Nextcloud migration for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons below or simply leave a reply in the comments. Thanks.

Categories: Tutorials