openclaw/extensions/cloudflare
Peter Steinberger 37ffe3ce94
feat: back up to external disks and Cloudflare R2 with storage locations (#161913)
Adds named storage locations as a generic, pluggable capability, with backup as its first consumer.

- Core storage owner (src/storage): storage.locations config, a location marker that binds identity (runtime never creates it, so unplugged disks and different disks at the same path are refused), client-side streaming encryption (scrypt key from a SecretRef passphrase, per-object HKDF keys, AES-256-GCM segments), and a built-in filesystem provider for external disks and mounts.
- Plugin SDK: api.registerStorageProvider plus manifest contracts.storageProviders; providers move opaque bytes only.
- Bundled cloudflare plugin: an r2 provider over the S3 API with conditional writes and bounded multipart uploads; auto-enabled when a location uses provider "r2".
- Backups: backup create --to <location> with verified archives, UTC retention, list/verify/restore --from, Gateway-owned offsite schedules (installed Git schedules unchanged), per-installation namespace claims fenced at publication and deletion, backup record for external jobs, backup.status RPC, Doctor/status hints, and a Systems page Backups section.

No config or state migration; the storage section is new and optional. Proof: live R2 and mounted-disk round trips, namespace takeover trace, and a published 2026.9.7 upgrade cell with an existing Git backup schedule.
2026-10-01 02:05:44 -07:00
..
api.ts
cloudflare.live.test.ts
index.ts
openclaw.plugin.json
package.json
README.md
runtime-api.ts
s3-backend.test.ts
s3-backend.ts
settings.test.ts
settings.ts
tsconfig.json

Cloudflare OpenClaw plugin

Official OpenClaw plugin for Cloudflare R2 storage locations.

Install

openclaw plugins install @openclaw/cloudflare

Docs

See docs/plugins/cloudflare.md in the OpenClaw repository, or the published docs at https://docs.openclaw.ai/plugins/cloudflare, for bucket setup, credentials, and storage configuration.