Snap installation with changed data directory


based on there are two possibilities to change the data directory in context of installation: before and after creating the admin user.

With the default data directory everything works fine. But I am failing on both methods to change it:

  • When I do it after creating the admin user, I fail as described in my other posting Problems with moved data directory - besides, using an NFS share instead of an SMB share makes no difference.
  • When I do it prior creating the admin user, my changes in file /var/snap/nextcloud/current/nextcloud/config/autoconfig.php are instantly reverted by the nextcloud server. I tried to suspend the snap and change
    /var/snap/nextcloud/14827/nextcloud/config/autoconfig.php instead, but the file (and its copy in directory current) is reverted as soon as I enable the snap.

Any ideas would be very helpful. I did a lot of other experiments like changing the snap enviroment variable NEXTCLOUD_DATA_DIR which is used in autoconfig.php with no success.

Best regards,

Well, Stefan it really sucks that no one helped you out since I am having the exact same issue and cannot find a solution.

Hi. I’m having the same issue and have uploaded my issues cannt change data directory before or after adding admin. Has anyone fixed been about to get it working. I’m trying to move to two 500gb raid 0 drives.

Hey, did you ever find any solutions for this? Im in the same boat running a raid on ubuntu but unable to change data dir.

If anyone finds this when searching the answer is on the “nextcloud-snap” github page.

Removable media

Also note that the interface providing the ability to access removable media is not automatically connected upon install, so if you’d like to use external storage (or otherwise use a device in /media or /mnt for data), you need to give the snap permission to access removable media by connecting that interface:

$ sudo snap connect nextcloud:removable-media