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.
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.
Connect with WhatsApp, Telegram, Discord, Slack, and more through a unified Gateway architecture.
Expand capabilities with custom skills or install community skills from MoltHub marketplace.
Self-hosted architecture ensures your data stays on your own hardware under your control.
Schedule tasks with cron jobs and let moltbot work for you around the clock.
This comprehensive guide is designed for:
Explore real-world examples in our moltbot use cases collection.
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 |
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.
Check if Node.js is installed and verify the version:
# 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
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.
The quickest way to install moltbot is using the official installation script:
Open your terminal and execute the following command:
curl -fsSL https://molt.bot/install.sh | bash
This script will automatically install the moltbot CLI tool globally on your system.
Confirm that moltbot was installed correctly:
moltbot --version
Windows users should first set up WSL2, then install moltbot:
Open PowerShell as Administrator and run:
wsl --install -d Ubuntu
Open your Ubuntu terminal and run the installation script:
curl -fsSL https://molt.bot/install.sh | bash
For the best Windows experience, use Windows Terminal with WSL2 integration for seamless command-line access.
For containerized deployments, use Docker Compose:
git clone https://github.com/steipete/moltbot.git
cd moltbot
./docker-setup.sh
This script will build the image, run the onboard wizard, and start the Gateway container.
# 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
Install moltbot globally using your preferred package manager:
# Using npm
npm install -g moltbot@latest
# Using pnpm
pnpm add -g moltbot@latest
# Verify installation
moltbot --version
If you get "command not found" after installation, add npm's global bin directory to your PATH:
export PATH="$(npm prefix -g)/bin:$PATH"
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.
Execute the onboard command with the daemon installation flag:
moltbot onboard --install-daemon
During the onboarding process, you'll configure:
Set up API keys for AI models (Anthropic Claude, OpenAI) using OAuth or direct API keys.
Configure connections to WhatsApp, Telegram, Discord, or Slack.
Install moltbot as a system service (launchd on macOS, systemd on Linux).
Choose between local or remote Gateway deployment.
After configuration, check that the Gateway is running:
# Check Gateway status
moltbot gateway status
# Verify system health
moltbot health
# View all status information
moltbot status --all
For debugging or manual control, start the Gateway in foreground mode:
moltbot gateway --port 18789 --verbose
moltbot stores its configuration in ~/.moltbot/moltbot.json.
You can manually edit this file to customize advanced settings:
{
"gateway": {
"bind": "loopback",
"port": 18789,
"auth": {
"mode": "token",
"token": "your-secure-token"
}
},
"channels": {
"whatsapp": {
"dmPolicy": "pairing"
}
}
}
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.
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.
{
"channels": {
"whatsapp": {
"dmPolicy": "pairing"
}
}
}
moltbot channels login
Scan the displayed QR code with your WhatsApp mobile app (Settings > Linked Devices).
Use a dedicated phone number for moltbot (physical SIM or eSIM recommended). Avoid VoIP or virtual numbers as they may be blocked by WhatsApp.
Connect using Telegram Bot API with BotFather
/newbot and follow the prompts{
"channels": {
"telegram": {
"botToken": "YOUR_TELEGRAM_BOT_TOKEN"
}
}
}
Connect using Discord Bot API with Gateway Intents
In the Bot settings, enable these required intents:
{
"channels": {
"discord": {
"enabled": true,
"token": "YOUR_DISCORD_BOT_TOKEN"
}
}
}
Connect using Slack App with Socket Mode or HTTP Mode
{
"channels": {
"slack": {
"enabled": true,
"appToken": "xapp-...",
"botToken": "xoxb-..."
}
}
}
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.
# 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
| 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 |
Never set dmPolicy to "open" in production environments.
This exposes your moltbot to potential prompt injection attacks from unknown users.
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.
moltbot loads skills in this priority order:
<workspace>/skills/ (highest priority)~/.moltbot/skills/mkdir -p ~/moltbot-workspace/skills/my-custom-skill
cd ~/moltbot-workspace/skills/my-custom-skill
---
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
MoltHub is the public skill registry where you can discover and install community-contributed skills.
# Install a skill from MoltHub
molthub install weather-forecast
# Update all installed skills
molthub update --all
# Sync local skills to MoltHub
molthub sync --all
Configure individual skills in your moltbot.json:
{
"skills": {
"entries": {
"weather-checker": {
"enabled": true,
"apiKey": "your-weather-api-key",
"config": {
"defaultUnit": "celsius"
}
},
"unwanted-skill": {
"enabled": false
}
}
}
}
Use the requires field in skill metadata to ensure skills only load when
their dependencies are available:
requires.bins: Required binary executables (e.g., ["python3", "ffmpeg"])requires.env: Required environment variables (e.g., ["API_KEY"])Unlock moltbot's full potential with voice, visual, and automation capabilities. Learn how moltbot works under the hood to leverage these advanced features.
moltbot supports natural voice interaction through Voice Wake and Talk Mode, enabling hands-free operation.
Activate moltbot using a wake word or hold-to-talk shortcut (Cmd+Fn on macOS). Requires microphone and speech recognition permissions.
Continuous conversation with text-to-speech responses powered by ElevenLabs. Supports dynamic voice control within responses.
{
"talk": {
"voiceId": "elevenlabs_voice_id",
"modelId": "eleven_v3",
"apiKey": "your_elevenlabs_api_key",
"interruptOnSpeech": true
}
}
Canvas is a macOS feature that provides an agent-controlled visual workspace. It renders HTML/CSS/JS content and supports Agent-driven UI (A2UI).
# 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"
Schedule automated tasks using moltbot's built-in Gateway scheduler.
Supports flexible scheduling with at, every, and cron expressions.
# 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>
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.
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.
For personal use on your own machine, local deployment offers the fastest and most straightforward experience.
# 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
Universal fallback method using standard SSH port forwarding.
ssh -N -L 18789:127.0.0.1:18789 user@remote
Best experience with automatic HTTPS, routing, and identity-based auth.
moltbot gateway --tailscale serve
For VPS or cloud environments, Docker Compose provides isolation and portability:
# 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
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.
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.
moltbot includes a built-in security audit command to identify and fix common vulnerabilities:
# Basic security audit
moltbot security audit
# Deep audit with Gateway probing
moltbot security audit --deep
# Auto-fix common issues
moltbot security audit --fix
| 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 |
{
"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"]
}
}
}
}
Diagnose and fix common issues with moltbot
When encountering issues, run these commands in order:
# 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
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
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.
Cause: Gateway Intents not enabled in Discord Developer Portal.
Solution: Enable "Message Content Intent" and "Server Members Intent" in your bot settings.
Cause: Authentication token mismatch or missing.
Solution: Check your gateway.auth configuration and ensure the token matches.
Enable runtime configuration overrides without modifying files:
# In chat, enable debug mode first (requires commands.debug: true)
/debug show
/debug set messages.responsePrefix="[TEST]"
/debug reset
Quick answers to common questions about using 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.
Run the official installation script: curl -fsSL https://molt.bot/install.sh | bash.
This will install the moltbot CLI globally on your system.
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.
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>.
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>.
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.
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.
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.
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.