Skip to content

2.3.70 Satellite Moltbot

av edited this page Jan 27, 2026 · 2 revisions

Handle: moltbot
URL: http://localhost:34721

Moltbot Screenshot

Moltbot is a personal AI assistant that runs locally and connects to your existing chat channels through a self-hosted gateway and Control UI.

Starting

# Build from source (recommended for Docker installs)
harbor build moltbot

# Set the model (required on first start)
harbor config set moltbot.model "llama3.1:8b"

# Start Moltbot with a backend (Ollama, llamacpp, vllm, etc.)
harbor up moltbot ollama --open

# Open the Control UI
harbor open moltbot
  • Moltbot requires an OpenAI-compatible backend. Start with one of: ollama, llamacpp, vllm, tabbyapi, mistralrs, sglang, or lmdeploy.
  • Harbor automatically configures Moltbot to use whichever backend is running.
  • harbor open moltbot uses the configured moltbot.open_url which includes the gateway token, so no manual token entry is required by default.
  • If MOLTBOT_MODEL is unset, Moltbot will exit on first start and ask you to set it.

Channel Configuration

Discord Setup

Before adding your Discord bot to Moltbot, you must enable required privileged intents in the Discord Developer Portal:

  1. Go to Discord Developer Portal
  2. Select your application
  3. Navigate to Bot settings
  4. Under Privileged Gateway Intents, enable:
    • Message Content Intent (required for reading messages)
    • Server Members Intent (recommended for better user management)
    • Presence Intent (optional)
  5. Save changes

Without these intents enabled, Discord will reject the connection with error code 4014.

Adding Channels

To configure Discord or other chat channels:

# Interactive channel configuration
harbor run moltbot configure --section channels

Or add channels directly via CLI:

# Add Discord channel
harbor run moltbot channels add --channel discord --token <bot-token>

# Add other channels (Telegram, WhatsApp, etc.)
harbor run moltbot channels add --channel telegram --token <telegram-token>

The configuration wizard will guide you through:

  1. Selecting a channel (Discord, Telegram, WhatsApp, etc.)
  2. Entering credentials (bot token, etc.)
  3. Configuring access policies

Your channel configurations persist across container restarts thanks to Harbor's config preservation system.

Configuration

Environment Variables

Following options can be set via harbor config:

# Control UI (Gateway) port
MOLTBOT_HOST_PORT=34721

# Bridge port (device nodes)
MOLTBOT_BRIDGE_HOST_PORT=34722

# Image + build source
MOLTBOT_IMAGE="moltbot"
MOLTBOT_VERSION="local"
MOLTBOT_GIT_REF="https://github.com/moltbot/moltbot.git#main"

# Persistent configuration + workspace
MOLTBOT_CONFIG_DIR="~/.moltbot"
MOLTBOT_WORKSPACE_DIR="~/clawd"

# Gateway settings
MOLTBOT_GATEWAY_MODE="local"
MOLTBOT_GATEWAY_BIND="lan"
MOLTBOT_GATEWAY_TOKEN="harbor-moltbot-token-change-me"

# Model (required)
# Specify the model ID exactly as it appears in your backend.
# Harbor automatically prepends the provider prefix (e.g., "llamacpp/") internally.
#
# For llamacpp models with vendor prefixes, include the full path:
#   unsloth/GLM-4.7-Flash-GGUF:Q8_0
#   bartowski/Qwen2.5-Coder-7B-Instruct-GGUF:Q6_K
# For Ollama models:
#   llama3.1:8b
#   qwen3-vl:8b
#
# Note: Do NOT include the backend name (e.g., "llamacpp/") in MOLTBOT_MODEL.
# Harbor handles provider prefixing automatically.
MOLTBOT_MODEL=""

# Context window for the model
MOLTBOT_CONTEXT_WINDOW=16384

# Build-time extra apt packages
MOLTBOT_DOCKER_APT_PACKAGES=""

# Auto-approve Control UI device pairing
MOLTBOT_AUTO_APPROVE_UI=true

# Optional Claude session values
MOLTBOT_CLAUDE_AI_SESSION_KEY=""
MOLTBOT_CLAUDE_WEB_SESSION_KEY=""
MOLTBOT_CLAUDE_WEB_COOKIE=""

Volumes

Moltbot persists data in the following directories:

  • MOLTBOT_CONFIG_DIR - Gateway configuration, credentials, and tokens
  • MOLTBOT_WORKSPACE_DIR - Agent workspace, skills, and session data

Configuration Persistence

On first start, Harbor creates the initial moltbot.json configuration file. On subsequent restarts, Harbor only updates the dynamic parts (gateway tokens, backend URL, model ID) while preserving all user customizations including:

  • Channel configurations (Discord, Telegram, etc.)
  • Custom agent settings
  • Model provider customizations
  • Any other manual edits to the config file

This ensures your customizations aren't lost when switching models or backends.

First-time Control UI pairing

Moltbot runs inside Docker, so the Control UI connects from the Docker bridge and can require device pairing. Harbor auto-approves this by default. If you disable it, run:

harbor exec moltbot node dist/index.js devices list --json
harbor exec moltbot node dist/index.js devices approve <request-id>

Troubleshooting

Discord: Fatal Gateway error 4014

If you see Fatal Gateway error: 4014 in logs or the Control UI when using Discord:

Cause: Discord is rejecting the connection because required privileged intents are not enabled.

Fix:

  1. Go to Discord Developer Portal
  2. Select your bot application
  3. Navigate to Bot settings
  4. Under Privileged Gateway Intents, enable:
    • Message Content Intent (required)
    • Server Members Intent (recommended)
  5. Click Save Changes
  6. Restart Moltbot: harbor restart moltbot

The bot should now connect successfully. Check logs with harbor logs moltbot to verify.

Check Logs

harbor logs moltbot

Reset Local Data

# Stop the service
harbor down moltbot

# Remove local data (WARNING: destroys config and sessions)
rm -rf ~/.moltbot ~/clawd

# Restart
harbor up moltbot --open

Clone this wiki locally