Nextcloud instance using an existing data storage (without moving the original data)

Hi,

We have a samba server running (over Debian) in our building.
It serves files for people working in the building.
Some people are working 70% of the time outside the office.
Those people only need to access about 500Gb of data.

For those I have two options using NextCloud :

1st option

Create a Bextcloud instance in decently sized VM somewhere.
Install a NextCloud client on our file server.
Install NextCloud clients on each of our remote workers laptops.
This way,

  • remote workers have asynchronous syncing with our file server (appropriate for their low bandwidth),
  • local users can still access the documents using the samba share.

The issue with this option is that NextCloud client requires a X11 server (https://github.com/owncloud/client/issues/1581)

2nd option

Create a nextcloud isntance right on our file server.
Specify our current storage folder as NextCloud storage backend/directory.
Install NextCloud client on each of our remote workers laptops.
This way,

  • I avoid the need of an additionnal 500Gb space
  • I avoid the need of a GUI-less NextCloud client

The issue here is that I don’t know what would happen if a local user removes a file via samba ?
If I remember correclty, NextCloud has a MariaDB list of all file and would end up with a SQL Record for a file that doesn’t exist anymore in the filesystem. Is this supported or would that screw up everything ?

Are there any other options?
Thanks for your input.