Cloud Native 7 min read

Run Clawdbot Without a Mac Mini Using Cloudflare’s Open‑Source Moltworker

Moltworker, Cloudflare’s open‑source middleware, lets you host the openclaw (Clawdbot) AI assistant on the edge for just $5 a month, offering multi‑platform chat support, persistent storage, browser automation, and secure Zero Trust access, while outlining its simple deployment steps, strengths, and limitations.

Old Zhang's AI Learning
Old Zhang's AI Learning
Old Zhang's AI Learning
Run Clawdbot Without a Mac Mini Using Cloudflare’s Open‑Source Moltworker

What is Moltworker

Moltworker is an open‑source Cloudflare project that packages adaptation scripts and middleware Workers to run the Moltbot AI assistant on Cloudflare’s Sandbox SDK and developer platform APIs.

Moltworker architecture diagram
Moltworker architecture diagram

Architecture

Entry Worker : API router and proxy handling all requests.

Sandbox container : Executes the standard Moltbot Gateway runtime and integrations.

R2 storage : Persists conversation history, configuration and paired‑device information.

Zero Trust Access : Secures the Admin UI and API.

Core features

Multi‑platform chat support : Native integration with Telegram, Discord, Slack and a web Control UI, allowing the assistant to be controlled from any of these clients.

Device pairing and secure authentication : Devices must be explicitly approved via the Admin UI before they can connect, preventing unauthorized use.

Persistent conversation memory : Cloudflare R2 stores dialogue history and configuration across container restarts.

Browser automation : Uses Cloudflare Browser Rendering to navigate pages, fill forms, capture screenshots and record videos. The article shows a screenshot of Moltbot querying Google Maps and posting the result to Slack, followed by a video‑recording example.

Moltbot browser automation demo
Moltbot browser automation demo
Moltbot video recording
Moltbot video recording

AI Gateway unified management : Centralizes API keys, visualizes token costs, provides automatic fallback on provider failures and supports unified billing across multiple AI services.

AI Gateway
AI Gateway

Installation and deployment

Prerequisites: Cloudflare account, Workers Paid plan ($5 / month), and either an Anthropic API key or AI Gateway billing credentials.

Quick start commands

# Install dependencies
npm install

# Set Anthropic API key
npx wrangler secret put ANTHROPIC_API_KEY

# Or set AI Gateway credentials (choose one)
# npx wrangler secret put AI_GATEWAY_API_KEY
# npx wrangler secret put AI_GATEWAY_BASE_URL

# Generate gateway token
export MOLTBOT_GATEWAY_TOKEN=$(openssl rand -hex 32)
echo "Your gateway token: $MOLTBOT_GATEWAY_TOKEN"
echo "$MOLTBOT_GATEWAY_TOKEN" | npx wrangler secret put MOLTBOT_GATEWAY_TOKEN

# Deploy
npm run deploy

After deployment, the worker is reachable at:

https://your-worker.workers.dev/?token=YOUR_GATEWAY_TOKEN

Initial startup may take 1–2 minutes while the container launches.

Configure chat channels (examples)

# Telegram
npx wrangler secret put TELEGRAM_BOT_TOKEN
npm run deploy

# Discord
npx wrangler secret put DISCORD_BOT_TOKEN
npm run deploy

# Slack
npx wrangler secret put SLACK_BOT_TOKEN
npx wrangler secret put SLACK_APP_TOKEN
npm run deploy

Limitations

PoC status: Cloudflare states Moltworker is a proof‑of‑concept and may break without notice.

Locked to Cloudflare ecosystem: cannot be run on other cloud providers.

Claude‑first model: Moltbot defaults to Claude; using other models requires additional configuration.

Repository and reference

https://github.com/cloudflare/moltworker

https://blog.cloudflare.com/moltworker-self-hosted-ai-agent/

Edge computingOpen-sourceAI Agentzero trustCloudflare WorkersMoltworker
Old Zhang's AI Learning
Written by

Old Zhang's AI Learning

AI practitioner specializing in large-model evaluation and on-premise deployment, agents, AI programming, Vibe Coding, general AI, and broader tech trends, with daily original technical articles.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.