Skip to content
YuZiOuOPublic

About

A filesystem-oriented WebDAV implementation for Cloudflare Workers. 基于 Cloudflare Workers、面向文件系统语义的 WebDAV 实现。

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

cf-fs

简体中文

cf-fs is a file storage service for Cloudflare Workers built around filesystem semantics. WebDAV and the browser interface are access layers over the same filesystem implementation.

File contents are stored in Cloudflare R2, while coordination and metadata are managed by Cloudflare Durable Objects.

Architecture

The implementation is split into three layers:

  • Access layers translate WebDAV and browser requests into filesystem operations.
  • The filesystem layer owns paths, resources, directories, and file operations.
  • The storage layer keeps metadata in Durable Objects and file contents behind an object-store interface, currently backed by R2.

This separation allows additional access protocols and storage backends without duplicating filesystem semantics.

Status

  • RFC 4918 — WebDAV Class 1 and Class 2
  • RFC 6578 — Collection Synchronization
  • RFC 4331 — WebDAV Quota and Size Properties
  • RFC 5689 — Extended MKCOL
  • Atomic consistency and failure recovery across WebDAV request handling and filesystem mutations

Compatibility is validated with the Apache Litmus WebDAV compatibility test suite. Passing Litmus does not imply complete conformance with the listed RFCs.

Deployment

Deploy to Cloudflare

Deploy interactively with Wrangler:

bunx cf-fs deploy

To remove a deployment, run the interactive destroy command. Worker deletion requires explicit confirmation, and deleting the R2 bucket is optional.

bunx cf-fs destroy
Manual deployment
bun install

# Log in to Cloudflare if needed
bunx wrangler login

# Create the R2 bucket. If you use a different name, update the binding in
# wrangler.jsonc as well.
bunx wrangler r2 bucket create webdav

# Deploy the Worker. The command prints its HTTPS URL.
bun run deploy

# Set the WebDAV username and password interactively
bunx wrangler secret put USERNAME
bunx wrangler secret put PASSWORD

For local development, set these variables in .dev.vars:

USERNAME=your-username
PASSWORD=your-password

About

A filesystem-oriented WebDAV implementation for Cloudflare Workers. 基于 Cloudflare Workers、面向文件系统语义的 WebDAV 实现。

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages