AI-powered Moltbot gateway running on Cloudflare Workers with free Groq LLM integration
- 🚀 Cloudflare Workers - Runs at the edge, globally distributed
- 🤖 Groq Integration - Free LLM API with Llama 3.3 70B (14,400 requests/day)
- 🔒 Secure - Token-based authentication with DEV_MODE support
- 🌐 WebSocket Support - Real-time chat interface with message streaming
- 💾 R2 Storage - Optional persistent storage for chat history
- 🎯 Admin UI - Built-in React dashboard for device management
- 🔧 Debug Routes - Development tools and API testing endpoints
- Go to console.groq.com
- Sign up for a free account
- Navigate to API Keys section
- Click Create API Key
- Copy your key (starts with
gsk_...)
git clone https://github.com/bitcoindefi/Open-Stellar.git
cd Open-Stellar
npm installCreate .dev.vars file:
# Groq Configuration
OPENAI_API_KEY=your_groq_api_key_here
OPENAI_BASE_URL=https://api.groq.com/openai/v1
MOLTBOT_GATEWAY_TOKEN=your_groq_api_key_here
# Development Settings
DEV_MODE=true
DEBUG_ROUTES=truenpm run build
npm run startVisit http://localhost:8789 in your browser.
Open Stellar automatically configures these Groq models:
- Llama 3.3 70B Versatile (Primary) - 131K context
- Llama 3.1 70B Versatile - 131K context
- Mixtral 8x7B - 32K context
- Gemma 2 9B - 8K context
Browser → Cloudflare Worker → Sandbox Container → Moltbot Gateway → Groq API
The worker proxies HTTP and WebSocket traffic to a Moltbot instance running in a Cloudflare Sandbox container, which then communicates with the Groq API.
AGENTS.md- Development guide for AI agentsREADME.md- This fileCREATE_OPEN_STELLAR.md- Repository setup guide
npm run dev # Start Vite dev server for UI development
npm run start # Start wrangler dev (local worker)
npm run build # Build worker + client
npm run deploy # Deploy to Cloudflare Workers
npm run test # Run tests with Vitest
npm run typecheck # TypeScript type checking- Cloudflare account
- Wrangler CLI configured
- Domain (optional, workers.dev provided by default)
# Set production secrets
npx wrangler secret put OPENAI_API_KEY
npx wrangler secret put MOLTBOT_GATEWAY_TOKEN
# Deploy
npm run deployYour worker will be available at https://your-worker.your-subdomain.workers.dev
- Never commit
.dev.varsto git (already in.gitignore) - Use
npx wrangler secret putfor production secrets - The
MOLTBOT_GATEWAY_TOKENshould match yourOPENAI_API_KEYfor simplicity - Enable Cloudflare Access for production deployments
| Variable | Description | Example |
|---|---|---|
OPENAI_API_KEY |
Your Groq API key | gsk_... |
OPENAI_BASE_URL |
Groq API endpoint | https://api.groq.com/openai/v1 |
MOLTBOT_GATEWAY_TOKEN |
Gateway authentication token | Same as API key |
| Variable | Description | Default |
|---|---|---|
DEV_MODE |
Skip authentication checks | false |
DEBUG_ROUTES |
Enable /debug/* endpoints |
false |
R2_ACCESS_KEY_ID |
R2 storage access key | - |
R2_SECRET_ACCESS_KEY |
R2 storage secret | - |
CF_ACCOUNT_ID |
Cloudflare account ID | - |
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details
- Built on Moltbot by Anthropic
- Powered by Groq for lightning-fast LLM inference
- Running on Cloudflare Workers
Made with ❤️ for the open source community