How to migrate from ownCloud to Nextcloud

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:

  • From ownCloud 9.0 to Nextcloud 9
  • From ownCloud 9.0 to Nextcloud 10
  • From ownCloud 9.1 to Nextcloud 10

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

[user]$ sudo wget
[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.

Install PmWiki on an Ubuntu 14.04 VPS with Nginx
How To Set Up Apache with HTTP/2 Support on Ubuntu 16.04
Install CachetHQ on CentOS 7
  • Yves


    Author Reply

    Instead of “sudo -u www-data php occ upgrade”, I first had to run “sudo -u www-data php occ maintenance:install” and then the upgrade command.
    I also copied my config.php file to my new install.
    For the rest great guide. Thanks a lot.