There’s a french tutorial about it
https://yunohost.org/#/app_nextcloud
Basically translation
Nextcloud data are stored by default in /home/yunohost.app/nextcloud/data
To move the data to another folder, you need to change the /var/www/nextcloud/config/config.php
line datadirectory, put the new path to a folder you want to store nextcloud files
chown -R nextcloud /the new path to your data
This path must be avilable at yunohost / server startup (add an entry in /etc/fstab if neeed).
Or another way is to make a symbolic link
mv /home/yunohost.app/nextcloud/data /my new path/
ln -s /home/yunohost.app/nextcloud/data /my new path/data
And data will be a symbolic link to the new storage.