Networking – Access Nextcloud files via SMB/CIFS

cloudnetworkingnextcloudsamba

I want to setup Nextcloud as a secure private personal cloud. It should serve my data to different kind of devices: On the one side laptops and smartphones, where I want to simply use the Nextcloud client for syncing. But I've also a desktop computer in my LAN. Here, no local copy is needed. I even want to avoid it cause this PC have only a SSD and my Nextcloud would be about ~120GB big.

In the past I used DSM over Xpenology, which offers SMB/CIFS shares. This works well and stable on my desktop: I simply mounted the shares and evereything works good. Sadly, Nextcloud seems only able to use SMB/CIFS as external storage on the server side.

So my question: How can I access my Nextcloud files locally without cloud sync?

Thoughts about solutions

What's about WebDAV?

Basically, this seems a replacement for SMB. But from my experience from the past, WebDAV seems slow and not as stable as SMB. I think on larger files WebDAV would be slower, since it would be required to download the hole file first before it's possible to open them (WebDAV seems based on the HTTP protocol).

Update: I played around with WebDAV on Nextcloud. It was easy to configure since its buildin. But as I thought, I ran into problems: For example, a movie couldn't played over WebDAV. I Got an error "Bad file descriptor" in Nextcloud. Seems like this isn't possible using WebDAV. I would have to download the file locally first, which is more work and cause trash data on the client, when I forget to delete the local copy after watching. SMB could do this much better.

Runing Samba?

It was my first idea to simply run my own samba server. By using LDAP for Nextcloud and Samba, there wouldn't be any mess with redundant acconts for those two services. However, I would ran into another issue: Samba bypasses the Nextcloud logic. This wouln't only result in a lack of the version history. I also noticed that Nextcloud just keep track of files, that were uploaded by an Nextcloud client. Putting a file in the filesystem of Nextcloud wouldn't made them appear in the Nextcloud Web UI.

So shirking Nextcloud using a custom SMB client seems causing more problem than it's going to solve.

Best Answer

How can I access my Nextcloud files locally without cloud sync?

You don’t. That’s simply not how the service works. As you already discovered, you can indeed access the underlying storage. However, this bypasses everything Nextcloud and you might as well stop using it altogether.

Because services like ownCloud, Nextcloud or Pydio are designed to be filesystem-agnostic, they don’t rely too much on filesystem features like ACLs and metadata storage, instead implementing these features themselves. If the filesystem goes out of sync with the metadata storage, strange things are bound to happen.

Depending on your actual requirements (mainly: viewing via browser or even managing via browser) you could instead use a synchronization-only solution like syncthing. It’s Samba-friendly, too.

Then there are alternative WebDAV clients that may or may not suck less. A quick search turned up ExpanDrive, which is commercial software.

Seafile (comparable to Nextcloud) offers a “Seafile Drive client” that appears as a drive on Windows: https://blogs.seafile.com/2016/09/02/announcing-seafile-drive-client-a-new-way-to-map-seafile-storage-as-virtual-drive/

The drive client is supported in the free community edition. However, I found Seafile difficult to set up. It is much more complex compared to Nextcloud. There’s a somewhat working Docker tool available though.

Related Question