This is a submission from user TechRules:
Prerequisites
ClawCloud Run is a lightweight application development and deployment platform that supports Docker containerized applications. Before deploying Moltbot, ensure you have the following ready:
- Account: A registered and logged-in ClawCloud Run account. Select a region close to your user base for optimal latency.
- Docker Image: The official Moltbot Docker image (
moltbot/moltbot). - Domain: Your own domain name (Optional, but recommended).
- Resources: An application instance with at least 2 vCPUs and 4GB of RAM.
- API Keys: Valid model API keys (e.g., OpenAI or Anthropic).
Deployment Steps
Step 1: Create an Application
Log in to the ClawCloud Run console, create a new application, set your desired application name, and select your region.
Step 2: Configure the Docker Image
Select “Public Image” and enter the image name: moltbot/moltbot:latest. Choose a Fixed Instance type and allocate at least 2 vCPUs and 4GB of RAM.
Step 3: Network Configuration
Set the container port to 18789 and enable Public Access. ClawCloud will automatically assign a public domain to your instance.
Step 4: Environment Variables & Data Persistence
In the Advanced Configuration section, add the following Environment Variables:
CLAWDBOT_GATEWAY_TOKEN: A secure token used for authenticating with the control panel (you define this).ANTHROPIC_API_KEYand/orOPENAI_API_KEY: Your LLM provider keys.
Next, configure Persistent Storage (Volume Mounting) to ensure data is saved:
- Mount Path:
/root/.clawdbot(Stores configuration and identity files) - Mount Path:
/root/clawd(Stores working directory and logs)
Step 5: Launch Application
Click “Deploy” to start the application. Once the status changes to Running, you can access the service using the assigned domain + port 18789.
Note: Upon your first visit, you will be prompted to enter the CLAWDBOT_GATEWAY_TOKEN you defined in Step 4 to complete the pairing process.
Common Configuration Variables
CLAWDBOT_GATEWAY_TOKEN: Token for pairing the control panel user.ANTHROPIC_API_KEY/OPENAI_API_KEY: Keys for model inference.TZ: Timezone setting (e.g.,America/New_York,Europe/London, orAsia/Shanghai).
If needed, you can further customize skills or configurations via the persistent storage volumes.
Security Best Practices
- Strong Token: Use a high-entropy string for your
CLAWDBOT_GATEWAY_TOKEN. Do not leave this open or guessable. - Protect API Keys: Never expose your model API keys to third parties.
- Access Control: When integrating with relay platforms, configure whitelists to restrict user access to trusted sources only.
Troubleshooting / FAQ
- Instance Restarts Unexpectedly: Check that your API keys are set correctly and are valid.
- Control Panel Inaccessible: Ensure the domain is correct and DNS propagation has completed.
- Pairing Required: Enter your
CLAWDBOT_GATEWAY_TOKENin the control panel interface when prompted. - No Response from Model: Ensure your API keys are valid and your billing plan with the provider (OpenAI/Anthropic) allows for usage.
Once the environment is properly prepared, deploying Moltbot on ClawCloud Run is highly efficient. After a successful deployment, you can integrate Moltbot into communication streams like Telegram or expand its capabilities for automated collaboration.