### Run Molt Bot Onboarding Source: https://docs.molt.bot/install Initiates the onboarding process for Molt Bot after installation, which is necessary if onboarding was skipped during the initial setup. ```bash moltbot onboard --install-daemon ``` -------------------------------- ### Install Binaries in Dockerfile Source: https://docs.molt.bot/platforms/hetzner This Dockerfile demonstrates how to install necessary binaries like gog, goplaces, and wacli at build time. It uses `apt-get` for system packages and `curl` with `tar` for downloading and extracting binaries directly into the image's PATH. This ensures that all required tools are available when the container starts, preventing runtime installation issues. ```dockerfile FROM node:22-bookworm RUN apt-get update && apt-get install -y socat && rm -rf /var/lib/apt/lists/* # Example binary 1: Gmail CLI RUN curl -L https://github.com/steipete/gog/releases/latest/download/gog_Linux_x86_64.tar.gz \ | tar -xz -C /usr/local/bin && chmod +x /usr/local/bin/gog # Example binary 2: Google Places CLI RUN curl -L https://github.com/steipete/goplaces/releases/latest/download/goplaces_Linux_x86_64.tar.gz \ | tar -xz -C /usr/local/bin && chmod +x /usr/local/bin/goplaces # Example binary 3: WhatsApp CLI RUN curl -L https://github.com/steipete/wacli/releases/latest/download/wacli_Linux_x86_64.tar.gz \ | tar -xz -C /usr/local/bin && chmod +x /usr/local/bin/wacli # Add more binaries below using the same pattern WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./ COPY ui/package.json ./ui/package.json COPY scripts ./scripts RUN corepack enable RUN pnpm install --frozen-lockfile COPY . . RUN pnpm build RUN pnpm ui:install RUN pnpm ui:build ENV NODE_ENV=production CMD ["node","dist/index.js"] ``` -------------------------------- ### Moltbot Multi-Client Legal Setup Example Source: https://docs.molt.bot/gateway/configuration Provides an example of a multi-client legal setup using Moltbot's `$include` directive. This configuration merges agent lists and broadcast configurations from different clients, demonstrating a practical application for organizing complex setups. ```json5 // ~/.clawdbot/moltbot.json { gateway: { port: 18789, auth: { token: "secret" } }, // Common agent defaults agents: { defaults: { sandbox: { mode: "all", scope: "session" } }, // Merge agent lists from all clients list: { "$include": [ "./clients/mueller/agents.json5", "./clients/schmidt/agents.json5" ]} }, // Merge broadcast configs broadcast: { "$include": [ "./clients/mueller/broadcast.json5", "./clients/schmidt/broadcast.json5" ]}, channels: { whatsapp: { groupPolicy: "allowlist" } } } ``` ```json5 // ~/.clawdbot/clients/mueller/agents.json5 [ { id: "mueller-transcribe", workspace: "~/clients/mueller/transcribe" }, { id: "mueller-docs", workspace: "~/clients/mueller/docs" } ] ``` ```json5 // ~/.clawdbot/clients/mueller/broadcast.json5 { "120363403215116621@g.us": ["mueller-transcribe", "mueller-docs"] } ``` -------------------------------- ### Moltb Bot Rescue Gateway Installation Guide Source: https://docs.molt.bot/gateway/multiple-gateways Provides a step-by-step guide for installing a rescue Molt Bot Gateway. This involves onboarding the rescue bot with its own profile and ensuring it uses isolated ports, distinct from the main bot. The process includes installing the gateway service. ```bash # Main bot (existing or fresh, without --profile param) # Runs on port 18789 + Chrome CDC/Canvas/... Ports moltbot onboard moltbot gateway install # Rescue bot (isolated profile + ports) moltbot --profile rescue onboard # Notes: # - workspace name will be postfixed with -rescue per default # - Port should be at least 18789 + 20 Ports, # better choose completely different base port, like 19789, # - rest of the onboarding is the same as normal # To install the service (if not happened automatically during onboarding) moltbot --profile rescue gateway install ``` -------------------------------- ### Installer Script with Flags (Bash) Source: https://docs.molt.bot/install Demonstrates how to use the installer script with specific flags to control the installation method and behavior, such as specifying 'npm' or 'git' as the install method. ```bash curl -fsSL https://molt.bot/install.sh | bash -s -- --install-method npm ``` ```bash curl -fsSL https://molt.bot/install.sh | bash -s -- --install-method git ``` -------------------------------- ### Moltbot Development Setup Source: https://docs.molt.bot/help/faq Steps for setting up Moltbot from a git clone, including installing dependencies, building the project and UI assets, and onboarding. It also shows how to run the CLI if not globally installed. ```bash git clone https://github.com/moltbot/moltbot.git cd moltbot pnpm install pnpm build pnpm ui:build moltbot onboard pnpm moltbot onboard ``` -------------------------------- ### Install Dependencies and Watch Gateway Source: https://docs.molt.bot/start/setup Installs project dependencies using pnpm and starts the Gateway in watch mode. This is essential for the bleeding-edge development workflow, enabling hot-reloading on code changes. ```bash pnpm install pnpm gateway:watch ``` -------------------------------- ### Manual Moltbot Installation Steps Source: https://docs.molt.bot/install/ansible Guides through the manual installation of Moltbot using Ansible. This involves installing prerequisites, cloning the repository, installing Ansible collections, and running the playbook. ```bash # 1. Install prerequisites sudo apt update && sudo apt install -y ansible git # 2. Clone repository git clone https://github.com/moltbot/moltbot-ansible.git cd moltbot-ansible # 3. Install Ansible collections ansible-galaxy collection install -r requirements.yml # 4. Run playbook ./run-playbook.sh # Or run directly (then manually execute /tmp/moltbot-setup.sh after) # ansible-playbook playbook.yml --ask-become-pass ``` -------------------------------- ### Quick Start Docker Setup for Molt Bot Source: https://docs.molt.bot/install/docker Executes a script to build the Molt Bot gateway image, run the onboarding wizard, and start the gateway via Docker Compose. It also generates a gateway token and writes it to .env. This is the recommended method for a quick setup. ```bash ./docker-setup.sh ``` -------------------------------- ### Quick Start Moltbot Installation with Curl Source: https://docs.molt.bot/install/ansible Installs Moltbot using a one-command curl script. This script automates the download and execution of the moltbot-ansible installation process. ```bash curl -fsSL https://raw.githubusercontent.com/moltbot/moltbot-ansible/main/install.sh | bash ``` -------------------------------- ### Install Docker and Dependencies on Ubuntu/Debian Source: https://docs.molt.bot/platforms/hetzner Installs necessary packages like git, curl, and ca-certificates, followed by Docker using the official installation script. It then verifies the Docker and Docker Compose installations. ```bash apt-get update apt-get install -y git curl ca-certificates curl -fsSL https://get.docker.com | sh docker --version docker compose version ``` -------------------------------- ### Moltbot Onboarding and Daemon Setup Source: https://docs.molt.bot/help/faq Installs Moltbot and optionally sets up the gateway as a system daemon. The onboarding wizard typically opens a tokenized dashboard URL in the browser upon completion. ```bash curl -fsSL https://molt.bot/install.sh | bash moltbot onboard --install-daemon ``` -------------------------------- ### Moltbot Installation and Setup (Node.js) Source: https://docs.molt.bot/index Provides commands for globally installing Moltbot using npm or pnpm, onboarding and installing the service as a system daemon, and logging into WhatsApp Web to initiate pairing. ```bash # Recommended: global install (npm/pnpm) npm install -g moltbot@latest # or: pnpm add -g moltbot@latest # Onboard + install the service (launchd/systemd user service) moltbot onboard --install-daemon # Pair WhatsApp Web (shows QR) moltbot channels login ``` -------------------------------- ### Bootstrap Moltbot Setup Source: https://docs.molt.bot/start/setup Initializes the Moltbot setup process. This command should be run from within the project directory or globally if Moltbot is installed as a package. ```bash moltbot setup ``` -------------------------------- ### Quick Install Molt Bot CLI (Bash) Source: https://docs.molt.bot/install Installs the Molt Bot CLI globally using a curl script. This is the recommended method for most users as it sets up the CLI and runs onboarding. ```bash curl -fsSL https://molt.bot/install.sh | bash ``` -------------------------------- ### Install Dependencies and Build Project Source: https://docs.molt.bot/gateway/troubleshooting Commands to pull the latest changes from the main branch, install dependencies using pnpm, and build the project. ```bash git pull origin main && pnpm install pnpm build ``` -------------------------------- ### Troubleshooting Moltbot Service Start Issues Source: https://docs.molt.bot/install/ansible Provides commands to diagnose and resolve issues when the Moltbot service fails to start. This includes checking logs, verifying file permissions, and attempting a manual start. ```bash # Check logs sudo journalctl -u moltbot -n 100 # Verify permissions sudo ls -la /opt/moltbot # Test manual start sudo -i -u moltbot cd ~/moltbot pnpm start ``` -------------------------------- ### Install Moltbot Gateway Service via CLI Source: https://docs.molt.bot/platforms/linux Commands to install and configure the Moltbot Gateway service using the command-line interface. These commands guide the user through the setup process, prompting for necessary selections. ```bash moltbot onboard --install-daemon ``` ```bash moltbot gateway install ``` ```bash moltbot configure ``` -------------------------------- ### Switching to Moltbot User Source: https://docs.molt.bot/install/ansible Changes the current user to 'moltbot' for performing post-installation setup tasks. This is necessary for running Moltbot-specific commands and configurations. ```bash sudo -i -u moltbot ``` -------------------------------- ### Molt Bot CLI Examples Source: https://docs.molt.bot/concepts/model-providers Provides examples of using the Molt Bot command-line interface for onboarding, setting models, and listing available models. ```bash moltbot onboard --auth-choice opencode-zen moltbot models set opencode/claude-opus-4-5 moltbot models list ``` -------------------------------- ### Molt Bot Session Configuration Example Source: https://docs.molt.bot/concepts/session An example configuration file for Molt Bot, demonstrating session scoping, identity linking, and detailed reset policies (daily, idle, per-type, per-channel). It also shows how to specify reset triggers and store paths. ```json5 // ~/.clawdbot/moltbot.json { session: { scope: "per-sender", // keep group keys separate dmScope: "main", // DM continuity (set per-channel-peer for shared inboxes) identityLinks: { alice: ["telegram:123456789", "discord:987654321012345678"] }, reset: { // Defaults: mode=daily, atHour=4 (gateway host local time). // If you also set idleMinutes, whichever expires first wins. mode: "daily", atHour: 4, idleMinutes: 120 }, resetByType: { thread: { mode: "daily", atHour: 4 }, dm: { mode: "idle", idleMinutes: 240 }, group: { mode: "idle", idleMinutes: 120 } }, resetByChannel: { discord: { mode: "idle", idleMinutes: 10080 } }, resetTriggers: ["/new", "/reset"], store: "~/.clawdbot/agents/{agentId}/sessions/sessions.json", mainKey: "main", } } ``` -------------------------------- ### Setup Gmail Webhooks via CLI Source: https://docs.molt.bot/start/onboarding This command initiates the setup process for Gmail webhooks using the Molt Bot CLI. It requires specifying the target email account. Refer to the provided documentation for detailed setup instructions. ```bash moltbot webhooks gmail setup --account you@gmail.com ``` -------------------------------- ### Verify Molt Bot System Status Source: https://docs.molt.bot/start/getting-started Executes a series of commands to quickly verify the status and health of the Molt Bot installation. Includes checking general status, health, and performing a security audit. ```bash moltbot status ``` ```bash moltbot health ``` ```bash moltbot security audit --deep ``` -------------------------------- ### Install Tailscale on VPS Source: https://docs.molt.bot/help/faq Commands to install and log in to Tailscale on a Virtual Private Server (VPS). This enables secure remote access to the VPS. It involves downloading and executing an installation script and then authenticating with the Tailscale service. ```bash curl -fsSL https://tailscale.com/install.sh | sh sudo tailscale up ``` -------------------------------- ### Check Molt Bot Installation and Status Source: https://docs.molt.bot/install Commands to verify the Molt Bot installation and check its operational status after installation. ```bash moltbot doctor ``` ```bash moltbot status ``` ```bash moltbot health ``` ```bash moltbot dashboard ``` -------------------------------- ### Molt Bot Recommended Starter Configuration (JSON5) Source: https://docs.molt.bot/gateway/configuration-examples This configuration provides a recommended starting point for the Molt Bot, including identity settings (name, theme, emoji), agent configuration (workspace, primary model), and detailed channel settings for WhatsApp (allowed numbers and group message requirements). ```json5 { identity: { name: "Clawd", theme: "helpful assistant", emoji: "🦞" }, agent: { workspace: "~/clawd", model: { primary: "anthropic/claude-sonnet-4-5" } }, channels: { whatsapp: { allowFrom: ["+15555550123"], groups: { "*": { requireMention: true } } } } } ``` -------------------------------- ### Comprehensive CLI Backend Configuration Example Source: https://docs.molt.bot/gateway/cli-backends Provides a detailed example of configuring a custom CLI backend in Moltbot. It includes settings for command, arguments, output parsing, input methods, model aliasing, session management, system prompts, and image handling. ```json5 { "agents": { "defaults": { "cliBackends": { "claude-cli": { "command": "/opt/homebrew/bin/claude" }, "my-cli": { "command": "my-cli", "args": ["--json"], "output": "json", "input": "arg", "modelArg": "--model", "modelAliases": { "claude-opus-4-5": "opus", "claude-sonnet-4-5": "sonnet" }, "sessionArg": "--session", "sessionMode": "existing", "sessionIdFields": ["session_id", "conversation_id"], "systemPromptArg": "--system", "systemPromptWhen": "first", "imageArg": "--image", "imageMode": "repeat", "serialize": true } } } } } ``` -------------------------------- ### Installer Script Non-Interactive Install (Bash) Source: https://docs.molt.bot/install Runs the Molt Bot installer script in a non-interactive mode, skipping the onboarding process. Useful for automated or CI/CD environments. ```bash curl -fsSL https://molt.bot/install.sh | bash -s -- --no-onboard ``` -------------------------------- ### Display install.sh Help (Bash) Source: https://docs.molt.bot/install/installer Fetches and displays the help information for the recommended Moltbot installer script (install.sh) using curl and bash. This is useful for understanding available flags and options. ```bash curl -fsSL https://molt.bot/install.sh | bash -s -- --help ``` -------------------------------- ### Install Molt Bot Globally via pnpm Source: https://docs.molt.bot/install Installs the Molt Bot CLI globally using pnpm. This is an alternative to npm for managing Node.js packages. ```bash pnpm add -g moltbot@latest ``` -------------------------------- ### Install Molt Bot Globally via npm Source: https://docs.molt.bot/install Manually installs the Molt Bot CLI globally using npm. This method requires Node.js to be pre-installed. ```bash npm install -g moltbot@latest ``` -------------------------------- ### CLI Setup for OpenCode Zen Source: https://docs.molt.bot/providers/opencode Commands to onboard the OpenCode Zen model access path using the moltbot CLI. Supports interactive and non-interactive setup with an API key. ```bash moltbot onboard --auth-choice opencode-zen # or non-interactive moltbot onboard --opencode-zen-api-key "$OPENCODE_API_KEY" ``` -------------------------------- ### Setup and Run Gmail Webhooks with Molt Bot Source: https://docs.molt.bot/cli/webhooks This snippet demonstrates how to set up and run Gmail webhooks using the Molt Bot CLI. It requires an email account for setup and then initiates the webhook listener. Refer to the Gmail Pub/Sub documentation for more in-depth details on the integration. ```bash moltbot webhooks gmail setup --account you@example.com moltbot webhooks gmail run ``` -------------------------------- ### Install Official Moltbot Plugin Source: https://docs.molt.bot/plugins Command to install an official Moltbot plugin, using the Voice Call plugin as an example. After installation, the plugin needs to be enabled and configured. ```bash moltbot plugins install @moltbot/voice-call ``` -------------------------------- ### Gateway Configuration Example Source: https://docs.molt.bot/gateway/configuration An example of the basic gateway configuration, including the URL for the WebSocket gateway and an authentication token. ```json { "gateway": { "url": "wss://gateway.example.ts.net", "token": "your-token" } } ``` -------------------------------- ### Remove Moltbot CLI Installation Source: https://docs.molt.bot/install/uninstall Commands to remove the Moltbot CLI from global npm, pnpm, or bun installations. Choose the command corresponding to the package manager used during installation. ```bash npm rm -g moltbot pnpm remove -g moltbot bun remove -g moltbot ``` -------------------------------- ### CLI Examples for Camera Capture Source: https://docs.molt.bot/nodes/camera These examples demonstrate how to use the Moltbot CLI to invoke camera capture commands on different nodes. They cover basic photo and video capture, specifying facing, duration, and device IDs. The output often includes a MEDIA path to temporary files. ```bash # iOS CLI Examples moltbot nodes camera snap --node # default: both front + back (2 MEDIA lines) moltbot nodes camera snap --node --facing front moltbot nodes camera clip --node --duration 3000 moltbot nodes camera clip --node --no-audio # macOS CLI Examples moltbot nodes camera list --node # list camera ids moltbot nodes camera snap --node # prints MEDIA: moltbot nodes camera snap --node --max-width 1280 moltbot nodes camera snap --node --delay-ms 2000 moltbot nodes camera snap --node --device-id moltbot nodes camera clip --node --duration 10s # prints MEDIA: moltbot nodes camera clip --node --duration-ms 3000 # prints MEDIA: (legacy flag) moltbot nodes camera clip --node --device-id moltbot nodes camera clip --node --no-audio ``` -------------------------------- ### Install Moltbot on Ubuntu Droplet Source: https://docs.molt.bot/platforms/digitalocean Installs Moltbot on an Ubuntu 24.04 LTS Droplet. This script first updates the system, then installs Node.js version 22, followed by Moltbot itself. Finally, it verifies the installation by checking the Moltbot version. ```bash # Update system apt update && apt upgrade -y # Install Node.js 22 curl -fsSL https://deb.nodesource.com/setup_22.x | bash - apt install -y nodejs # Install Moltbot curl -fsSL https://molt.bot/install.sh | bash # Verify moltbot --version ``` -------------------------------- ### Install Google Chrome on Debian/Ubuntu Source: https://docs.molt.bot/gateway/troubleshooting This script downloads and installs the stable version of Google Chrome for Debian-based systems. It requires root privileges for the dpkg installation. This is a solution for issues with snap-packaged Chromium. ```bash wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo dpkg -i google-chrome-stable_current_amd64.deb ``` -------------------------------- ### Initialize Molt Bot Setup Source: https://docs.molt.bot/cli/setup Initializes the `~/.clawdbot/moltbot.json` configuration file and the agent workspace. This command sets up the necessary files and directories for the Molt Bot to function. ```bash moltbot setup ``` ```bash moltbot setup --workspace ~/clawd ``` ```bash moltbot setup --wizard ``` -------------------------------- ### Molt Bot Gateway Service with Custom Configuration Source: https://docs.molt.bot/gateway Examples of running the Molt Bot gateway service with custom configuration paths and state directories, using different ports for distinct instances. ```bash CLAWDBOT_CONFIG_PATH=~/.clawdbot/a.json CLAWDBOT_STATE_DIR=~/.clawdbot-a moltbot gateway --port 19001 CLAWDBOT_CONFIG_PATH=~/.clawdbot/b.json CLAWDBOT_STATE_DIR=~/.clawdbot-b moltbot gateway --port 19002 ``` -------------------------------- ### Install Molt Bot with Ignore Global libvips (npm) Source: https://docs.molt.bot/install Installs the Molt Bot CLI globally using npm while ignoring the global libvips. This is a workaround for potential build issues with the 'sharp' package. ```bash SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g moltbot@latest ``` -------------------------------- ### Full Configuration Example Source: https://docs.molt.bot/channels/twitch A comprehensive example demonstrating a complete Molt Bot configuration, including multi-account and access control settings. ```APIDOC ## Full Config Example This example shows a detailed configuration for Molt Bot, integrating various settings. ### Request Body Example ```json { "channels": { "twitch": { "enabled": true, "username": "moltbot", "accessToken": "oauth:abc123...", "clientId": "xyz789...", "channel": "vevisk", "clientSecret": "secret123...", "refreshToken": "refresh456...", "allowFrom": ["123456789"], "allowedRoles": ["moderator", "vip"], "accounts": { "default": { "username": "mybot", "accessToken": "oauth:abc123...", "clientId": "xyz789...", "channel": "your_channel", "enabled": true, "clientSecret": "secret123...", "refreshToken": "refresh456...", "expiresIn": 14400, "obtainmentTimestamp": 1706092800000, "allowFrom": ["123456789", "987654321"], "allowedRoles": ["moderator"] } } } } } ``` ``` -------------------------------- ### Re-running Molt Bot Installer with Verbose Output Source: https://docs.molt.bot/help/troubleshooting Use this command to re-run the Molt Bot installer with verbose logging enabled. This is useful for debugging installation failures or when full trace information is required. The `--beta` flag can be used for beta installations. ```bash curl -fsSL https://molt.bot/install.sh | bash -s -- --verbose curl -fsSL https://molt.bot/install.sh | bash -s -- --beta --verbose ``` -------------------------------- ### Setup DNS Discovery Helper Source: https://docs.molt.bot/cli Configures the wide-area discovery DNS helper using CoreDNS and Tailscale. The `--apply` flag installs or updates the CoreDNS configuration, which requires sudo privileges and is currently macOS only. ```bash dns setup --apply ``` -------------------------------- ### Install Project Dependencies with pnpm Source: https://docs.molt.bot/platforms/mac/dev-setup Installs all project-wide dependencies required for building the Moltbot macOS application. This command should be run in the root directory of the project. ```bash pnpm install ``` -------------------------------- ### Run Gateway (CLI) Source: https://docs.molt.bot/cli Starts the Moltbot WebSocket Gateway. Configurable via port, bind address, authentication, and various other options for development and production. ```bash moltbot gateway moltbot gateway --port moltbot gateway --bind moltbot gateway --token moltbot gateway --auth moltbot gateway --password moltbot gateway --tailscale moltbot gateway --tailscale-reset-on-exit moltbot gateway --allow-unconfigured moltbot gateway --dev moltbot gateway --reset moltbot gateway --force moltbot gateway --verbose moltbot gateway --claude-cli-logs moltbot gateway --ws-log moltbot gateway --compact moltbot gateway --raw-stream moltbot gateway --raw-stream-path ``` -------------------------------- ### Moltb Bot Gateway Setup with Profiles Source: https://docs.molt.bot/gateway/multiple-gateways Demonstrates how to set up and run multiple Molt Bot Gateways using profiles for isolation. Each profile manages its own configuration and state, and specific ports are assigned to prevent conflicts. This is the recommended approach for running multiple instances. ```bash moltbot --profile main setup moltbot --profile main gateway --port 18789 moltbot --profile rescue setup moltbot --profile rescue gateway --port 19001 ``` ```bash moltbot --profile main gateway install moltbot --profile rescue gateway install ``` -------------------------------- ### Moltbot CLI Configuration Set Example Source: https://docs.molt.bot/tools/browser Example of using the Moltbot CLI to set the browser executable path configuration. ```bash moltbot config set browser.executablePath "/usr/bin/google-chrome" ```