How to Migrate from OwnCloud to Nextcloud: Step-by-Step Guide

Jay

Desktop Interface
10 min read|25.06.2026

Migrating from ownCloud to Nextcloud allows organizations and self-hosters to continue using their existing files, users, shares, and configurations while moving to a platform with a broader ecosystem and ongoing development. However, a successful migration requires careful planning to avoid compatibility issues, data loss, or service disruptions. 

In this guide, you'll learn how to migrate from ownCloud to Nextcloud step by step, including how to prepare your environment, create backups, complete the migration process, verify the results, and resolve common issues that may arise along the way.

Key Takeaway

Migrating from ownCloud to Nextcloud requires following a supported migration path, as most ownCloud 10.13-10.16 installations must first migrate to Nextcloud 25.0.13 before upgrading to newer releases. A successful migration preserves users, files, shares, and configuration settings by backing up the database and data directory, copying the existing configuration, running the Nextcloud upgrade process, and completing the required database repair commands.

Why Migrate from OwnCloud to Nextcloud?

Many organizations and self-hosters choose to migrate from ownCloud to Nextcloud to take advantage of a broader ecosystem, frequent feature updates, and a wide range of integrations. Nextcloud supports file synchronization and sharing and provides tools for collaboration, communication, office productivity, and workflow automation.

Another reason for migrating is flexibility. Nextcloud offers an open-source platform that can be deployed on private infrastructure, virtual private servers, or dedicated servers, giving administrators greater control over data management and security. For organizations already running ownCloud, migrating to Nextcloud can help extend the value of their existing deployment without requiring users to start from scratch.

At CloudBased Backup, we provide fully managed Nextcloud hosting that includes infrastructure management, backups, security updates, and ongoing maintenance. If you have questions about migrating from ownCloud to Nextcloud or need assistance with your deployment, you can contact our team through the contact page.

Try managed Nextcloud now

What to Check Before Migrating from OwnCloud to Nextcloud

Before starting the ownCloud-to-Nextcloud migration process, take the time to verify your environment and identify any potential compatibility issues. Addressing these items beforehand can help prevent migration failures, application conflicts, and unexpected downtime.

  • Current ownCloud version: Verify the version you are running and review the supported migration path. Some older ownCloud releases may require an intermediate Nextcloud upgrade before moving to the latest version.
  • PHP compatibility: Confirm that Nextcloud supports your PHP version release you plan to install. Using an unsupported PHP version can cause upgrade errors or application failures.
  • Database compatibility: Review your database version and ensure it meets Nextcloud's requirements. This is particularly important if you are using older MySQL, MariaDB, PostgreSQL, or SQLite deployments.
  • Installed apps and extensions: Check all enabled ownCloud apps and determine whether equivalent Nextcloud apps are available. Some extensions may not be compatible after migration.
  • Available storage space: Ensure there is sufficient disk space to store backups, temporary files, and upgrade data during the migration process.
  • Maintenance window: Schedule downtime and notify users in advance. Performing the migration during a maintenance window helps avoid file changes and synchronization conflicts while the upgrade is in progress.

Migrating from ownCloud to Nextcloud

Migrating from ownCloud to Nextcloud

Once you have verified compatibility requirements and created backups, you can begin the migration process. Migrating from ownCloud to Nextcloud is handled much like a manual upgrade, but the version path is very important.

According to the official Nextcloud documentation, ownCloud migration only works when the ownCloud and Nextcloud versions are sufficiently compatible. For recent ownCloud 10 releases, the officially documented migration target is:

ownCloud version

First Nextcloud version

ownCloud 10.13.x, 10.14.x, 10.15.x, 10.16.x

Nextcloud 25.0.13

Do not migrate directly to the latest Nextcloud release. After migrating to the compatible Nextcloud version, upgrade Nextcloud one major version at a time based on Nextcloud’s Official reference.

Step 1: Confirm Version and Environment Compatibility

Before starting, confirm your current ownCloud version:

sudo -u www-data php occ status

Check that your ownCloud version is supported for migration to Nextcloud.

