Skip to content

Repository files navigation

Davflare

English | 中文

Deploy to Cloudflare Pages · Deploy guide

Cloudflare R2 file manager on Cloudflare Pages (API via Pages Functions) — free 10 GB storage and 100,000 invocations per day. R2 pricing

Pages, not Workers. This repo sets pages_build_output_dir in wrangler.toml and has no Worker main. Do not use the Workers Deploy to Cloudflare button or wrangler deploy — that looks for a Worker entry point and fails with «entry point not configured».

Screenshots

Grid light:

Grid light

Grid dark:

Grid dark

Image preview:

Image preview

Share (expiry + extract code):

Share (expiry + extract code)

Features

  • Chunked web uploads, folders, search, drag-and-drop, image/video/PDF thumbnails
  • Share links with expiry or forever, extract code, folder zip, and a zero-JS landing page
  • Recycle bin with configurable retention (TRASH_RETENTION_DAYS)
  • WebDAV Class 1/2 at /webdav (toggleable without affecting the web UI)
  • API keys for scripted upload / download / sync, plus remote MCP at /mcp (25 tools)
  • Static sites and image host on a separate hostname (SITES_HOST), plus a GitHub Action to deploy from CI
  • Owner Settings with five persistent feature switches
  • davflare-cli, optional Chrome MV3 extension, and agent layouts on R2
  • Chinese / English UI

Quick start

  1. Open Workers & Pages → Create → Pages → Connect to Git, pick this repo (needs a Cloudflare account with R2 activated and a payment method on file).
  2. Framework preset None, build npm run build, output directory build (or rely on wrangler.toml's pages_build_output_dir).
  3. Bind your R2 bucket to BUCKET, set WEBDAV_USERNAME and WEBDAV_PASSWORD, then retry deploy.
  4. Optional: WEBDAV_PUBLIC_READ=1, TRASH_RETENTION_DAYS (default 30, -1 disables), and for public sites/images bind sites.<your-domain> and set SITES_HOST=sites.<your-domain>.
  5. Optional: add a custom domain for the drive UI.

Full Pages / Wrangler steps and the five feature switches: docs/deploy.md.

Documentation

Topic Link
Deploy, env vars, feature switches, post-deploy #/setup checklist; MCP playground #/mcp docs/deploy.md · docs/API.md
WebDAV clients & limits docs/webdav.md
Open API & MCP (incl. chat share / zip folder examples) docs/API.md
Static sites & image host docs/sites.md
GitHub Action — deploy a build dir to a site (uses: fanchenggang/Davflare@main) docs/sites.md#github-action-deploy-to-davflare-site
Agent layouts (pull / push) docs/agents.md
CLI (davflare-cli) cli/README.md
Chrome extension (install + bookmarks) extension/README.md
Bookmark portability docs/bookmarks-portability.md
Testing TESTING.md · TEST_CASES.md

Acknowledgments

License

MIT

About

Self-hosted cloud drive on Cloudflare R2 — web file manager + WebDAV, with chunked uploads, expiring share links, trash, thumbnails, search & API keys. | 基于 Cloudflare R2 的免费私有云盘:Web 文件管理 + WebDAV 服务,Pages & Workers 全 serverless 部署,大文件分块上传、分享链接(可设过期)、回收站、缩略图、搜索与开放 API

Topics

Resources

Stars

69 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages