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 โ€”

Toolkit ๆ›ดๆ–ฐๆ–ผ 2026/4/27 ไธ‹ๅˆ3:47:50 ไฝœ่€…๏ผšsystem

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.

Deepen customer engagement
Hands-on product experience
Generate new business leads
Showcase developer platform

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 GitHub

One-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

.oc-p{fill:none;stroke-width:2;stroke-dasharray:8 4;stroke-linecap:round;stroke-linejoin:round} .oc-p.fl{animation:ocd 1.5s linear infinite} @keyframes ocd{to{stroke-dashoffset:-24}} CLIENTS ๐Ÿ’ป Browser OpenClaw UI ๐Ÿ‘ท Admin Dashboard ๐Ÿ›  IDE Cline / Cursor CLOUDFLARE WORKER โšก Worker Router Route / Auth /openai/v1/* โ†’ AI Gateway Workers AI Proxy /* โ†’ OpenClaw Control Coding UI (:18789) /admin/* โ†’ Mgmt Server Dashboard / API / CLI /persist/* โ†’ R2 Snapshot Save / Restore AI SERVICES ๐Ÿ”ฌ AI Gateway Logs / Cache / Rate Limit ๐Ÿง  Workers AI Kimi K2.5 โ€” 131K context CONTAINER (Durable Object) ๐Ÿ’ป OpenClaw Gateway alpine/openclaw:main ๐Ÿ›  Mgmt Server (:18700) Monitor / Device Mgmt / CLI PERSISTENCE ๐Ÿ“ฆ R2 โ€” openclaw-data Pairing / Chat History / Snapshots

Choose Your Deployment Path

1
Verify Your Access
~5 min

Confirm you have access to the workshop Cloudflare account.

  1. Open the Cloudflare Dashboard and log in with the email you registered with.
  2. Check the invitation email from Cloudflare โ€” accept the invite to join the workshop account.
  3. Once logged in, verify you can see the workshop account in the account selector (top-left).
  4. Navigate to Workers & Pages โ€” you should see the Workers Paid plan is active.
Open Cloudflare Dashboard
2
Prepare GitHub Account
~2 min

You'll need a GitHub account to fork the repository.

Sign up for GitHub
3
Prepare API Credentials
~10 min

You'll need the following values ready before deployment:

VariableHow 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
4
Deploy to Cloudflare
~5 min

Once you have all credentials ready, click the button below to start the deployment wizard:

Deploy to Cloudflare
Tip: The deploy wizard will fork the repo, build the container image in the cloud, and set up all bindings automatically. No local Docker needed!
5
Access Your Deployment
~5 min

After 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:

  1. Open the Chat UI link above
  2. Open the Admin Dashboard โ†’ Devices tab
  3. Click Approve on the pending device
  4. Return to Chat UI โ€” it should connect automatically
6
Explore & Cleanup
~10 min

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

Post-Workshop Cleanup: If you want to remove your deployment:

npx wrangler delete
1
Verify Your Access
~5 min

Confirm you have access to the workshop Cloudflare account.

  1. Open the Cloudflare Dashboard and log in with the email you registered with.
  2. Check the invitation email from Cloudflare โ€” accept the invite to join the workshop account.
  3. Once logged in, verify you can see the workshop account in the account selector (top-left).
  4. Navigate to Workers & Pages โ€” you should see the Workers Paid plan is active.
2
Environment Setup
~10 min

Install the required tools on your machine.

1. Check Node.js (v18+):

node --version  # Should output v18.x.x or higher
If not installed, download from nodejs.org (LTS recommended).

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
3
Clone & Install
~5 min

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
4
Create R2 Bucket & Configure Secrets
~10 min

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
VariableHow to Get
GATEWAY_AUTH_TOKENopenssl rand -hex 16
AI_GATEWAY_ACCOUNT_IDDashboard โ†’ Account ID
AI_GATEWAY_IDAI โ†’ AI Gateway โ†’ copy ID
AI_GATEWAY_AUTH_TOKENMy 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
5
Deploy & Access
~10 min

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:

  1. Open the Chat UI link above
  2. Open the Admin Dashboard โ†’ Devices tab
  3. Click Approve on the pending device
  4. Return to Chat UI โ€” it should connect automatically
6
Explore & Cleanup
~10 min

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

Post-Workshop Cleanup: If you want to remove your deployment:

npx wrangler delete

Troubleshooting

Container won't start? โ€” Check .dev.vars has all required variables. Ensure GATEWAY_AUTH_TOKEN is set.
R2 persistence failing? โ€” Verify the bucket exists via /persist/status endpoint.
Deployment errors? โ€” Check 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!