MahanAzadBeast/moltbot-worker-david2
Experimental deployment of OpenClaw AI assistant on Cloudflare Workers. TypeScript-based gateway architecture with device pairing, multi-channel support.
Originally published:
OpenClaw on Cloudflare Workers: An Experimental AI Assistant Deployment
The moltbot-worker-david2 project by MahanAzadBeast represents an experimental implementation of OpenClaw (formerly known as Moltbot and Clawdbot) running entirely on Cloudflare's Worker infrastructure. This TypeScript-based proof of concept demonstrates the feasibility of deploying a personal AI assistant with gateway architecture in a fully managed, serverless environment without traditional self-hosting requirements.
As clearly stated in the project documentation, this is an experimental implementation not officially supported by OpenClaw, and users should expect potential breaking changes. The repository shows recent activity as of February 2026, indicating ongoing development work.
cloudflare-workersCore Features and Capabilities
OpenClaw provides a comprehensive personal AI assistant solution with several distinctive architectural features:
- Gateway Architecture: A centralized gateway connects to multiple chat platforms including Telegram, Discord, and Slack
- Control UI: Web-based chat interface accessible directly through the gateway endpoint
- Device Pairing System: Security-focused authentication requiring explicit approval for each connecting device through an admin interface
- Persistent Conversations: Chat history and context maintained across sessions when R2 storage is configured
- Agent Runtime: Extensible AI capabilities with workspace management and skill integration
- Multi-Channel Support: Unified interface for managing conversations across different communication platforms
The Cloudflare Workers deployment packages these capabilities into a fully managed, always-on solution leveraging Cloudflare's infrastructure including Browser Rendering for navigation tasks, optional AI Gateway for API routing and analytics, and R2 Storage for data persistence.
anthropic-claudeInstallation and Setup Process
Deploying this project requires a Cloudflare Workers Paid plan ($5 USD/month) to access Cloudflare Sandbox containers, plus an Anthropic API key for Claude access. The setup process involves several critical steps:
After installing dependencies with npm install, users must configure API credentials either through direct Anthropic access or via Cloudflare AI Gateway. A gateway token must be generated using OpenSSL and stored as a Wrangler secret—this token is essential for accessing the Control UI remotely.
The deployment architecture requires mandatory Cloudflare Access configuration to protect the admin UI at /_admin/. This involves enabling Cloudflare Access on the workers.dev domain, configuring identity providers (email, Google, GitHub, etc.), and setting the appropriate Access secrets including the team domain and Application Audience tag.
Device pairing represents a critical security feature: when new devices connect to the gateway, connections are held pending until explicitly approved through the admin interface. For local development, a .dev.vars file with DEV_MODE=true can bypass authentication requirements.
Technical Stack Analysis
The project is built entirely in TypeScript, leveraging modern tooling and Cloudflare's edge computing platform:
- Runtime: Cloudflare Workers with Sandbox container support
- Build Tools: Vite for frontend bundling, Vitest for testing
- Configuration: Wrangler for Cloudflare deployment management
- Authentication: Cloudflare Access with JWT validation
- Storage: Optional R2 object storage for persistence
- AI Integration: Anthropic Claude via direct API or Cloudflare AI Gateway
- Infrastructure: Browser Rendering API for browser automation tasks
The architecture demonstrates sophisticated understanding of Cloudflare's ecosystem, integrating multiple services within their free and paid tiers. The inclusion of Docker configuration suggests containerization support, while the comprehensive documentation files (AGENTS.md, SETUP_GUIDE.md, DEPLOYMENT_SUMMARY.md) indicate attention to developer experience.
cloudflare-ai-gatewayCommunity and Development Status
As of February 2026, the repository shows minimal community engagement with 0 stars, 0 forks, and 0 watchers. The project has no open issues and contains a single commit, suggesting it's either a very recent release or a private fork made public. The absence of a license may limit adoption by organizations requiring clear usage terms.
The repository lacks topic tags that would improve discoverability on GitHub, and the project has not been archived, indicating active or intended development. The most recent push occurred on February 7, 2026, demonstrating current activity.
Comparison with Alternative Approaches
Traditional AI assistant deployments typically require dedicated server infrastructure, container orchestration platforms like Kubernetes, or virtual private servers. This Cloudflare Workers approach offers several distinctive advantages:
Advantages: Zero server maintenance, automatic scaling, global edge distribution, integrated security through Cloudflare Access, and predictable pricing starting at $5/month. The serverless model eliminates concerns about server provisioning, operating system updates, and infrastructure monitoring.
Trade-offs: The experimental nature means no official support, potential breaking changes, and cold start latency (1-2 minutes on first request). Users are constrained by Cloudflare's execution limits and must work within the Workers runtime environment rather than having full system access.
For developers prioritizing minimal operational overhead and already invested in the Cloudflare ecosystem, this approach provides an innovative deployment pathway. However, production users requiring stability guarantees may prefer traditional self-hosted OpenClaw deployments or officially supported cloud platforms.
serverless-ai-deploymentOriginal Source
https://github.com/MahanAzadBeast/moltbot-worker-david2
Last updated: