Skip to main content
Project 5 min read

2504VDM/moltbot-sandbox

OpenClaw on Cloudflare Workers: experimental TypeScript AI assistant with multi-channel support, device pairing, and serverless deployment. $34.50/mo.

Originally published:

GitHub by 2504VDM

OpenClaw on Cloudflare Workers: A Personal AI Assistant in the Cloud

The moltbot-sandbox project by 2504VDM represents an experimental proof-of-concept that brings OpenClaw (formerly known as Moltbot and Clawdbot) to Cloudflare's serverless infrastructure. This implementation demonstrates how a sophisticated personal AI assistant can run entirely within Cloudflare Sandbox containers, eliminating the need for traditional self-hosting while leveraging enterprise-grade cloud infrastructure.

As an experimental project licensed under Apache-2.0, moltbot-sandbox showcases the flexibility of modern serverless architectures for AI applications, though it comes with a clear disclaimer: this is not officially supported and may break without notice. For developers exploring cloudflare-workers deployment patterns or ai-assistants architectures, this project offers valuable insights.

What is OpenClaw?

OpenClaw is a personal AI assistant built with a gateway architecture that enables multi-channel connectivity. The platform supports multiple chat interfaces including Telegram, Discord, and Slack, all managed through a centralized web-based Control UI. Key capabilities include:

  • Device Pairing: Secure direct message authentication requiring explicit approval before any device can interact with your assistant
  • Persistent Conversations: Complete chat history and context retention across sessions
  • Agent Runtime: Extensible AI capabilities with customizable workspace and skills
  • Multi-Channel Support: Unified interface for managing conversations across different platforms

The moltbot-sandbox implementation packages these features specifically for Cloudflare's infrastructure, providing an always-on deployment model with optional R2 storage for persistence across container restarts.

Technical Architecture and Stack

Built with TypeScript, the project leverages several Cloudflare services to create a complete AI assistant infrastructure:

Core Technologies

  • Cloudflare Sandbox Containers: Runs on standard-1 instances (1/2 vCPU, 4 GiB memory, 8 GB disk)
  • Cloudflare Workers: Requires the paid plan ($5 USD/month) for container access
  • Browser Rendering: Enables web navigation capabilities via the cloudflare-browser skill
  • AI Gateway: Optional routing and analytics for AI API calls with unified billing support
  • R2 Storage: Optional persistent storage for paired devices and conversation history
  • Cloudflare Access: Zero Trust authentication protecting the admin interface

The project includes configuration files for Vite, Vitest, Docker, and Wrangler, indicating a modern development setup with testing infrastructure and containerization support. The presence of both .oxfmtrc.json and .oxlintrc.json suggests the use of oxc-toolchain for fast code formatting and linting.

Installation and Setup

Setting up moltbot-sandbox requires several configuration steps. First, developers need a Cloudflare Workers paid plan and either an Anthropic API key for direct Claude access or Cloudflare AI Gateway credentials for unified billing. The installation process involves:

Installing dependencies via npm, configuring API credentials using Wrangler secrets, generating a secure gateway token for remote access, and deploying to Cloudflare Workers. The initial container startup can take 1-2 minutes on the first request.

Critical post-deployment steps include configuring Cloudflare Access to protect the admin UI at /_admin/ and pairing devices through the authenticated admin interface. Without these steps, the Control UI remains inaccessible even after successful deployment.

Cost Considerations

The project provides transparent cost estimates for 24/7 operation. Running the standard-1 container continuously costs approximately $34.50/month, broken down as: $26/month for memory (4 GiB provisioned), ~$2/month for CPU at 10% utilization, ~$1.50/month for disk storage, plus the $5/month Workers paid plan.

Importantly, CPU billing is usage-based rather than capacity-based, making the assistant cost-efficient for personal use. The SANDBOX_SLEEP_AFTER configuration option enables significant cost reduction by putting the container to sleep during idle periods. A container running only 4 hours daily would cost roughly $5-6/month in compute resources beyond the base plan fee.

Community and Development Status

As of February 2026, the repository shows minimal community engagement with 0 stars, 0 forks, and 0 watchers. The project is not archived and was last updated on February 7, 2026, indicating active development. With 0 open issues and recent commits, the project appears to be in early experimental stages.

The repository includes comprehensive documentation files (AGENTS.md, CONTRIBUTING.md) and a startup script (start-openclaw.sh), suggesting the maintainer is building infrastructure for future contributors despite the current lack of community involvement.

Comparison with Alternatives

Unlike traditional self-hosted AI assistants that require server management, moltbot-sandbox leverages serverless infrastructure for simplified operations. Compared to langchain-deployments or other chatbot-frameworks, this project uniquely focuses on Cloudflare's ecosystem, offering advantages in edge deployment and integrated security through Cloudflare Access.

The multi-channel gateway architecture distinguishes it from single-platform bots, while the device pairing system provides security features often missing in simpler implementations. However, the experimental nature and lack of official support make it more suitable for developers comfortable with bleeding-edge technology rather than production deployments.

Conclusion

The moltbot-sandbox project demonstrates the viability of running sophisticated AI assistants on serverless infrastructure. While experimental, it offers a compelling blueprint for developers interested in Cloudflare Workers, personal AI assistants, or serverless AI application architectures. The transparent cost modeling and comprehensive documentation make it an excellent learning resource, even as the project explicitly warns against production use. For developers exploring the intersection of serverless-ai and personal automation, this project provides valuable insights into modern deployment patterns.

Share:

Original Source

https://github.com/2504VDM/moltbot-sandbox

View Original

Last updated: