Installation
The Cloudflare provider is included in the mainalchemy package:
Credentials
Set up your Cloudflare credentials as environment variables:Available resources
Compute
- Worker - Deploy JavaScript/TypeScript Workers
- DurableObjectNamespace - Stateful compute with strong consistency
- Workflow - Orchestrate long-running tasks
- Container - Deploy containerized applications
Storage
- R2Bucket - Object storage compatible with S3
- KVNamespace - Low-latency key-value storage
- D1Database - Serverless SQLite databases
- Vectorize - Vector database for AI applications
Messaging & Queues
- Queue - Message queues for async processing
- DispatchNamespace - RPC between Workers
AI & ML
- AiSearch - RAG and semantic search
- Ai - Access Cloudflare AI models
Networking
- CustomDomain - Custom domains for Workers
- Hyperdrive - Database connection pooling
- Tunnel - Secure tunnels to your origin
- Route - HTTP routing rules
Security
- ApiShield - API security and validation
- RateLimit - Rate limiting rules
Example usage
Here’s a complete example deploying a Worker with Durable Objects, R2 storage, and a Queue:Local development
Cloudflare resources support local development mode using Miniflare:Framework integrations
Alchemy provides plugins for popular web frameworks:- Vite - Deploy Vite applications
- Astro - Deploy Astro sites
- Next.js - Deploy Next.js applications
- Nuxt - Deploy Nuxt applications
- SvelteKit - Deploy SvelteKit apps
- React Router - Deploy React Router v7
- RedwoodJS - Deploy Redwood applications
- TanStack Start - Deploy TanStack Start apps
Next steps
Worker API
Deploy Cloudflare Workers
Durable Objects
Stateful serverless compute
Examples
Browse Cloudflare examples
Framework integrations
Deploy web frameworks