--- 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.
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**