I have no support/technical question and have seen the support category. (Be aware that direct support questions will be deleted.)
on
Which general topic do you have
We have a local file server at the moment. We are looking into installing a Ubuntu server with Nextcloud instead. We would like to be able to use our File explorer to open files when at office and use Nextcloud to get acces when we are on the move. Is it possible to use our Nextcloud file area as our File server? Would it pose and problems?
Has anyone had the same thoughts and if so, how did you go about it?
As @rakekniven wrote, its hard to know what you want and impossible to know what you currently use. You donât even told us what Operating Systems your Clients do use.
But there is a quite simply way to use a Nextcloud Server as a File Server â WebDAV.
Hi and thanks for the quick replies! Sorry for being vague in the first post.
To clarify our setup and needs:
Client OS: We are primarily using [Windows 10/11]. When I said âFile explorerâ, I meant accessing the files directly via Windows Explorer (or Finder on macOS), just like a mapped network drive (e.g., Z: drive).
Current Situation: We currently use a standard local file server (SMB).
The Goal: We want to migrate to Nextcloud on Ubuntu. However, we have too much data to sync everything to every laptop. We want the âlook and feelâ of a direct file server connection when we are at the office, but the flexibility to access files remotely.
@adelaar mentioned WebDAV. Is mounting Nextcloud via WebDAV the recommended way for daily heavy usage in an office LAN, or would the Nextcloud Desktop Client with âVirtual Filesâ be a better solution for us?
We are mainly concerned that WebDAV might be slower than our current SMB setup, so we are looking for best practices on how to replace a traditional File Server with Nextcloud.
When i mentioned WebDAV i did not know you wanna use Nextcloud in an Office surroundung. WebDAV ist not good for that type of use, since the server canât lock files.
EDIT: it works as it should be. Go to @ernolfâs hint using Temporary files lock app (files_lock). That is the solution to make Nextcloud a full FIle Server
Besides of ernolfâs implementation, if you use the client, the virtual file system would be the way that you donât have to store all the files on each client.
If you want a look and feel of Nextcloud, there are a few providers giving smaller demo accounts for free: Sign up for a free Nextcloud account
Or you just go ahead and install Nextcloud on your serverâŠ
It is the Windowsâ WebDAV WebClient which doesnât really handle WebDAV locking itself, but when you open a document in Office from a mapped WebDAV drive, Office opens its own WebDAV connection to the server and does proper locking on the application level.
How locking works with WebDAV, Windows WebClient and Office
There are actually two different layers involved when you open a file from a mapped WebDAV drive:
The Windows WebDAV WebClient (the thing that maps the drive letter like NcDavTray)
The application itself (e.g. Microsoft Office, OnlyOffice, âŠ)
1. Windows WebClient by itself
The Windows WebDAV WebClient is basically just a redirector that exposes a WebDAV share as a drive letter (X:\ etc.) and NcDavTray makes it particularly convenient to manage and install these drives.
On its own, the WebClient (the DavClient part under the microsoft hood):
does not handle proper WebDAV locking (it doesnât send LOCK/UNLOCK in the way a full WebDAV client would),
just gives applications a file handle as if it were a normal network drive.
If an application only uses this layer (for example a simple text editor), then there is effectively no WebDAV-based locking, and two users can overwrite each otherâs changes, the last person who saves the file âwinsâ.
2. What Office does on top of that
Office behaves differently:
When you open an Office document (e.g. .docx, .xlsx) from a mapped WebDAV drive,
Office does not just keep using the file handle from the WebClient,
instead, Office detects that the file comes from a WebDAV location and then opens its own WebDAV session directly to the server, requesting credentials (dedicated App-Password).
Over this direct WebDAV connection, Office:
talks to the server with proper WebDAV requests,
creates and maintains a lock for the document,
and uses its own mechanisms for conflict handling / collaboration.
So in practice:
The Windows WebDAV WebClient itself does not provide reliable locking,
but Office âtakes overâ the file via its own WebDAV client,
and that part does implement locking correctly.
Thatâs why:
If two users open the same document in Office via the mapped WebDAV drive,
they will still see proper âfile is locked by âŠâ / read-only messages.
But if they open the same file in a simple editor that does not implement its own WebDAV logic, there is no locking protection.
Thanks for the suggestion! I have actually installed a test instance now. I havenât gotten around to properly testing the âfile serverâ aspect of it yet (connecting clients and checking performance), but itâs next on my to-do list
Thank you so much for taking the time to write such a comprehensive and technical answer! That really clears up how the locking mechanism works under the hood. I wasnât aware that Office actually bypasses the Windows WebClient to establish its own connection and handle the locking itselfâthat is a crucial detail for us.
Given this information, and our need for a reliable âfile serverâ experience: Do you personally recommend sticking to this mapped WebDAV drive approach, or would we be better off using the Nextcloud Desktop Client with âVirtual Filesâ?
Iâm curious if the Desktop Client handles locking (especially for non-Office files) more reliably than the standard Windows WebClient does?
Thanks again for sharing your expertise, itâs highly appreciated!
OK, so with the Temporary files lock app (files_lock ) installed, you have the option to lock any file in the context menu of the official Nextcloud Desktop Client (whether synchronized or virtual). This lock prevents other users from editing that file. You can still edit the same file in different clients as long as you are the same Nextcloud user. Therefore, you should not use shared accounts!
Automatic file locking by Office applications (Microsoft365, Open-/Libre-Office, Collabora etc.) does not work in the official Nextcloud Desktop App. These locks work better on an NcDavTray network drive. Therefore, there is no option to lock individual files in the context menu of files on NcDavTray network drives. I am currently working on this feature, so it is possible that it will be improved in the future.
I recommend using NcDavTray and the official Desktop Client in parallel.
That is a brilliant clarification. As a Graphic Designer working with heavy files (Adobe CC etc.), the automatic locking in Office apps doesnât help me much with .indd or .psd files. So, the manual lock feature in the Desktop Client sounds absolutely vital for our creative workflow, while the WebDAV/NcDavTray route seems superior for our administrative/Office workflows.
Using them in parallel sounds like the way to go to get the "best of both worlds. Thanks!
We use File Explorer, Nautilus and Finder to access files when at home and on the go via the Desktop Client. There has been no need so far to use different clients. When I need to work on a file for a long time, I pause sync and then resume sync when the work is finished. There is also a helpful option to sync only specific folders instead of syncing everything.
I run Nextcloud (on Linux) with a Windows file server (in domain). You can connect with smbclient (part of Nextcloud) Windows Shares (or others) and map them into the file hierarchy of Nextcloud.
E.g. You have a Windows share \\WinSrv\Books and can map it as Books (or what ever name you like) into Nextcloud. On Windows side it behaves like a normal share. On Nextcloud it behaves similar to a Nextcloud directory. Not sure if it still has some limitation compared to an in-nextcloud-directory.
Yo can configure that in Administraton settings - External Storage for all users or by user (SMB/CIFS).
The configuration above is a global one (but âonlyâ an example. I use DFS). I used Login and password for authentication because when I setup my NC there was nothing else which worked. Now there are other options.
It will than look like this: