A Cloudflare Workers script that transforms Google Drive into a fully functional WebDAV server.
- WebDAV Support: Mount your Google Drive in Windows Explorer, macOS Finder, Infuse, and other DAV clients.
- High Performance: Leverages Cloudflare Workers and optional KV caching for minimal latency.
- Resumable Uploads: Supports the Google Drive Resumable API for reliable file transfers.
- Multi-Status Support: Full implementation of WebDAV protocols (PROPFIND, MKCOL, MOVE, COPY, etc.).
-
Get Google Credentials:
- By default, this project uses rclone's built-in credentials. You only need to apply for a personal Google Client ID if specifically required.
- If using personal credentials: Enable "Google Drive API" in Google Cloud Console, create OAuth 2.0 Client IDs, and obtain your
client_idandclient_secret. - Obtain your
refresh_token(this is always required).
-
Deploy to Cloudflare:
- Create a new Worker.
- Paste the
worker.jscode. - Fill in your credentials in the
configobject at the top.
-
(Optional) KV Caching:
- Create a KV Namespace named
KV. - Bind it to your Worker in "Settings -> Variables".
- Create a KV Namespace named
- WebDAV: Access via the
/dav/path. Requires the username and password defined inconfig.users.