I tried it and it seems to work but maybe it’s better to try on a test machine first or wait for the next official Nethserver Nextcloud update.
Create /etc/my.cnf.d/nextcloud.cnf
with following content:
[mysqld]
innodb_large_prefix=true
innodb_file_format=barracuda
innodb_file_per_table=1
Restart mysqld to apply new settings:
systemctl restart mysqld
Change database to utf8:
mysql
ALTER DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;`
exit
Apply changes to Nextcloud:
sudo -u apache /opt/rh/rh-php71/root/usr/bin/php /usr/share/nextcloud/occ config:system:set mysql.utf8mb4 --type boolean --value="true"
Update database:
sudo -u apache /opt/rh/rh-php71/root/usr/bin/php /usr/share/nextcloud/occ maintenance:repair
Be careful as the default backup/restore may not work. You have to care about correct database backup, see NextCloud 15.0.7 update - mysql needs updating as well - Advice please
Source:
https://docs.nextcloud.com/server/14/admin_manual/configuration_database/mysql_4byte_support.html