Updated January 2026

How to Use moltbot

Complete Setup & Configuration Guide

Master moltbot with this comprehensive guide. Join 61,500+ GitHub stars and discover how to transform your AI assistant into a powerful 24/7 productivity tool with 565+ skills and 50+ integrations across WhatsApp, Telegram, Discord, and more.

Last updated:

🚀 What is moltbot?

Understanding the AI assistant that actually does things

moltbot is an open-source, self-hosted personal AI assistant that has been described as "a true 24/7 AI employee." Unlike traditional cloud-based AI assistants, moltbot runs on your own hardware and integrates deeply with your local computing environment and daily communication tools.

The core philosophy behind moltbot is local-first and self-hosted, giving you complete control over your data, privacy, and functionality. Through its unique Gateway architecture, moltbot seamlessly embeds into popular chat platforms like WhatsApp, Telegram, Discord, and Slack, enabling a revolutionary "work in chat" experience. Discover why moltbot is trusted by 61,500+ developers worldwide.

🔌

Deep Integration

Connect with WhatsApp, Telegram, Discord, Slack, and more through a unified Gateway architecture.

🛠

Extensible Skills

Expand capabilities with custom skills or install community skills from MoltHub marketplace.

🔒

Privacy First

Self-hosted architecture ensures your data stays on your own hardware under your control.

📅

24/7 Automation

Schedule tasks with cron jobs and let moltbot work for you around the clock.

Who Should Use This Guide?

This comprehensive guide is designed for:

Explore real-world examples in our moltbot use cases collection.

💻 System Requirements

Prerequisites for running moltbot on your system

Before installing moltbot, ensure your system meets the following requirements. The setup process is straightforward, but having the right environment is crucial for a smooth experience.

Category Requirement Notes
Operating System macOS, Linux, or Windows (WSL2) Windows users must use WSL2 with Ubuntu recommended
Runtime Node.js version 22 or higher Required for all installation methods
Build Tools pnpm (optional) Only needed if building from source
API Keys LLM Provider (Anthropic/OpenAI) Required for AI capabilities
Optional Brave Search API key Enables web search functionality
⚠ Windows Users

Running moltbot natively on Windows is not officially supported. Please use Windows Subsystem for Linux 2 (WSL2) with Ubuntu for the best experience. This ensures compatibility and avoids potential issues with native Windows.

Verifying Node.js Installation

Check if Node.js is installed and verify the version:

bash
# Check Node.js version
node --version
# Should output: v22.x.x or higher

# If not installed, use nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 22
nvm use 22

📦 Installation Guide

Step-by-step instructions to install moltbot on your system

moltbot offers multiple installation methods to suit different needs. The official installation script is recommended for most users as it handles all dependencies and configurations automatically.

macOS and Linux Installation

The quickest way to install moltbot is using the official installation script:

Run the Installation Script

Open your terminal and execute the following command:

bash
curl -fsSL https://molt.bot/install.sh | bash

This script will automatically install the moltbot CLI tool globally on your system.

Verify Installation

Confirm that moltbot was installed correctly:

bash
moltbot --version

Windows Installation via WSL2

Windows users should first set up WSL2, then install moltbot:

Install WSL2 with Ubuntu

Open PowerShell as Administrator and run:

powershell
wsl --install -d Ubuntu

Install moltbot in WSL

Open your Ubuntu terminal and run the installation script:

bash
curl -fsSL https://molt.bot/install.sh | bash
💡 Pro Tip

For the best Windows experience, use Windows Terminal with WSL2 integration for seamless command-line access.

Docker Installation

For containerized deployments, use Docker Compose:

Clone the Repository

bash
git clone https://github.com/steipete/moltbot.git
cd moltbot

Run Docker Setup Script

bash
./docker-setup.sh

This script will build the image, run the onboard wizard, and start the Gateway container.

Manual Docker Commands

bash
# Build the image
docker build -t moltbot:local -f Dockerfile .

# Run onboard wizard
docker compose run --rm moltbot-cli onboard

# Start the Gateway
docker compose up -d moltbot-gateway

