Cloudflare R2 storage manager powered by a Cloudflare Worker — file management over WebDAV with a React frontend, thumbnail generation, and chunked upload support.
Free 10 GB R2 storage with 100,000 invocation requests per day. More about pricing
- Upload large files (chunked upload via web UI)
- WebDAV endpoint — mount as a remote drive
- Create, rename, move, copy, and delete files & folders
- Search files
- Image / video / PDF thumbnails
- Drag-and-drop upload
- Built-in text editor (TextPad)
- A Cloudflare account with billing set up
- R2 activated and at least one bucket created
- Node.js 18+ and npm 9+
- Wrangler CLI installed and authenticated (
wrangler login)
git clone <your-fork>
cd FlareDrive_woker
npm installwrangler kv:namespace create "KV_NAMESPACE"
wrangler kv:namespace create "KV_NAMESPACE" --previewCopy the returned IDs into wrangler.toml:
[[kv_namespaces]]
binding = "KV_NAMESPACE"
id = "<production-id>"
preview_id = "<preview-id>"wrangler r2 bucket create <your-bucket-name>Update wrangler.toml:
[[r2_buckets]]
binding = "BUCKET"
bucket_name = "<your-bucket-name>"wrangler secret put WEBDAV_USERNAME
wrangler secret put WEBDAV_PASSWORDOptionally enable public read in wrangler.toml:
[vars]
WEBDAV_PUBLIC_READ = "1"npm run deployDone. Your Worker URL will be printed (e.g. https://flare-drive.<your-account>.workers.dev).
npm run devThe dev server runs at http://localhost:8787.
The React SPA is built separately and hosted (e.g. on Cloudflare Pages):
npm run build:frontendThe Worker proxies static assets from src/static.ts — update the upstream URL there to point to your own static host.
Point your WebDAV client (e.g. Cx File Explorer, BD File Manager) at:
https://<your-domain.com>/webdav
Standard WebDAV cannot upload files ≥128 MB due to Cloudflare Worker body limits — use the web UI for large uploads (chunked upload).
| Variable / Binding | Type | Description | Required |
|---|---|---|---|
WEBDAV_USERNAME |
Secret | WebDAV auth username | Yes |
WEBDAV_PASSWORD |
Secret | WebDAV auth password | Yes |
WEBDAV_PUBLIC_READ |
Var | "1" to allow public reads (GET/HEAD/PROPFIND) |
No |
KV_NAMESPACE |
KV binding | Login attempt tracking & IP ban | Yes |
BUCKET |
R2 binding | Default storage bucket | Yes |
The router selects a bucket binding by the subdomain prefix of the request hostname. Add additional [[r2_buckets]] entries to wrangler.toml to support multiple buckets.
WebDAV logic is based on r2-webdav by abersheeran.