You should also verify:

  • PHP version
  • Database version
  • Web server configuration
  • Installed ownCloud apps
  • Location of the data/ directory
  • Available disk space
  • Current cron configuration

Important: ownCloud does not support PHP 8.0 or higher. Nextcloud 25 is the last Nextcloud version that supports PHP 7. After migrating to Nextcloud 25, upgrade PHP before continuing to newer Nextcloud versions.

Step 2: Create a Full Backup

Before making any changes, create a fresh backup of:

  • ownCloud database
  • config/config.php
  • data directory
  • custom apps
  • custom themes
  • web server configuration

For example, back up the database:

mysqldump -u root -p owncloud > owncloud-db-backup.sql

Back up the ownCloud installation directory:

cp -a /var/www/owncloud /var/www/owncloud-backup

If your data directory is outside the ownCloud installation directory, back it up separately:

cp -a /path/to/owncloud-data /path/to/owncloud-data-backup

Do not continue until you have confirmed that the backup can be restored if needed.

Step 3: Disable Third-Party Apps Where Possible

Before migrating, disable any non-core third-party ownCloud apps where possible. This reduces the risk of app compatibility issues during the upgrade.

List installed apps:

sudo -u www-data php occ app:list

Disable third-party apps as needed:

sudo -u www-data php occ app:disable app_name

Replace app_name with the actual app ID.

Some ownCloud Marketplace apps may not be compatible with Nextcloud and may need to be reinstalled later from the Nextcloud App Store.

Step 4: Enable Maintenance Mode

Place the ownCloud instance into maintenance mode to prevent users from uploading files or modifying data during the migration.

Run this from the ownCloud installation directory:

cd /var/www/owncloud

sudo -u www-data php occ maintenance:mode --on

If your web server uses a different user account, replace www-data with the correct user.

Step 5: Stop the Web Server and Disable Cron

Stop the web server before replacing application files.

For Apache:

sudo systemctl stop apache2

For Nginx:

sudo systemctl stop nginx

If ownCloud uses system cron, disable it temporarily:

sudo crontab -u www-data -e

Comment out the ownCloud cron entry by adding # at the beginning of the line.

Example:

# */5 * * * * php -f /var/www/owncloud/cron.php

Step 6: Download the Compatible Nextcloud Release

Do not use latest.zip.

Download the compatible Nextcloud version from the official Nextcloud releases page. For ownCloud 10.13.x through 10.16.x, use Nextcloud 25.0.13.

cd /tmp

wget https://download.nextcloud.com/server/releases/nextcloud-25.0.13.zip

unzip nextcloud-25.0.13.zip 

Official release archive: https://nextcloud.com/changelog/

Step 7: Replace the ownCloud Application Files

Rename the existing ownCloud installation directory so it can be restored if needed:

mv /var/www/owncloud /var/www/owncloud-old

Move the extracted Nextcloud files into the web server directory:

mv /tmp/nextcloud /var/www/owncloud

This keeps the original web path the same. If your site is configured to use /var/www/nextcloud instead, adjust the path accordingly.

Do not delete /var/www/owncloud-old until the migration has been fully tested.

Step 8: Copy the Existing Configuration File

Copy the old ownCloud configuration file into the new Nextcloud installation:

cp /var/www/owncloud-old/config/config.php /var/www/owncloud/config/

This preserves your database connection, trusted domains, data directory path, installed instance ID, and other important settings.

Step 9: Move or Preserve the Data Directory

If your data/ directory is stored inside the ownCloud installation directory, move it into the new Nextcloud directory:

mv /var/www/owncloud-old/data /var/www/owncloud/

If your data directory is stored outside the ownCloud installation directory, do not move it. Instead, confirm that the datadirectory value in config.php still points to the correct path.

Check:

grep datadirectory /var/www/owncloud/config/config.php

Example:

php

'datadirectory' => '/mnt/storage/owncloud-data',

Step 10: Preserve Custom Apps and Themes if Needed

If you used custom apps, external app folders, or themes, compare the old and new folders.

Check old apps:

ls /var/www/owncloud-old/apps

Check new apps:

ls /var/www/owncloud/apps

If needed, copy compatible custom apps:

cp -a /var/www/owncloud-old/apps/custom_app /var/www/owncloud/apps/

