Can Nextcloud sync folders that aren't in a Users/<name>/<subfolder> structure?

I’ve been using Resilio Sync on TrueNAS Core on my home server for a few years and now that I’ve upgraded to TrueNAS Scale, RSync’s not available through the catalog, so I’m trying to replicate the same setup in Nextcloud. Here’s an example:

I have a Music folder in the root of a drive on my Win 10 desktop. This was synced via RSync to a dataset called Cloud on my server, appearing as

\\Server\Cloud\Music

I then ran RSync on my phone to similarly sync the Music folder into the phone’s storage, into

/storage/emulated/0/Music

I deliberately don’t keep these stored in the typical location in Windows, i.e. Users<name>\Music, nor do I want to store them in the default Nextcloud file structure: I want them in the existing datasets on my server.

I see that the Nextcloud desktop app has an “Add Folder Sync Connection” option that allows me to choose an arbitrary folder on my PC, but the only destinations it offers on the server are per-user and within the Users file structure (e.g. the default folders of Documents, Photos and Templates), and unless I can mount a dataset from the server into this Users folder, I don’t want to store the server-side copy there.

Further clarification: I don’t really want to access the files using Nextcloud, I only really want to use it to synchronise the files. In some cases I’ll be accessing the files via network shares using other devices on my LAN on which I don’t have the space to store the files, so I wouldn’t want to automatically sync them to those devices anyway, or want to install Nextcloud on them.

Questions:

  1. I know that I can mount additional datasets into the Nextcloud app on TrueNAS. Where do these mounts appear within the Nextcloud container?
  2. Can mounted folders be mapped into a particular user’s file structure?
  3. Is it possible to make Nextcloud sync to folders mounted this way?

Alternatively, if there’s another way to do what I’m trying to do, please let me know.

Thanks in advance.

Sounds like the External Storage feature.

  1. I know that I can mount additional datasets into the Nextcloud app on TrueNAS. Where do these mounts appear within the Nextcloud container?

Wherever you mount them within the container. I don’t recall off-hand TrueNAS’s behavior specifically (or how it’s exposed in their UI), but under the hood it’s all just standard containers and volumes.

  1. Can mounted folders be mapped into a particular user’s file structure?

Yes, using Nextcloud Server’s External Storage feature. If the datasets are mounted within the container, then Nextcloud can mount them within itself as Local type volumes. (Btw, External Storage can also directly mount other remote volume types such as SMB, SFTP, S3, etc.).

  1. Is it possible to make Nextcloud sync to folders mounted this way?

Yes.