Skip to main content
Project 5 min read

DarkRefuze/moltbot-sandbox-main

OpenClaw AI assistant running on Cloudflare Workers. Deploy a personal AI chatbot with Claude integration, multi-platform support, and serverless architect

Originally published:

GitHub by DarkRefuze

OpenClaw on Cloudflare Workers: A Comprehensive Review

DarkRefuze/moltbot-sandbox-main is an experimental deployment of OpenClaw (formerly known as Moltbot and Clawdbot) that runs entirely within Cloudflare's serverless infrastructure. This proof-of-concept demonstrates how a fully-featured personal AI assistant can operate in a Cloudflare Sandbox environment, offering a managed, always-on deployment without the need for traditional server hosting.

cloudflare workers

What is OpenClaw?

OpenClaw is a personal AI assistant built with a gateway architecture that connects to multiple chat platforms simultaneously. The platform provides a web-based Control UI at the gateway level and supports multi-channel communication including Telegram, Discord, and Slack. Key features include device pairing with secure DM authentication requiring explicit approval, persistent conversations with chat history maintained across sessions, and an extensible agent runtime with workspace and skills capabilities.

This implementation packages OpenClaw to run in a Cloudflare Sandbox container, eliminating the complexity of self-hosting while providing enterprise-grade infrastructure. Optional R2 storage integration enables persistence across container restarts, ensuring your conversation history and paired devices remain intact.

ai assistant

Features Overview

  • Serverless Deployment: Runs entirely on Cloudflare Workers infrastructure with no server management required
  • Multi-Platform Support: Integrates with Telegram, Discord, and Slack for unified AI assistant access
  • Secure Authentication: Cloudflare Access integration protects the admin UI with enterprise-grade identity management
  • Persistent Storage: Optional R2 storage backend for conversation history and device pairings
  • Claude Integration: Direct Anthropic API access or routing through Cloudflare AI Gateway
  • Browser Automation: Cloudflare Browser Rendering support for web navigation capabilities
  • Device Pairing: Secure DM authentication system requiring explicit approval for each device
anthropic claude

Installation and Setup

Setting up this project requires a Cloudflare Workers Paid plan ($5 USD/month) for Sandbox container access and an Anthropic API key for Claude integration. The installation process is straightforward using npm and the Wrangler CLI tool.

After installing dependencies with npm install, you'll need to configure several secrets including your Anthropic API key (or Cloudflare AI Gateway credentials) and a gateway token generated using OpenSSL. The gateway token is critical for accessing the Control UI and must be saved securely.

Deployment is handled with npm run deploy, after which the Control UI becomes accessible at your worker's URL with the token parameter. However, the first request may take 1-2 minutes as the container initializes.

A crucial post-deployment step involves configuring Cloudflare Access to protect the admin UI at /_admin/. This requires enabling Cloudflare Access on your workers.dev domain, configuring authentication providers, and setting the CF_ACCESS_TEAM_DOMAIN and CF_ACCESS_AUD secrets. Only after completing these steps can you pair devices and fully utilize the assistant.

cloudflare workers deployment

Technology Stack Analysis

The project is built with TypeScript and leverages Vite for development and building. The tech stack integrates deeply with Cloudflare's ecosystem, utilizing Workers for compute, Sandbox containers for isolated execution, R2 for object storage, Browser Rendering for web automation, and AI Gateway for API routing and analytics.

The repository includes comprehensive configuration files including wrangler.jsonc for Workers configuration, vite.config.ts and vitest.config.ts for build and testing, and .oxlintrc.json and .oxfmtrc.json for code quality. A Dockerfile is present for containerization, and the start-openclaw.sh script handles container startup.

The architecture utilizes a standard-1 Cloudflare Container instance with 1/2 vCPU, 4 GiB memory, and 8 GB disk. This configuration provides adequate resources for a personal AI assistant while keeping costs manageable.

typescript

Cost Analysis

Running this project 24/7 incurs approximate monthly costs of $34.50, broken down as follows: $26/month for memory (4 GiB provisioned), $2/month for CPU at estimated 10% utilization, $1.50/month for disk storage, plus the $5/month Workers Paid plan base fee.

However, costs can be significantly reduced by configuring the SANDBOX_SLEEP_AFTER parameter to put the container to sleep during idle periods. A container running only 4 hours daily would cost approximately $5-6/month in compute costs plus the base plan fee, making this a cost-effective solution for intermittent use.

cloudflare r2

Community and Development Status

As of the last update in February 2026, this repository shows 0 stars, 0 forks, and 0 watchers, indicating it's a very new or personal project. With 0 open issues, the project appears to be in early experimental stages. The repository is not archived and is actively maintained, with the most recent push occurring on February 7, 2026.

The project is licensed under Apache-2.0, providing permissive open-source terms. Documentation includes README.md, AGENTS.md, and CONTRIBUTING.md files, suggesting the author has structured the project for potential collaboration despite the current lack of community engagement.

Comparison with Alternatives

Compared to traditional self-hosted AI assistants, this Cloudflare Workers implementation offers significant advantages in deployment simplicity and infrastructure management. Unlike platforms requiring Docker containers on VPS servers or Kubernetes clusters, this solution provides instant deployment with enterprise-grade infrastructure.

However, the experimental nature and explicit warning that it "may break without notice" positions it differently from production-ready alternatives like Botpress or Rasa. The cost structure also differs significantly—while traditional hosting might offer flat-rate pricing, the Cloudflare approach uses consumption-based billing that scales with usage.

For users already invested in the Cloudflare ecosystem, this implementation offers seamless integration with existing Access policies, R2 storage buckets, and AI Gateway configurations. The trade-off is vendor lock-in and dependency on Cloudflare's Sandbox container availability.

chatbot frameworks

Conclusion

DarkRefuze/moltbot-sandbox-main represents an innovative approach to deploying personal AI assistants on serverless infrastructure. While marked as experimental and not officially supported, it demonstrates the viability of running complex AI applications in Cloudflare's Sandbox environment. For developers comfortable with the Cloudflare ecosystem and seeking a managed deployment option, this project offers a compelling alternative to traditional self-hosting, albeit with considerations around cost optimization and production readiness.

Share:

Original Source

https://github.com/DarkRefuze/moltbot-sandbox-main

View Original

Last updated: