Skip to content

Conversation

@MichaIng
Copy link
Owner

@MichaIng MichaIng commented Jan 1, 2026

Request: #6210

Since ownCloud 10 still does not support PHP 8.x (and does not seem to be developed anymore), it cannot be installed on any supported Debian with DietPi 10. But there is ownCloud Infinite Scale since a few years.

Test installs: https://github.com/MichaIng/DietPi/actions/runs/20659277460

I was actually hoping it would include an embedded migration function to import all data and compatible metadata+settings, but such does not exist. Easiest is probably to sync files back from clients. rclone is an alternative to sync from WebDAV to WebDAV endpoint, but this does not work after upgrade to Debian Bookworm or above where ownCloud 10 cannot run anymore.

However, a migration from ownCloud 10 to Nextcloud is possible, which preserves data, metadata, and settings: https://docs.nextcloud.com/server/latest/admin_manual/maintenance/migrating_owncloud.html
ownCloud and latest Nextcloud cannot run on the same PHP version. But the migration can be done regardless with a backup of the ownCloud instance, like created by dietpi-software uninstall 47. Latest Nextcloud even declares migration support for more recent ownCloud versions, hence this seems to be the preferred way.

Our Bookworm upgrade script and DietPi 10.0 update will inform users about ownCloud Infinite Scale and the alternative Nextcloud migration, which can be done with dietpi-software as detailed below.

Migrating from ownCloud 10 to Nextcloud

The steps adjust the data directory name, webroot and hence URL path from /owncloud to /nextcloud as well, which hence needs to be adjusted in clients to connect to Nextcloud. It would be theoretically possible to keep using all old paths, reducing needed changes, but that could cause confusion later and would break dietpi-software reinstall 114 if needed any time later.

  1. In case, uninstall ownCloud, which will generate a database dump and install dir+config backup within the preserved data directory:

    dietpi-software uninstall 47

    If you used our Debian Bookworm upgrade script recently, this might have happened already. Otherwise, if you are on DietPi 10.x already, dietpi-software cannot be used to uninstall ownCloud anymore. Follow the manual uninstall steps below the "Manual ownCloud uninstall" heading instead.

  2. At best create a backup of /mnt/dietpi_userdata/owncloud_data if you do not already have a recent one:

    cd /mnt/dietpi_userdata
    cp -a owncloud_data /path/to/backup/owncloud_data
  3. Rename the ownCloud data dir to the Nextcloud data dir, and the database dump within. Move (only) the backed up config.php dir to its target location, and remove the install dir backup otherwise:

    cd /mnt/dietpi_userdata
    mv owncloud_data nextcloud_data
    mv nextcloud_data/dietpi-owncloud-database-backup.sql nextcloud_data/dietpi-nextcloud-database-backup.sql
    mkdir -p /var/www/nextcloud/config
    mv nextcloud_data/dietpi-owncloud-installation-backup/config/config.php /var/www/nextcloud/config/
    rm -R nextcloud_data/dietpi-owncloud-installation-backup
  4. Install Nextcloud, which will be the latest v25, the last version which supports PHP 7.4. It will restore the ownCloud database dump, and takes over its data dir and config.php:

    dietpi-software install 114

    The installation implies an ncc upgrade call for the database migration. In case of complex setups, external apps, or future ownCloud updates, there is some chance that one of the steps fails. If so, please report this here, so we can find the needed database adjustments and fix this for all ownCloud users, and in case in Nextcloud's upstream code.

  5. In your clients, adjust the URL path /owncloud to /nextcloud.

Manual ownCloud uninstall (keeping data/config as backup) on DietPi 10.x

If you upgraded to DietPi v10.x already, ownCloud 10 can be uninstalled with the following commands, keeping all data, a database backup, and a backup of the instance files and config inside /mnt/dietpi_userdata/owncloud_data, or the data dir you chose via dietpi.txt:

# Remove cron job and webserver configs
crontab -u www-data -l | grep -v '/var/www/owncloud/.*cron' | crontab -u www-data -
rm -f /etc/apache2/sites-*/dietpi-owncloud.conf
rm -f /etc/apache2/conf-*/dietpi-dav_redirect.conf
rm -f /etc/nginx/sites-dietpi/dietpi-owncloud.conf
rm -f /etc/lighttpd/conf-*/99-dietpi-owncloud.conf
rm -f /etc/lighttpd/conf-*/99-dietpi-dav_redirect.conf
rm -f /etc/php/*/mods-available/dietpi-owncloud.ini

# Create database backup and remove database afterwards
datadir=$(grep -m1 "^[[:blank:]]*'datadirectory'" /var/www/owncloud/config/config.php | mawk '{print $3}' | sed "s/[',]//g")
[[ $datadir ]] || datadir='/mnt/dietpi_userdata/owncloud_data'
dbuser=$(grep -m1 "^[[:blank:]]*'dbuser'" /var/www/owncloud/config/config.php | mawk '{print $3}' | sed 's/,//')
dbhost=$(grep -m1 "^[[:blank:]]*'dbhost'" /var/www/owncloud/config/config.php | mawk '{print $3}' | sed 's/,//')
mysqldump owncloud > "$datadir/dietpi-owncloud-database-backup.sql"
mysqladmin drop owncloud -f
mysql -e "drop user $dbuser@$dbhost;"
mysql -e "drop user $dbuser;" 2> /dev/null

# Backup install dir
mv /var/www/owncloud "$datadir/dietpi-owncloud-installation-backup"

@MichaIng MichaIng added this to the v10.0 milestone Jan 1, 2026
@MichaIng MichaIng force-pushed the ocis branch 11 times, most recently from 2e6a841 to 79ad04c Compare January 5, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants