Skip to main content
profClaw can run on Cloudflare’s edge infrastructure. Workers host the Hono API, D1 provides SQLite-compatible database storage, R2 handles file storage, and KV stores session and configuration data.

Supported Services

Setup

1. Install Wrangler

2. Configure environment variables

The API token needs permissions: Workers Scripts:Edit, D1:Edit, R2:Edit, KV:Edit.

3. Create resources

4. Configure wrangler.toml

Cloudflare Tunnels

Use cloudflared to expose your local profClaw instance for webhook development:
The cloudflare-tunnel.ts module (src/integrations/cloudflare-tunnel.ts) provides a programmatic interface for managing tunnel status and health checks.

D1 Storage Adapter

profClaw’s storage layer abstracts over D1 and LibSQL. When CLOUDFLARE_D1_DATABASE_ID is set, the D1 adapter is used automatically. The schema is compatible between local SQLite (via libsql) and Cloudflare D1.

R2 File Storage

Files uploaded via the chat or backup routes are stored in R2 when the R2_BUCKET binding is configured. The bucket serves as the target for:
  • Conversation attachments
  • Backup exports (.json archives)
  • Skill packages

KV Rate Limiting

When Redis is not available (pico/mini mode), KV namespaces can be used for rate limit counters and session token storage. This allows profClaw to run fully serverless on Cloudflare without a Redis dependency.