Getting Started with Moltbot - Complete Setup Guide
Moltbot is a self-hosted AI gateway that connects your favorite messaging platforms to powerful AI models. In this guide, we'll walk through the installation and initial configuration process.
What You'll Need
Before getting started, make sure you have:
- Node.js 22 or higher - Check your version with
node -v - npm or pnpm - Package manager for managing dependencies
- API Key - From an AI provider (Anthropic Claude, OpenAI, etc.)
- Messaging Platform Account - WhatsApp, Telegram, Discord, or others
- A server or computer - To run Moltbot (Mac, Linux, or Windows)
Step 1: Install Moltbot
The easiest way to install Moltbot is through npm:
npm install -g moltbot@latestVerify the installation:
moltbot --versionStep 2: Run the Setup Wizard
Launch the interactive setup wizard:
moltbot onboard --install-daemonThis will guide you through:
- Selecting a messaging platform - Choose from WhatsApp, Telegram, Discord, iMessage, Slack, etc.
- Choosing an AI provider - Select Claude, ChatGPT, Gemini, or others
- Entering API credentials - Your API keys for the AI service
- Configuring messaging authentication - Bot tokens or connection details
- Setting up local preferences - Model parameters, response styles, etc.
Step 3: Connect Your AI Provider
Using Anthropic Claude (Recommended)
- Get an API key from console.anthropic.com
- During setup, select "Anthropic" as your AI provider
- Enter your API key when prompted
- Test the connection
Using OpenAI ChatGPT
- Get an API key from platform.openai.com
- Select "OpenAI" during setup
- Enter your API key and preferred model (gpt-4, gpt-3.5-turbo, etc.)
Step 4: Configure Your Messaging Platform
Setting up Telegram
- Create a bot with BotFather on Telegram
- Get your bot token
- Configure the webhook URL that Moltbot provides
- Test by messaging your bot
Setting up WhatsApp
- Create a business account
- Generate QR code for scanning (or use phone verification)
- Connect your business phone number
- Start chatting with your bot
Step 5: Test Your Setup
Once configured, test Moltbot:
# Start Moltbot
moltbot gateway
# In another terminal, send a test message
# to your bot on your chosen platformYou should get an AI response within a few seconds!
Common Setup Issues
Issue: "Cannot find module moltbot"
- Make sure you installed it globally:
npm install -g moltbot@latest - Check Node.js is installed:
node --version
Issue: API key not working
- Verify the key is valid and not expired
- Check you're using the correct AI provider
- Ensure the key has the necessary permissions
Issue: Messaging platform not responding
- Verify bot tokens/credentials are correct
- Check webhook URLs are properly configured
- Ensure your bot has necessary permissions
Next Steps
- Configure multiple AI agents for different purposes
- Set up group chat support to use the bot in conversations
- Enable media handling for images, voice notes, etc.
- Configure cron jobs for automated tasks
- Join the community for tips and tricks
Resources
Happy messaging with Moltbot! π¦