If you used custom themes, copy them as well:

cp -a /var/www/owncloud-old/themes/custom_theme /var/www/owncloud/themes/

Only copy apps and themes that are compatible with the target Nextcloud version.

Step 11: Set Correct Ownership and Permissions

Set ownership for the Nextcloud files:

sudo chown -R www-data:www-data /var/www/owncloud

Set directory and file permissions:

sudo find /var/www/owncloud/ -type d -exec chmod 750 {} \;

sudo find /var/www/owncloud/ -type f -exec chmod 640 {} \; 

If your web server uses a different user account, replace www-data with the correct user.

Step 12: Restart the Web Server

Restart the web server before running the upgrade command.

For Apache:

sudo systemctl start apache2

For Nginx:

sudo systemctl start nginx

Step 13: Run the Nextcloud Upgrade Command

Navigate to the new Nextcloud installation directory:

cd /var/www/owncloud

Run the upgrade command:

sudo -E -u www-data php occ upgrade

The upgrade process may take several minutes or longer, depending on the size of the database and file system.

Review the output carefully for errors or warnings.

Step 14: Run Required Database Maintenance Commands

When migrating to Nextcloud 20 or later, the official Nextcloud documentation says to run these commands after occ upgrade:

sudo -E -u www-data php occ db:convert-filecache-bigint

sudo -E -u www-data php occ db:add-missing-columns

sudo -E -u www-data php occ db:add-missing-indices

sudo -E -u www-data php occ db:add-missing-primary-keys 

These commands update database columns, indexes, and primary keys that may be required after migration.

If prompted for confirmation during the bigint conversion, review the message carefully and proceed during a suitable maintenance window.

Step 15: Run Maintenance Repair

Run the maintenance repair command:

sudo -E -u www-data php occ maintenance:repair

If Nextcloud recommends additional commands in the admin overview or in the command output, run them before returning the system to production.

Step 16: Disable Maintenance Mode

Once the upgrade and repair tasks are complete, disable maintenance mode:

sudo -E -u www-data php occ maintenance:mode --off

Step 17: Re-enable Cron

Re-enable the cron job you disabled earlier:

sudo crontab -u www-data -e

Remove the # from the cron entry.

For Nextcloud, the cron entry usually looks like this:

*/5 * * * * php -f /var/www/owncloud/cron.php

If your cron previously used occ system:cron, update it to use the PHP cron command according to the official Nextcloud background jobs documentation.

Step 18: Verify the Migration

Log in as an administrator and verify:

  • Users are present
  • Files are accessible
  • Shares are intact
  • Groups are intact
  • External storage still works
  • LDAP or SSO still works, if used
  • Apps are compatible
  • Background jobs are running
  • Email settings still work
  • File locking works
  • No major errors appear in logs

Check the Nextcloud version:

sudo -E -u www-data php occ status

Check system warnings in:

Settings → Administration → Overview

Also check logs:

tail -f /var/www/owncloud/data/nextcloud.log

Step 19: Reinstall or Enable Compatible Apps

Some ownCloud apps may be disabled because they are incompatible with Nextcloud.

Install or enable the Nextcloud versions of required apps from the Nextcloud App Store.

For example:

sudo -E -u www-data php occ app:enable calendarsudo -E -u www-data php occ app:enable contacts

Only enable apps that are compatible with your current Nextcloud version.

Step 20: Upgrade PHP and Continue Updating Nextcloud

After successfully migrating to Nextcloud 25.0.13, upgrade PHP to a version supported by your next target Nextcloud release.

Then upgrade Nextcloud one major version at a time.

Do not skip major versions.

Example path:

Nextcloud 25 → 26 → 27 → 28 → 29 → 30 → 31 → later supported versions

Before each major upgrade:

  • review release notes
  • confirm PHP compatibility
  • confirm database compatibility
  • update apps
  • create a fresh backup
  • run the upgrade
  • check admin overview warnings

Common OwnCloud to Nextcloud Migration Issues and Fixes

