Skip to main content
The Nextcloud VFS mounts a WebDAV server (Nextcloud, ownCloud, Hetzner Storage Share, or any generic WebDAV endpoint) at some prefix such as /nc/. Reads are async and streaming, with range requests for partial reads. For credential setup, see Nextcloud Setup.

Install

Config

NextcloudVFS(config) takes a NextcloudConfig object with the WebDAV URL plus optional Basic Auth credentials. Both READ and WRITE modes are supported. Use an app password (Settings → Security in Nextcloud) rather than your account password. Fields marked secret are redacted in snapshots.

VFS.md

The VFS.md an agent reads with Nextcloud mounted at /<path>.

Virtual Filesystem

Supported Unix Commands for VFS

Unix commands work on each path as on a local filesystem, as far as the path supports them:

Limitations of Unix Commands for VFS

Where a path differs from a local filesystem:Run man <cmd> or <cmd> --help for one command’s usage.
WebDAV resources map directly to virtual paths under the mount prefix. For example, if your Nextcloud root contains:
Then mounting at /nc/ exposes:
Path mapping: virtual /nc/Documents/notes.md issues HTTP requests against <NEXTCLOUD_URL>/Documents/notes.md.

Cache

The Nextcloud VFS uses IndexCacheStore. Directory listings come from a single PROPFIND Depth: 1 and populate file size, type, and ETag entries that stat reads via a fast path, so a readdir followed by per-entry stat calls (which is what ls, FUSE getattr, and most shell commands trigger) costs one HTTP request instead of N.

Snapshots

A snapshot restores a Nextcloud mount’s settings (hand it back at load when it has a password, which is not saved); its files are not checked for drift.

Integration

What Nextcloud answers through its own API, so fewer files are read. Integration explains each command.

Example

Shell Commands

The Nextcloud VFS supports the full set of shell commands since it operates on real file content (text, binary, JSON, CSV, etc.). Reads benefit from HTTP Range requests so commands like head -c BYTES don’t pull the whole file.

Read Commands

Text Processing

File Operations

Path Utilities

Compression

Encoding

Streaming

  • Reads: streamed in chunks. Downstream commands like head -n 1 early-cancel, so you only pay for the first chunk over the wire.
  • Range reads: head -c BYTES and other partial reads issue HTTP Range requests that Nextcloud and most WebDAV servers honor.
  • Writes: buffer the payload before upload. Streaming uploads (Nextcloud’s uploads/ resumable protocol) are a possible future follow-up.

Use Cases

  • AI agents accessing personal cloud storage: Mount Nextcloud so agents can read documents, notes, and structured data on a self-hosted cloud.
  • Self-hosted alternative to Dropbox/Box: Same shell-command surface, with full read+write support.
  • Multi-protocol WebDAV: Works against any RFC 4918-compliant server, not just Nextcloud.
  • FUSE mounting: Expose Nextcloud through a virtual FUSE mount for external tools.