How to change SNAP_DATA

Hey @iuri1, welcome to the Nextcloud community and thanks for supporting Nextcloud snap :handshake:

Sorry to hear you are having issues with your Nextcloud snap installation. If you’ve come this far, you’re on the right track! There is a good chance someone in the community has had a similar issue and knows how to resolve it.

Below are some links to how-to’s answering frequently asked questions and may help you help yourself;

pay special attention to:

I need the mysql and other system data to be elsewhere because my /var gets erased at reboot and snapd/snapctl doesn’t seem to offer a way to configure this

simple answer, nope snapd/snapctl will not offer this see Data locations - Snap documentation and see Snap Confinement

system data to be elsewhere because my /var gets erased at reboot

this is obviously your issue and to my knowledge /var is in no way relevant for the snap! please be absolutely clear about this.