Even when following the recommended migration process, you may encounter compatibility, configuration, or upgrade-related issues. Here are some of the most common problems and how to resolve them.

  • Unsupported Upgrade Path Errors: Attempting to migrate directly to the latest Nextcloud release may cause the upgrade to fail. Follow the supported migration path and upgrade through the required Nextcloud versions one major release at a time.
  • PHP Compatibility Problems: Migration and upgrade issues can occur if your PHP version does not meet the requirements of the target Nextcloud release. Verify PHP compatibility before each upgrade, and update PHP as needed.
  • App Compatibility Issues: Some ownCloud Marketplace apps are not compatible with Nextcloud. Disable third-party apps before migrating and install compatible alternatives from the Nextcloud App Store after the migration.
  • File Permission Errors: Incorrect ownership or permissions can prevent Nextcloud from accessing files, running upgrades, or executing background jobs. Verify that the web server user owns the Nextcloud installation and data directories.
  • Maintenance Mode Stuck After Migration: If the upgrade process is interrupted or encounters an error, Nextcloud may remain in maintenance mode. Review the logs, resolve the underlying issue, and disable maintenance mode after confirming the system is healthy.
  • Cron Jobs Not Running: Background tasks such as file scanning, notifications, and cleanup jobs may stop working if cron jobs are not re-enabled after migration. Verify that the scheduled cron task is configured correctly and running as expected.
  • Missing Files or External Storage Issues: Files may appear missing if the data directory path is incorrect or external storage connections were not migrated properly. Review your config.php settings and test all external storage mounts after the migration.

Conclusion

Migrating from ownCloud to Nextcloud can be completed without losing users, files, shares, or configuration data when the correct migration path is followed. The most important steps are verifying version compatibility, creating complete backups, and carefully validating the environment after the migration.

Because most ownCloud installations cannot migrate directly to the latest Nextcloud release, be sure to follow the recommended upgrade path and upgrade through supported major versions one step at a time. With proper planning and testing, you can transition to Nextcloud while maintaining system stability and minimizing downtime for users.

Secure and privacy-first managed Nextcloud hosted in Germany.

Our Blog

Cloud Insights: Trends, Tips & Technologies

Nextcloud Backup Best Practices: How to Protect Your Data
6 min read|03.07.2026

Nextcloud Backup Best Practices: How to Protect Your Data

A Nextcloud server often stores valuable files, photos, documents, and collaborative data, making it essential to have a reliable backup strategy. Hardware failures, accidental deletions, ransomware, failed updates, or configuration errors can all lead to data loss, and without a proper backup, recovery may be impossible. Following proven Nextcloud backup best practices helps ensure you can restore your server quickly and minimize downtime when problems occur.  In this article, we'll discuss wh

How to Set Up External Storage in Nextcloud
5 min read|03.07.2026

How to Set Up External Storage in Nextcloud

As storage needs grow, keeping files across multiple devices, network shares, or cloud services can make them harder to manage and access from a single location. Migrating everything to a single storage system isn't always practical, especially if you already rely on existing infrastructure.  Nextcloud addresses this by allowing you to connect supported external storage directly to your instance, giving users centralized access without having to relocate their files.  In this article, you'll l

What Is Nextcloud AI Assistant? A Complete Guide for Businesses
4 min read|02.07.2026

What Is Nextcloud AI Assistant? A Complete Guide for Businesses

Artificial intelligence has quickly become part of everyday business work, but many organizations still hesitate to use it due to concerns about privacy, compliance, and control over company data. Nextcloud AI Assistant really takes a different approach by bringing AI directly into the Nextcloud workspace while giving organizations the flexibility to choose how and where AI processes their information. In this guide, you will learn what Nextcloud AI Assistant is, how it works, which AI models i

Get in Touch with Our Cloud Experts

Chat with us
Chat

Chat with us

Our friendly team is here to help

Cbb logo
Secure real-time Cloud collaboration from Europe
CloudBased Backup empowers you with Managed Nextcloud, a secure, on-premise collaboration platform offering real-time document editing, seamless video chat, and groupware across mobile, desktop, and web.
Visit us on social media.
Subscribe to our newsletter.
Get exclusive offers and always stay up-to-date.
© 2026 CloudBased Backup. All rights reserved.