--- summary: "Moltmates - Multi-user Moltbot fork with isolated Docker sandboxes" read_when: - Learning about Moltmates vs Moltbot - Setting up multi-user AI assistants - Understanding sandboxed execution --- # 🦞 Moltmates > **Multi-user Moltbot with isolated Docker sandboxes** β€” Give everyone their own AI assistant, safely.

Moltmates

One server. Many users. Zero trust issues.

--- ## What is Moltmates? **Moltmates** is a fork of [Moltbot](https://github.com/moltbot/moltbot) designed for **multi-user deployments** where you want to give friends, family, or team members their own AI assistant β€” without worrying about data leakage or security. | Feature | Moltbot | Moltmates | |---------|---------|-----------| | Users | Single user | Multiple users | | Isolation | Shared context | Per-user workspaces | | Execution | Host system | Docker sandbox | | Personas | One persona | Per-user personas | | Memory | Shared | Isolated per user | | Security | Trust-based | Zero-trust sandbox | --- ## Key Features ### 🐳 Docker Sandboxing Every agent runs in an isolated container: ``` User A sends: "cat /etc/passwd" β†’ Only sees sandbox /etc/passwd β†’ No host access User B sends: "rm -rf /" β†’ Only affects their sandbox β†’ Rebuilt on restart ``` ### πŸ‘₯ Per-User Workspaces Each user gets their own space: ``` ~/.moltmate/users/telegram_{ID}/ β”œβ”€β”€ SOUL.md # Their bot's personality β”œβ”€β”€ USER.md # Their profile β”œβ”€β”€ IDENTITY.md # Bot name/avatar β”œβ”€β”€ MEMORY.md # Important notes └── memory/ # Daily conversation logs ``` ### 🎭 Persona Selection Users choose their AI's personality on first message: ``` Hey! πŸ‘‹ Ich bin dein neuer AI Companion. Wie soll ich sein? 1. ✨ Custom - Du beschreibst meine PersΓΆnlichkeit! 2. 🦎 Cami - Warm, locker, passt sich an 3. πŸ¦€ Molty - Direkt, zuverlΓ€ssig Oder erzΓ€hl mir einfach wie ich sein soll... ``` ### πŸ”’ Restricted Execution Commands are allowlisted: ```json { "exec": { "security": "allowlist", "safeBins": ["cat", "head", "tail", "grep", "wc", "pdftotext"] } } ``` --- ## Quick Start ### 1. Clone & Build ```bash git clone https://github.com/YOUR_FORK/moltmates cd moltmates pnpm install pnpm build ``` ### 2. Build Sandbox Image ```bash docker build -f Dockerfile.sandbox -t moltmate-sandbox:bookworm-slim . ``` ### 3. Configure ```bash cp ~/.moltmate/moltmate.example.json ~/.moltmate/moltmate.json # Edit with your tokens and settings ``` ### 4. Start ```bash # Development pnpm dev # Production (systemd) systemctl start moltmate ``` --- ## Architecture ``` Telegram/WhatsApp/Discord β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Moltmates Gateway β”‚ β”‚ (user routing + sessions) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β” β–Ό β–Ό β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ User A β”‚ β”‚ User B β”‚ β”‚ User C β”‚ β”‚ Docker β”‚ β”‚ Docker β”‚ β”‚ Docker β”‚ β”‚ Sandbox β”‚ β”‚ Sandbox β”‚ β”‚ Sandbox β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` --- ## Configuration ### Essential Settings ```json { "sandbox": { "mode": "all", "scope": "session", "workspaceAccess": "rw" }, "channels": { "telegram": { "botToken": "YOUR_BOT_TOKEN", "dmPolicy": "allowlist", "allowFrom": ["USER_ID_1", "USER_ID_2"] } }, "tools": { "allow": ["read", "write", "edit", "exec", "web_search", "web_fetch"], "exec": { "security": "allowlist", "safeBins": ["cat", "head", "tail", "grep", "wc"] } } } ``` ### Adding Users 1. Add their Telegram ID to `allowFrom` 2. Restart: `systemctl restart moltmate` 3. They message the bot β†’ onboarding starts --- ## Comparison to Alternatives | Solution | Isolation | Setup | Cost | |----------|-----------|-------|------| | ChatGPT Plus | None (OpenAI sees all) | Easy | $20/mo/user | | Claude Pro | None (Anthropic sees all) | Easy | $20/mo/user | | Self-hosted LLM | Full | Hard | Hardware | | **Moltmates** | Full (Docker) | Medium | API costs only | --- ## Use Cases - **Family** β€” Give kids/parents their own AI helper - **Team** β€” Shared assistant without data leakage - **Friends** β€” Let friends try AI without accounts - **Testing** β€” Isolated environments for experiments - **Education** β€” Each student gets their own assistant --- ## Links - [FAQ](/moltmates/faq) β€” Common questions answered - [Setup Guide](/moltmates/setup) β€” Detailed installation - [Security](/moltmates/security) β€” How isolation works - [Personas](/moltmates/personas) β€” Customizing bot personalities --- ## Credits Built on [Moltbot](https://github.com/moltbot/moltbot) β€” the best personal AI assistant. **Made with 🦞 by the community**