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_dirinwrangler.tomland has no Workermain. Do not use the Workers Deploy to Cloudflare button orwrangler deploy— that looks for a Worker entry point and fails with «entry point not configured».
Grid light:
Grid dark:
Image preview:
Share (expiry + extract code):
- Chunked web uploads, folders, search, drag-and-drop, image/video/PDF thumbnails
- Share links with expiry or forever, extract code, folder zip; zero-JS preview for media/PDF, monospace preview + copy for
text/plain - Quick paste: toolbar paste →
.txt+ existing shares (expiry / extract code) — a self-hosted Pastebin - Paste screenshot → CDN: Ctrl/Cmd+V in the file manager, Image host page, or Settings — uploads via
POST /api/images, toast copieshttps://<SITES_HOST>/i/{id} - PDF library / bookshelf: publish a PDF/EPUB folder to
sites/{slug}/with open/download + optional covers - Podcast / RSS: publish an audio/video folder to
sites/{slug}/withfeed.xml+ a simple player page — subscribe in any podcast app - Download page / Releases on R2: publish an installer/zip folder to
sites/{slug}/with name, size, SHA-256 (optional README notes) - Scheduled backup: Settings card copies safe
davflare synccrontab lines; examples + GitHub Actions - 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, agent layouts on R2, and an official Agent Skill (skills/davflare/)- Chinese / English UI
- Open Workers & Pages → Create → Pages → Connect to Git, pick this repo (needs a Cloudflare account with R2 activated and a payment method on file).
- Framework preset None, build
npm run build, output directorybuild(or rely onwrangler.toml'spages_build_output_dir). - Bind your R2 bucket to
BUCKET, setWEBDAV_USERNAMEandWEBDAV_PASSWORD, then retry deploy. - Optional:
WEBDAV_PUBLIC_READ=1,TRASH_RETENTION_DAYS(default30,-1disables), and for public sites/images bindsites.<your-domain>and setSITES_HOST=sites.<your-domain>. On that zone set Caching → Browser Cache TTL to Respect Existing Headers (the 4-hour default rewrites site css/images/fonts tomax-age=14400); see docs/sites.md#caching. - Optional: add a custom domain for the drive UI.
Full Pages / Wrangler steps and the five feature switches: docs/deploy.md.
Sync an Obsidian vault to Davflare's WebDAV (/webdav) with the community plugin Remotely Save. Every device shares one copy, no extra server.
- Deploy Davflare (see Quick start above) and keep the WebDAV switch on in
#/settings(on by default). - Open the drive → WebDAV in the top bar → Obsidian sync card, then click "Copy server address" (looks like
https://<your-domain>/webdav/) and "Copy username". The password isWEBDAV_PASSWORD(your web sign-in password); the card never shows it. - Obsidian → Settings → Community plugins. In a new vault, first click Exit Restricted mode (turns on community plugins); only then does Browse appear. Browse, install and enable Remotely Save.
- In Remotely Save settings:
- Choose A Remote Service: Webdav
- Server Address / Username / Password: from step 2
- Auth Type: basic
- Depth Header Sent To Servers: keep the default only supports depth='1'
- Remote Base Directory: leave empty (defaults to the vault name, created at the WebDAV root); if your devices use different vault names, set the same single-level name on all of them (no
/), then click Confirm next to the field and Confirm To Change in the dialog that follows — the change is not saved otherwise
- Click "Check Connectivity" → "Check" and wait for the success notice.
- Click the Remotely Save icon in the left ribbon to sync once. Before the first sync the plugin shows "HUGE updates on the sync algorithm": tick both checkboxes and click Agree (Do Not Agree disables the plugin).
- Second device: create an empty vault with the same name first, configure it with steps 3–5, then sync once to pull down the same content.
Tested (local wrangler pages dev plus the same webdav client the plugin uses, replaying Remotely Save 0.5.25's request sequence as two devices syncing both ways): Chinese file names, spaces, special characters such as + & ' % #, nested folders, empty folders, PNG / PDF attachments, 5MB / 12MB files, deletes, file renames, folder renames, and both depth='1' and depth='infinity' listing.
Limits: each file must be under 100MB (Cloudflare's request body limit). Requests over 100MB are stopped by Cloudflare with its generic 413 page, so set Remotely Save's Skip Large Files threshold below 100MB. Remotely Save syncs a rename as "delete old file + upload new file".
Point Cursor or Claude Desktop at the same-origin POST /mcp with an API key. No new APIs.
- Deploy Davflare, open
#/settings, leave API Key and MCP on, create a key. - On the Connect Claude / Cursor MCP card, copy or download:
- Cursor →
mcp.json(url+Authorization: Bearer ${env:DAVFLARE_API_KEY}) - Claude Desktop →
claude_desktop_config.json(mcp-remotebridge; setDAVFLARE_API_KEYin the environment before launch)
- Cursor →
- Restart the client and ask it to call
tools/list.
Details and samples: docs/agents.md#2-minutes-connect-davflare-to-an-ai-assistant · agents/examples/mcp-export/.
Point Cursor / Claude / Codex at your Davflare drive so the agent can store files, create share links, and publish_site to sites/{slug}/ — same-origin /mcp (~25 tools) + Open API, no new APIs.
- Deploy Davflare;
#/settings→ leave API Key + MCP on; create a key. - Wire the client: Settings → Connect Claude / Cursor MCP (or
agents/examples/mcp-export/). SetDAVFLARE_API_KEY— never paste a rawfd_…into files. - Install the skill:
Or Settings → Agents skill (official) → Copy / Download
npx skills add fanchenggang/Davflare --skill davflare -g -a cursor
SKILL.mdinto~/.cursor/skills/davflare/. - Ask the agent to
tools/list, then trylist/publish_site(seeagents/examples/hello-site/).
Agents skill teaches the agent how to use Davflare; Connect Claude / Cursor MCP only exports mcp.json. Details: docs/agents.md#official-skill · agents/examples/davflare-skill/ · skills/davflare/.
In the web UI, open Quick paste from the toolbar (or the mobile Create menu): paste text → pick expiry and an optional extract code → get a share link. Davflare writes a .txt in the current folder and reuses POST /api/shares — no new API.
The landing page shows a monospace preview with one-click copy, plus .txt download. Extract codes work like any other share. Handy for code snippets, logs, or notes when people search for a private Pastebin on Cloudflare R2.
From scripts: PUT /webdav/.../note.txt then POST /api/shares; Content-Type: text/plain shares get the paste landing automatically.
Use existing davflare-cli sync — no new APIs.
npm i -g davflare-clithendavflare login --server https://<your-host>(or set secretsDAVFLARE_SERVER/DAVFLARE_KEYin CI).- Open
#/settings→ Scheduled backup → copy a push or pull crontab line (keys stay in~/.config/davflare, never in the line). crontab -eand paste; or copyagents/examples/backup-cron/github-actions-backup.ymlinto your repo workflows.
Samples: agents/examples/backup-cron/. Sync semantics: cli/README.md.
Select a folder of installers / zips → Publish as download page. Davflare copies files into sites/{slug}/, writes a page with filename, size, SHA-256, and optionally renders a sibling README.md as release notes. Copy https://<SITES_HOST>/{slug}/. Reuses the existing static-site publish flow — no new API.
- Deploy with
SITES_HOST, leave Sites on. - In the file manager, open a folder of
.zip/.exe/.dmg/ … (or select the folder) → Publish as download page. - Copy
https://<SITES_HOST>/{slug}/and share it.
Distinct from public directory, album, docs, podcast RSS, and nav site. Sample: agents/examples/folder-downloads/.
Select a folder of PDFs (optional EPUBs) → Publish as PDF library. Davflare copies files into sites/{slug}/, builds a bookshelf page with filename, size, open-in-browser / download; existing thumbnails become covers. Copy https://<SITES_HOST>/{slug}/. Reuses the existing static-site publish flow — no new API.
- Deploy with
SITES_HOSTand keep Sites enabled. - In the file manager, open a folder of
.pdf/.epub(or select the folder) → Publish as PDF library. - Copy
https://<SITES_HOST>/{slug}/and share it.
Distinct from download page, docs site, album, podcast RSS, public directory, and nav site. Sample: agents/examples/folder-bookshelf/.
Select a folder of audio/video files → Publish as podcast / RSS. Davflare copies media into sites/{slug}/, writes RSS 2.0 feed.xml (enclosures on SITES_HOST), and a simple list player page. Reuses the existing static-site publish flow — no new API.
- Deploy with
SITES_HOST, leave Sites on. - In the file manager, open a folder of
.mp3/.m4a/.mp4/ … (or select the folder) → Publish as podcast / RSS. - Copy
https://<SITES_HOST>/{slug}/feed.xmlinto Apple Podcasts / AntennaPod / Overcast / …
Distinct from album, docs site, public directory, and nav site. Sample: agents/examples/podcast-rss/.
From the Share Sheet, drop a photo or file into free R2. Open #/settings → Phone upload (iOS Shortcuts / Android): copy the filled-in upload URL / auth headers, build one iOS Shortcut (or paste curl into Android HTTP Shortcuts). Reuses existing POST /api/upload (drive folder) and POST /api/images (public CDN) — no new API / MCP.
Distinct from WebDAV mount, PicGo/ShareX, paste-screenshot image host, and file-request collect links.
Sample: agents/examples/mobile-upload/.
In the file manager, #/images, or #/settings (Image host clients card), press Ctrl/Cmd+V with a screenshot on the clipboard. Davflare uploads via existing POST /api/images — no new API — then toasts a one-click copy of https://<SITES_HOST>/i/{id}. In the file manager the same paste also queues the file into the current folder.
Text Quick paste stays on the toolbar button (clipboard text → share). Image paste never opens the text Paste dialog.
Sample notes: agents/examples/paste-image-host/.
Turn your R2 bucket into a private Markdown image host (PicGo / ShareX / Typora). Reuses POST /api/images — no new APIs.
- Deploy with
SITES_HOST, leave API Key and Image host on, create a key (fd_…). - Open
#/settings→ Image host clients:- ShareX — download
.sxcu, replaceYOUR_API_KEY, import. - Typora — copy the one-line Custom Command curl (replace the key;
$1is the file). - PicGo / PicList — install
picgo-plugin-davflare(local folder, orpicgo install picgo-plugin-davflareafter the owner publishes to npm).
- ShareX — download
- Upload a test image (or Ctrl/Cmd+V a screenshot in the file manager /
#/images/ Settings); public URL ishttps://<SITES_HOST>/i/{id}.
Details: docs/sites.md#markdown-image-host-in-10-minutes · agents/examples/image-host-export/ · picgo-plugin-davflare/.
| Topic | Link |
|---|---|
Deploy, env vars, feature switches, post-deploy #/setup checklist; MCP playground #/mcp |
docs/deploy.md · docs/API.md |
| WebDAV clients & limits; compatibility matrix + litmus | docs/webdav.md · docs/webdav-clients.md |
| Open API & MCP (incl. chat share / zip folder examples) | docs/API.md |
| Static sites & image host; podcast RSS / download page / paste screenshot / PicGo / phone upload | docs/sites.md · agents/examples/podcast-rss/ · agents/examples/folder-downloads/ · agents/examples/folder-bookshelf/ · agents/examples/paste-image-host/ · picgo-plugin-davflare/ · agents/examples/image-host-export/ · agents/examples/mobile-upload/ |
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); MCP one-click export; official Agents skill |
docs/agents.md · skills/davflare/ · agents/examples/davflare-skill/ · agents/examples/mcp-export/ |
CLI (davflare-cli); scheduled backup (crontab + Actions) |
cli/README.md · agents/examples/backup-cron/ |
| Chrome extension (install + bookmarks) | extension/README.md |
| Bookmark portability | docs/bookmarks-portability.md |
| Testing | TESTING.md · TEST_CASES.md |
- longern/FlareDrive by longern — original fork; this project has been fully rewritten since. Internal object prefix is still
_$flaredrive$/. - r2-webdav by abersheeran — WebDAV implementation.
- HamHome by bingoYB — bookmark library UX was inspired by this open-source reference.



