OpenClaw Workshop - Cloudflare Tech Hub
Use this project as a reference to build your own developer workshop for customers. Hands-on workshops help partners demonstrate the power of Cloudflare's developer platform โ from Workers and Containers to AI Gateway โ
Why Run a Developer Workshop?
Use this project as a reference to build your own developer workshop for customers. Hands-on workshops help partners demonstrate the power of Cloudflare's developer platform โ from Workers and Containers to AI Gateway โ in a way that slides and demos alone cannot. Let your customers experience building and deploying real applications, deepening their understanding and uncovering new business opportunities.
OpenClaw Workshop
Deploy OpenClaw on Cloudflare Containers with Workers AI, R2 persistence, and admin dashboard. Powered by Kimi K2.5 via AI Gateway โ no external API keys needed.
View on GitHubOne-Click Deploy
Deploy to Cloudflare's global network instantly
Workers AI
Kimi K2.5 via AI Gateway, no external keys
R2 Persistence
Device approvals & chat history survive restarts
Admin Dashboard
Stats, device management & CLI terminal
Auto-Onboarding
Self-configures on startup with R2 restore
Architecture
Choose Your Deployment Path
Confirm you have access to the workshop Cloudflare account.
- Open the Cloudflare Dashboard and log in with the email you registered with.
- Check the invitation email from Cloudflare โ accept the invite to join the workshop account.
- Once logged in, verify you can see the workshop account in the account selector (top-left).
- Navigate to Workers & Pages โ you should see the Workers Paid plan is active.
You'll need a GitHub account to fork the repository.
Sign up for GitHubYou'll need the following values ready before deployment:
| Variable | How to Get |
|---|---|
GATEWAY_AUTH_TOKEN | Generate with openssl rand -hex 16 |
AI_GATEWAY_ACCOUNT_ID | Cloudflare Dashboard โ Account ID (right sidebar) |
AI_GATEWAY_ID | AI โ AI Gateway โ Create gateway โ copy ID |
AI_GATEWAY_AUTH_TOKEN | My Profile โ API Tokens โ Create Token |
Once you have all credentials ready, click the button below to start the deployment wizard:
Deploy to CloudflareAfter deployment completes, you'll have three URLs:
# Admin Dashboard https://<your-worker>.workers.dev/admin/# Chat UI https://<your-worker>.workers.dev/#token=<your-token>
# Health check https://<your-worker>.workers.dev/healthz
Approve Your First Device:
- Open the Chat UI link above
- Open the Admin Dashboard โ Devices tab
- Click Approve on the pending device
- Return to Chat UI โ it should connect automatically
Admin Dashboard at /admin/ has three tabs:
Overview
Container status, uptime, memory usage
Devices
Manage paired devices, approve/revoke
CLI
Run commands inside the container
npx wrangler delete
Confirm you have access to the workshop Cloudflare account.
- Open the Cloudflare Dashboard and log in with the email you registered with.
- Check the invitation email from Cloudflare โ accept the invite to join the workshop account.
- Once logged in, verify you can see the workshop account in the account selector (top-left).
- Navigate to Workers & Pages โ you should see the Workers Paid plan is active.
Install the required tools on your machine.
1. Check Node.js (v18+):
node --version # Should output v18.x.x or higher 2. Install Wrangler CLI:
npm install -g wrangler
3. Login to Cloudflare:
wrangler login # Opens browser โ authorize the CLI wrangler whoami # Should show your email and the workshop account
Clone the OpenClaw R2 demo project and install dependencies:
git clone https://github.com/lllxpr/openclaw-cf-demo-r2.git cd openclaw-cf-demo-r2 npm install
1. Create an R2 bucket:
npx wrangler r2 bucket create openclaw-data
2. Configure local secrets:
cp .dev.vars.example .dev.vars
Edit .dev.vars with your values:
GATEWAY_AUTH_TOKEN=your-secret-token AI_GATEWAY_ACCOUNT_ID=your-account-id AI_GATEWAY_ID=your-gateway-id AI_GATEWAY_AUTH_TOKEN=your-api-token
| Variable | How to Get |
|---|---|
GATEWAY_AUTH_TOKEN | openssl rand -hex 16 |
AI_GATEWAY_ACCOUNT_ID | Dashboard โ Account ID |
AI_GATEWAY_ID | AI โ AI Gateway โ copy ID |
AI_GATEWAY_AUTH_TOKEN | My Profile โ API Tokens |
3. Set production secrets:
npx wrangler secret put GATEWAY_AUTH_TOKEN npx wrangler secret put AI_GATEWAY_ACCOUNT_ID npx wrangler secret put AI_GATEWAY_ID npx wrangler secret put AI_GATEWAY_AUTH_TOKEN
1. Deploy to Cloudflare:
npm run deploy
2. Access your deployment:
# Admin Dashboard https://<your-worker>.workers.dev/admin/# Chat UI https://<your-worker>.workers.dev/#token=<your-token>
# Health check https://<your-worker>.workers.dev/healthz
3. Approve your first device:
- Open the Chat UI link above
- Open the Admin Dashboard โ Devices tab
- Click Approve on the pending device
- Return to Chat UI โ it should connect automatically
Admin Dashboard at /admin/ has three tabs:
Overview
Container status, uptime, memory usage
Devices
Manage paired devices, approve/revoke
CLI
Run commands inside the container
npx wrangler delete
Troubleshooting
.dev.vars has all required variables. Ensure GATEWAY_AUTH_TOKEN is set.
/persist/status endpoint.
wrangler.toml configuration. Try wrangler login --browser then wrangler logout to reset auth.
Lab Complete!
Congratulations โ you've deployed your own AI agent on Cloudflare!