No problem about the questions, we’re all learning here. I haven’t used Docker, and I don’t have a formal NAS, so take this with a grain of salt.
You’re correct that all your data will be stored inside your Docker image by default. But you can add remote storage from below (mounting it into your Docker image; NC won’t even know the storage is remote), or from above (NC’s “External Storage” feature will directly connect to the remote storage).
I briefly tried the “External Storage” feature and decided it wasn’t for me. If I remember, it’s focused on adding externals like Google Drive, DropBox, or individual NAS folders. NC shows them as separate shares in a user’s root “Files” view, so you’d have 1 folder that opens up your remote storage. Now that I remember this exists, it might be a good solution for you. Use NFS or SMB.
I chose to mount the data below NC because I didn’t want to overburden it (a glorified web page) with the responsibility of managing the connection back to my “NAS”. My host OS mounts an NFS share from my “NAS” to exactly the folder that NC locally expects the data. Effectively, the NC user has RW access, while everyone else has R-only access. So NC has full control of the data, and then manages permissions from it’s internal database. Since you’re running in a container (Docker), your host OS would need to mount NFS or SMB from your NAS, then you’d need to bind mount that into the Docker container. I’m not sure how to do the 2nd part, but it’d be just like using a physical external HDD. Don’t be scared by performance of double-mounting, it’s faster than your network.
There are challenges to mounting the data from below. NC expects the folders in very exact locations.
- All data needs to be in
./nextcloud/[USER]/files/[FILES]. If you have a wonderful NAS structure that is
[USER]/[FILES], then you’ll need to mount each user separately.
- Since the data is segregated by
[USER], it’s not easy to make truly shared data. The shared files will always exist under a physical user account. I didn’t like this (messes with backup purity) and got around it by making a shared family account, which all users can access.
Yes - but I don’t have a NAS with point & click sharing options, so I’d need to install and configure Samba from the ground up