npm / pnpm Installation

Install moltbot globally using your preferred package manager:

bash
# Using npm
npm install -g moltbot@latest

# Using pnpm
pnpm add -g moltbot@latest

# Verify installation
moltbot --version
💡 PATH Issues?

If you get "command not found" after installation, add npm's global bin directory to your PATH: export PATH="$(npm prefix -g)/bin:$PATH"

Initial Configuration

Set up moltbot with the interactive onboarding wizard

After installation, you'll need to configure moltbot using the interactive onboard command. This wizard guides you through all essential settings including authentication, channels, and daemon setup.

Run the Configuration Wizard

Execute the onboard command with the daemon installation flag:

bash
moltbot onboard --install-daemon

Configuration Options

During the onboarding process, you'll configure:

🔑 Authentication

Set up API keys for AI models (Anthropic Claude, OpenAI) using OAuth or direct API keys.

💬 Messaging Channels

Configure connections to WhatsApp, Telegram, Discord, or Slack.

🔄 Background Service

Install moltbot as a system service (launchd on macOS, systemd on Linux).

🌐 Gateway Location

Choose between local or remote Gateway deployment.

Verify Gateway Status

After configuration, check that the Gateway is running:

bash
# Check Gateway status
moltbot gateway status

# Verify system health
moltbot health

# View all status information
moltbot status --all

Manual Gateway Start (Optional)

For debugging or manual control, start the Gateway in foreground mode:

bash
moltbot gateway --port 18789 --verbose

Configuration File Location

moltbot stores its configuration in ~/.moltbot/moltbot.json. You can manually edit this file to customize advanced settings:

json
{
  "gateway": {
    "bind": "loopback",
    "port": 18789,
    "auth": {
      "mode": "token",
      "token": "your-secure-token"
    }
  },
  "channels": {
    "whatsapp": {
      "dmPolicy": "pairing"
    }
  }
}

💬 Channel Integration

Connect moltbot to your favorite messaging platforms

One of moltbot's most powerful features is its ability to integrate with multiple chat platforms. This allows you to interact with your AI assistant through familiar interfaces without switching apps.

WhatsApp Integration

Connect via WhatsApp Web using QR code authentication

WhatsApp integration uses the WhatsApp Web / Baileys protocol. You'll need to scan a QR code with your phone to link your account.

Configure WhatsApp in moltbot.json

json
{
  "channels": {
    "whatsapp": {
      "dmPolicy": "pairing"
    }
  }
}

Login via QR Code

bash
moltbot channels login

Scan the displayed QR code with your WhatsApp mobile app (Settings > Linked Devices).

💡 Best Practice

Use a dedicated phone number for moltbot (physical SIM or eSIM recommended). Avoid VoIP or virtual numbers as they may be blocked by WhatsApp.

Telegram Integration

Connect using Telegram Bot API with BotFather

Create a Telegram Bot

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the prompts
  3. Copy the Bot Token provided

Configure the Bot Token

json
{
  "channels": {
    "telegram": {
      "botToken": "YOUR_TELEGRAM_BOT_TOKEN"
    }
  }
}

Discord Integration

Connect using Discord Bot API with Gateway Intents

Create a Discord Application

  1. Go to the Discord Developer Portal
  2. Click "New Application" and give it a name
  3. Navigate to "Bot" section and click "Add Bot"
  4. Copy the Bot Token

Enable Gateway Intents

In the Bot settings, enable these required intents:

  • Message Content Intent - Required to read messages
  • Server Members Intent - Required for member information

Configure Discord in moltbot.json

json
{
  "channels": {
    "discord": {
      "enabled": true,
      "token": "YOUR_DISCORD_BOT_TOKEN"
    }
  }
}

Slack Integration

Connect using Slack App with Socket Mode or HTTP Mode

Create a Slack App

  1. Go to Slack API and create a new app
  2. Enable Socket Mode (recommended for local/firewall environments)
  3. Generate an App Token (xapp-...)
  4. Install the app and get the Bot Token (xoxb-...)

