Hey all - I have been using NC via plugin on my TrueNAS system for a while now and it’s worked great. NC just used the local storage in the vdev.
I am in the process of moving plugins / vms on TrueNAS over to their own hypervisor and individual servers.
Which brings me to my question. How can I use a folder on my NAS as the default storage for all user data?
I don’t need or want any other data on the NAS available.
172.30 1.110 - NC
172.30.1.111 - NAS (172.30.1.109/Data/NextCloud/Data)
Nextcloud Hub 4 (26.0.4) installed via Snap
Ubuntu 22.04.3 LTS
If it matters or not I do have NC available via domain name / reverse proxy (NPM).
I found a few posts somewhat related but they have different steps so I want to make sure I am following the correct method.
I did see some posts about external sharing not working if NC was installed via Snap. Those were pretty old posts so I’m not sure if that is going to be a full stop / re-install for me.
If the base OS is Ubuntu or such Debian based, following will work.
Mount the External storage under /mnt or /media location.
sudo snap connect nextcloud:removable-media to allow snap access outside it’s confinement.
Edit Following file → /var/snap/nextcloud/current/nextcloud/config/config.php
Find the entry “DataDirectory”, change the location value to your external mount (which must be located under /mnt or /media directory)
Move the existing files,
mv /var/snap/nextcloud/common/nextcloud/data /your/external/location/
Reboot the VM.
I’m not sure I have done that before. Are you suggesting doing something like this?
sudo mount //myServerIpAdress/sharename /mnt/myFolder/
I got the network path mounted and moved the files over.
Ran into this error (the file IS there)
Your data directory is invalid.
Ensure there is a file called “.ocdata” in the root of the data directory.
Tried a bunch of fixes for it, nothing has worked.
I’m probably just going to wipe the server and do a fresh manual install of NC. It seems like Snap and docker users have the most issues with NC.
I may disagree here. Snap works flawlessly when you stay within the boundaries of snap.
Where as Docker is meant to be flexible, allowing way more customization than snap and when there is option to customize and play, issues are bound to happen.
Coming to the issue,
That file along with .htaccess are hidden files so ensure that you have indeed moved those hidden files too when you copy from default location to your external mount