If you have been following the tech news cycle this week, you know that Moltbot (the project formerly known as Clawdbot) has absolutely exploded in popularity. Following the sudden rebrand on January 27, 2026—prompted by trademark concerns from Anthropic—this open-source AI agent has become the de facto “Jarvis” for developers and power users.
But with great power comes great responsibility. Moltbot is designed to have full system access. It can execute shell commands, manage files, and automate your desktop. Running this on your bare metal OS (Windows, macOS, or Linux) without sandboxing is a massive security risk, echoing many common cybersecurity challenges faced by small businesses today. If the agent hallucinates or is prompted maliciously, it could delete files or expose keys.
This is why installing Moltbot on Docker is not just an option—it is the only recommended way to run it safely. In this guide, we will walk you through a production-ready, hardened installation of Moltbot using Docker and Docker Compose.
Why You Should Run Moltbot in Docker
Before we dive into the terminal, it is crucial to understand the architecture. Moltbot operates as a Gateway that connects messaging platforms (like WhatsApp, Telegram, and Signal) to a local coding agent. It effectively gives an LLM (like Claude 3.5 Sonnet or GPT-4) hands to type on your keyboard and execute commands.
- Isolation: Docker creates a containerized environment. If Moltbot tries to run
rm -rf /, it only destroys the container, not your host OS. - Dependency Management: Moltbot requires Node.js 22.12.0+ and specific system libraries. Docker handles this automatically, keeping your host clean.
- Data Persistence: By using Docker volumes, you ensure that Moltbot’s “long-term memory” (one of its killer features) is preserved even if you update the container.
Prerequisites
To follow this guide, you will need:
- A machine running Linux, macOS, or Windows (with WSL2 enabled).
- Docker Desktop or Docker Engine installed and running.
- An API Key for your LLM provider (Anthropic API key is recommended for the best performance with Moltbot).
Step-by-Step Installation Guide
We will use Docker Compose for this setup. It is cleaner than running long single-line Docker commands and makes updating the bot significantly easier.
Step 1: Create Your Project Directory
Open your terminal and create a dedicated folder for Moltbot. This will house your configuration files and persistent data.
mkdir moltbot-docker
cd moltbot-docker
Step 2: Create the Docker Compose File
Create a file named docker-compose.yml in this directory. Paste the following configuration, which includes the security hardening flags recommended by the community:
version: '3.8'
services:
moltbot:
image: moltbot/moltbot:latest
container_name: moltbot_agent
restart: unless-stopped
# Security Hardening: Drop all capabilities and read-only root
cap_drop:
- ALL
read_only: true
security_opt:
- no-new-privileges:true
volumes:
# Persist configuration and memory
- ./data:/app/data
# Optional: Mount a specific 'sandbox' folder for the bot to work in
- ./sandbox:/app/sandbox
# Mount a temp directory since root is read-only
- /tmp:/tmp
environment:
- NODE_ENV=production
# You can pass API keys here or use a .env file
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
ports:
- "3000:3000" # Web UI (if enabled)
Step 3: Configuration and Environment Variables
Create a .env file in the same directory to store your secrets securely. Never hardcode API keys directly into the YAML file if you plan to share it.
# .env file
ANTHROPIC_API_KEY=sk-ant-api03-...
# Add other provider keys if necessary (OpenAI, Gemini, etc.)
Step 4: Initial Run and Setup
Now, pull the latest image and start the container in detached mode:
docker-compose up -d
Once the container is running, you need to link your messaging apps. View the logs to see the initialization code or QR code:
docker logs -f moltbot_agent
You should see the Moltbot ASCII art (or the new “Molty” lobster mascot). Follow the terminal prompts to authenticate your messaging platform (e.g., scanning a WhatsApp QR code or entering a Telegram bot token).
Security Hardening: Best Practices
Since Moltbot is an agentic tool, you want to limit its blast radius. The Docker Compose file above includes read_only: true and cap_drop: - ALL. This prevents the bot from modifying system files inside the container or escalating privileges.
Pro Tip: Only map the volumes you want the bot to access. In our example, we mapped a ./sandbox folder. Instruct Moltbot to perform all file operations within /app/sandbox. This guarantees it cannot accidentally edit your personal documents or system configurations.
Updating Moltbot
Given how fast the project is moving (updates are dropping daily to fix the rebranding migration issues), you will want to update frequently. With Docker Compose, this is effortless:
docker-compose pull
docker-compose up -d
Frequently Asked Questions (FAQ)
Is Moltbot the same as Clawdbot?
Yes. On January 27, 2026, the creator rebrand the project from Clawdbot to Moltbot following a trademark request from Anthropic (due to the similarity to “Claude”). The core functionality remains identical, but the package names and GitHub repository have changed to moltbot.
Does this work on Windows?
Yes, but you must use WSL2 (Windows Subsystem for Linux). Running Docker directly on the Windows legacy backend often causes path mounting issues with Node.js applications. Install Ubuntu on WSL2 and follow the Linux steps above.
Is Moltbot free?
The software itself is open-source (MIT License). However, you must pay for the API usage of the LLM provider (e.g., Anthropic or OpenAI). Because Moltbot maintains “long-term memory” and processes heavy context, API costs can range from $10 to $50/month depending on your usage.
Can Moltbot access files outside Docker?
No. This is the main benefit of this guide. By default, the container cannot see your host’s filesystem unless you explicitly mount it via the volumes section in the Docker Compose file.
Conclusion
The rise of Moltbot marks a significant shift towards local, personalized AI agents. It effectively bridges the gap between a chatbot and a true digital assistant. However, the “God mode” capabilities that make it so powerful are also its biggest liability.
By installing Moltbot on Docker, you ensure that you can experiment with the bleeding edge of AI automation without risking your personal data or system stability. Secure your keys, mount your volumes carefully, and enjoy your new lobster-themed assistant.