Configure Slack Tokens

json
{
  "channels": {
    "slack": {
      "enabled": true,
      "appToken": "xapp-...",
      "botToken": "xoxb-..."
    }
  }
}

🔗 Understanding the Pairing System

Secure your moltbot with the DM access control mechanism

moltbot's pairing system is a crucial security feature that prevents unauthorized access to your AI assistant. By default, the dmPolicy is set to "pairing", which requires manual approval for any new user attempting to interact with your bot.

How Pairing Works

  1. A new user sends a direct message to your moltbot
  2. moltbot responds with a pairing code
  3. You review the request and approve it using the CLI
  4. Once approved, the user can freely interact with moltbot

Managing Pairing Requests

bash
# List pending pairing requests for a channel
moltbot pairing list whatsapp
moltbot pairing list telegram
moltbot pairing list discord

# Approve a pairing request with the provided code
moltbot pairing approve whatsapp ABC123

# List all approved users
moltbot pairing list --approved

DM Policy Options

Policy Description Security Level
pairing Requires manual approval for new users (recommended) High
allowlist Only pre-configured users can interact Highest
open Anyone can message the bot (not recommended) Low
🛑 Security Warning

Never set dmPolicy to "open" in production environments. This exposes your moltbot to potential prompt injection attacks from unknown users.

🎯 Skills System

Extend moltbot's capabilities with custom and community skills

Skills are moltbot's core extension mechanism. They allow you to define new capabilities for your AI assistant using simple Markdown files. Each skill contains instructions that guide the AI agent on how to perform specific tasks.

Understanding Skill Priority

moltbot loads skills in this priority order:

  1. Workspace skills: <workspace>/skills/ (highest priority)
  2. Local/hosted skills: ~/.moltbot/skills/
  3. Bundled skills: Built-in skills (lowest priority)

Creating a Custom Skill

Create the Skill Directory

bash
mkdir -p ~/moltbot-workspace/skills/my-custom-skill
cd ~/moltbot-workspace/skills/my-custom-skill

Write the SKILL.md File

markdown
---
name: weather-checker
description: Check current weather for any city using a weather API.
user-invocable: true
metadata: {"moltbot":{"requires":{"env":["WEATHER_API_KEY"]}}}
---

## Instructions

When the user asks about weather:
1. Identify the city from the user's request
2. Execute: `curl "https://api.weather.com/v1/current?city={city}&key=$WEATHER_API_KEY"`
3. Parse the JSON response and present a friendly summary
4. Include temperature, conditions, and humidity

Installing Community Skills from MoltHub

MoltHub is the public skill registry where you can discover and install community-contributed skills.

bash
# Install a skill from MoltHub
molthub install weather-forecast

# Update all installed skills
molthub update --all

# Sync local skills to MoltHub
molthub sync --all

Skill Configuration

Configure individual skills in your moltbot.json:

json
{
  "skills": {
    "entries": {
      "weather-checker": {
        "enabled": true,
        "apiKey": "your-weather-api-key",
        "config": {
          "defaultUnit": "celsius"
        }
      },
      "unwanted-skill": {
        "enabled": false
      }
    }
  }
}

Gating Mechanism

Use the requires field in skill metadata to ensure skills only load when their dependencies are available:

🌟 Advanced Features

Unlock moltbot's full potential with voice, visual, and automation capabilities. Learn how moltbot works under the hood to leverage these advanced features.

Voice Interaction

moltbot supports natural voice interaction through Voice Wake and Talk Mode, enabling hands-free operation.

🎤 Voice Wake

Activate moltbot using a wake word or hold-to-talk shortcut (Cmd+Fn on macOS). Requires microphone and speech recognition permissions.

🗣 Talk Mode

Continuous conversation with text-to-speech responses powered by ElevenLabs. Supports dynamic voice control within responses.

Talk Mode Configuration

json
{
  "talk": {
    "voiceId": "elevenlabs_voice_id",
    "modelId": "eleven_v3",
    "apiKey": "your_elevenlabs_api_key",
    "interruptOnSpeech": true
  }
}

