Personal multi-endpoint Cloudflare R2 dashboard. Client (Pages) and server (Worker) deploy independently — point the shared UI at any compatible Worker via URL + API key.
| Piece | Host | Role |
|---|---|---|
| Client | Cloudflare Pages | SPA; endpoint records in localStorage |
| Server | Cloudflare Worker | R2 object API, admin API, public /cdn aliases |
Each endpoint record stores endPoint, apiKey, and optional customDomain. The UI sends apiKey as x-api-key to that Worker only. Multiple Workers are supported; no binding config is required in the endpoint form.
- List, upload, and delete objects on a selected Worker endpoint
- Multi-bucket support via R2 bindings (
/api/r2/bucket/:binding/...) - Public share URLs via Worker
/cdn/...aliases - Optional custom domain for generated public links
- In-app setup guide at
/setup-guide
pnpm install
pnpm dev # UI (Vite)
pnpm wr:dev # Worker (needs R2 binding + secrets)- Bind a bucket as
R2_BUCKETorBUCKET_Ainwrangler.jsonc. - Set
AUTH_KEY_SECRET(andPRIVATE_LINK_SECRETif using private links) in.dev.vars. - Run
pnpm wr:devandpnpm dev. - In the UI, add endpoint
http://localhost:8787with API key matchingAUTH_KEY_SECRET.
Binding names are the identifiers used in multi-bucket URLs. Friendly labels come from wrangler.jsonc at build time (pnpm gen:bindings). Prefer UPPER_SNAKE_CASE names.
Worker
# Configure R2 bindings in wrangler.jsonc
# Optional: D1 control plane — binding name must be DB; then apply migrations
# Secrets: AUTH_KEY_SECRET (required); PRIVATE_LINK_SECRET if using private links
pnpm deploy:worker
pnpm migrate:deploy # only when D1 admin/control-plane routes are enabledPages
pnpm deploy:pages # builds client, deploys dist/ as project multy-r2Or connect the repo in Cloudflare Pages: build command pnpm build:client, output directory dist.
Paste the multi-bucket Worker from the rolling worker release, bind R2 + secrets, then add the Worker URL and API key in the UI. Full walkthrough: /setup-guide in the app.
- Raw: https://raw.githubusercontent.com/pantharshit007/multy-r2/release-worker-js/worker.js
- Local build:
pnpm build:worker-bundle→dist-worker/index.js(do not deploy the Vite SPAdist/as a Worker)
The Release Worker Bundle action updates the rolling worker release and raw JS branch when main changes Worker source (src/server/), shared code (src/shared/), or Worker build inputs (binding generator, Wrangler config, package manifest/lockfile, TypeScript config, or the workflow itself). UI-only and documentation changes skip it. Use Run workflow with main selected in GitHub Actions to rebuild manually; other refs are skipped.
Each publication appends a commit to release-worker-js and creates a separate release tagged worker-YYYYMMDD-<run number>-<attempt> (UTC) at its source commit, including its bundle asset and source/build links. The versioned raw link points to the bundle commit. Browse release history for previous versions. The rolling worker download remains available at the same URL. History is preserved from the branch's current tip onward; commits removed by earlier force pushes are not restored. During bursts, GitHub keeps the active run and newest pending run; intermediate pending runs may be skipped.
Full Worker route reference: docs/api.md.
apiKeyis the Worker secret; the UI stores it in localStorage and sendsx-api-key.customDomainis only for generated public URLs; if empty, public URLs useendPoint.- Public aliases live on the Worker (
/cdn/...), not on Pages.
Original idea and inspiration: R2 Uploader by jw-12138 — browser-based R2 management with API-key auth.
Multy was created to manage multiple R2 buckets more easily. Tools like R2 Uploader work well for a single endpoint, but multi-bucket setups typically need a separate Worker per bucket, and the UI did not fit my needs.
The client build prerenders / and /setup-guide with page-specific metadata,
canonical URLs, structured data, and a sitemap. Bucket workspaces are marked
noindex; only public pages appear in the sitemap. Cloudflare Pages serves unknown
paths with the generated 404 page.
For a self-hosted client, set VITE_SITE_URL=https://your-client.example before
building (default: https://multy.hrshit.in). Use the client origin, not the Worker
API endpoint. Run pnpm build:client && pnpm test:seo to check the generated pages.
Submit /sitemap.xml to your search console after deployment.