Your own Google Drive mirror, on Cloudflare.
Build a ready-to-deploy worker.js in five steps. Everything happens in this browser tab: no server, no tracking, no stored data. Your client secret and tokens go only to Google.
- Open source, MIT
- Works on free Google Drive and free Cloudflare Workers
- Shared Drives, folders and My Drive
-
1
Google OAuth client
Use your own Google Cloud project. Nothing is shared with xKAF.
How to create it (about 3 minutes)
- Open Google Cloud Console and create a project.
- Enable the Google Drive API.
- Under Google Auth Platform → Branding / Audience, set up the consent screen as External, then Publish app (status “In production”). In “Testing” status Google expires refresh tokens after 7 days.
- Under Clients, create an OAuth client of type Web application and add this Authorized redirect URI:
- Paste the Client ID and Client secret below.
or -
2
Choose drives
Each drive becomes
/0/,/1/… on your mirror. Drag order with the arrows.Name ID Password (optional) No drives yet. Sign in and load your Shared Drives, or add an ID manually.
-
3
Site
You can change all of this later from
/admin. -
4
Security
Passwords are hashed with SHA-256 here, before they are written into the code.
-
5
Get your worker
Copy or download, then deploy on Cloudflare.
Deploy in the Cloudflare dashboard
- Go to Workers & Pages → Create → Create Worker, give it a name and deploy the placeholder.
- Click Edit code, replace everything with the generated code, and Deploy.
- Recommended: Storage & Databases → KV → create a namespace, then in your Worker go to Settings → Bindings → Add → KV namespace with the variable name
XKAF_KV. This enables the live/admineditor and statistics. - Optional: add a custom domain under Settings → Domains & Routes.
Deploy with Wrangler
npm i -g wrangler wrangler login wrangler kv namespace create XKAF_KV # copy the id into wrangler.toml wrangler deploy