Canvas Visual Workspace

Canvas is a macOS feature that provides an agent-controlled visual workspace. It renders HTML/CSS/JS content and supports Agent-driven UI (A2UI).

bash
# Display the Canvas panel
moltbot nodes canvas present --node <id>

# Navigate to a URL or local path
moltbot nodes canvas navigate --node <id> --url "/"

# Execute JavaScript in Canvas context
moltbot nodes canvas eval --node <id> --js "document.title = 'New Title';"

# Push A2UI content
moltbot nodes canvas a2ui push --node <id> --text "Hello from A2UI"

Automated Tasks (Cron Jobs)

Schedule automated tasks using moltbot's built-in Gateway scheduler. Supports flexible scheduling with at, every, and cron expressions.

bash
# Add a one-time task (runs in 20 minutes)
moltbot cron add \
  --name "Reminder" \
  --at "20m" \
  --session main \
  --system-event "Reminder: Check your email" \
  --wake now

# Add a daily recurring task
moltbot cron add \
  --name "Daily Summary" \
  --cron "0 8 * * *" \
  --tz "America/Los_Angeles" \
  --session isolated \
  --message "Generate today's summary report" \
  --deliver \
  --channel whatsapp \
  --to "+15551234567"

# List all scheduled jobs
moltbot cron list

# Remove a scheduled job
moltbot cron remove <job-id>
💡 Session Types

Use --session isolated for background tasks to avoid polluting the main chat history. Isolated sessions can also override model and thinking levels with --model and --thinking flags.

Deployment Options

Deploy moltbot locally or in the cloud with secure remote access

moltbot's deployment strategy centers around the Gateway component. Whether running locally or in the cloud, the core principle is to keep the Gateway secure while enabling remote access through encrypted tunnels.

Local Deployment

For personal use on your own machine, local deployment offers the fastest and most straightforward experience.

bash
# Start Gateway (daemon mode)
moltbot onboard --install-daemon

# Or start manually in foreground
moltbot gateway --port 18789

# Access locally
# Control UI: http://127.0.0.1:18789/
# WebSocket: ws://127.0.0.1:18789

Remote Access Options

🔐 SSH Tunnel

Universal fallback method using standard SSH port forwarding.

ssh -N -L 18789:127.0.0.1:18789 user@remote

🌐 Tailscale Serve (Recommended)

Best experience with automatic HTTPS, routing, and identity-based auth.

moltbot gateway --tailscale serve

Cloud/Container Deployment

For VPS or cloud environments, Docker Compose provides isolation and portability:

bash
# Quick setup with Docker
./docker-setup.sh

# Or manual steps
docker build -t moltbot:local -f Dockerfile .
docker compose run --rm moltbot-cli onboard
docker compose up -d moltbot-gateway
⚠ Security Reminder

Always keep the Gateway bound to loopback (127.0.0.1) and use secure tunnels for remote access. Never expose the Gateway directly to the public internet without proper authentication.

🔒 Security Best Practices

Protect your moltbot installation with proper security configuration

Since moltbot has the ability to execute system commands and access local resources, security configuration is critical. The core principle is: "Access control before intelligence." For comprehensive security guidance, see our moltbot security guide.

Security Audit Tool

moltbot includes a built-in security audit command to identify and fix common vulnerabilities:

bash
# Basic security audit
moltbot security audit

# Deep audit with Gateway probing
moltbot security audit --deep

# Auto-fix common issues
moltbot security audit --fix

Core Security Practices

Practice Configuration Why It Matters
Lock Gateway Interface "bind": "loopback" Prevents network exposure
Enable Token Auth "auth": {"mode": "token"} Requires authentication for all connections
Use Pairing Mode "dmPolicy": "pairing" Prevents unauthorized DM access
Enable Sandboxing "sandbox": {"mode": "all"} Limits agent's system access
Protect Config Files chmod 700 ~/.moltbot Prevents unauthorized file access

Recommended Security Configuration

json
{
  "gateway": {
    "bind": "loopback",
    "port": 18789,
    "auth": {
      "mode": "token",
      "token": "your-secure-random-token"
    }
  },
  "channels": {
    "whatsapp": {
      "dmPolicy": "pairing",
      "groups": {
        "*": { "requireMention": true }
      }
    }
  },
  "agents": {
    "defaults": {
      "sandbox": {
        "mode": "all",
        "workspaceAccess": "ro"
      },
      "tools": {
        "deny": ["exec", "write", "apply_patch"]
      }
    }
  }
}

🔧 Troubleshooting

Diagnose and fix common issues with moltbot

"First 60 Seconds" Diagnostic Flow

When encountering issues, run these commands in order:

bash
# 1. Check basic status
moltbot status

# 2. Full status report
moltbot status --all

# 3. Probe Gateway connectivity
moltbot gateway probe

# 4. Run health diagnostics
moltbot doctor

# 5. Watch logs in real-time
moltbot logs --follow

Common Issues and Solutions

❌ "moltbot: command not found"

Cause: npm's global bin directory is not in your PATH.

Solution:

# Find npm's global prefix
npm prefix -g

# Add to your shell profile (~/.zshrc or ~/.bashrc)
export PATH="$(npm prefix -g)/bin:$PATH"

# Reload your shell
source ~/.zshrc

❌ WhatsApp/Telegram Channels Won't Connect

Cause: Using Bun runtime instead of Node.js.

Solution: Switch to Node.js 22+ as the runtime. Bun has known compatibility issues with these channels.

❌ Discord Bot Not Responding

Cause: Gateway Intents not enabled in Discord Developer Portal.

Solution: Enable "Message Content Intent" and "Server Members Intent" in your bot settings.

❌ Gateway Shows "Unauthorized"

Cause: Authentication token mismatch or missing.

Solution: Check your gateway.auth configuration and ensure the token matches.

Debug Mode

Enable runtime configuration overrides without modifying files:

bash
# In chat, enable debug mode first (requires commands.debug: true)
/debug show
/debug set messages.responsePrefix="[TEST]"
/debug reset

Frequently Asked Questions

Quick answers to common questions about using moltbot

What are the system requirements for moltbot?

moltbot requires Node.js version 22 or higher. It supports macOS, Linux, and Windows through WSL2. Optional dependencies include pnpm for source builds and Brave Search API for web searching capabilities.

How do I install moltbot on macOS or Linux?

Run the official installation script: curl -fsSL https://molt.bot/install.sh | bash. This will install the moltbot CLI globally on your system.

Can I use moltbot with WhatsApp?

Yes, moltbot integrates with WhatsApp using the WhatsApp Web/Baileys protocol. Run moltbot channels login and scan the QR code with your WhatsApp mobile app to connect.

What is the moltbot pairing system?

The pairing system is a security feature that requires manual approval for new users who want to interact with your moltbot. When someone messages your bot for the first time, they receive a pairing code that you must approve using moltbot pairing approve <channel> <code>.

How do I create custom skills for moltbot?

Create a folder in your workspace's skills directory and add a SKILL.md file with YAML frontmatter containing the skill name and description, plus instructions for the AI agent. Skills can also be installed from MoltHub using molthub install <skill-name>.

How do I troubleshoot moltbot issues?

Start with the "First 60 seconds" diagnostic: run moltbot status, moltbot doctor, and moltbot logs --follow. These commands will help identify most common issues with Gateway connectivity, configuration, and runtime errors.

Is moltbot free to use?

Yes, moltbot is open-source and free to use. However, you'll need API keys from AI providers (like Anthropic or OpenAI) which have their own pricing. The self-hosted nature means you have full control over costs and data.

Can moltbot run 24/7?

Yes! Using moltbot onboard --install-daemon, moltbot installs as a system service (launchd on macOS, systemd on Linux) that runs continuously in the background. Combined with cron jobs, it can work as a true 24/7 AI assistant.

Ready to Get Started?

Install moltbot now and transform your productivity with an AI assistant that truly works for you. Follow our getting started with moltbot guide for quick setup.