WhatsApp Setup
Deploy Mona as a WhatsApp bot using the built-in Baileys bridge.
Prerequisites
- A working MonoClaw installation
- A phone with WhatsApp installed
- Node.js (for the Baileys bridge)
1. Install dependencies
cd ~/.monoclaw/monoclaw-runtime
npm install
2. Configure MonoClaw
monoclaw gateway setup
Choose WhatsApp.
3. Authenticate
- Start the gateway:
monoclaw gateway start
- A QR code will appear in the terminal
- Open WhatsApp on your phone
- Go to Settings → Linked Devices → Link a Device
- Scan the QR code
4. Verify
Send a message to your own WhatsApp number. Mona should reply.
How it works
MonoClaw uses the Baileys library to connect to WhatsApp Web. This is a self-hosted solution — no third-party WhatsApp Business API required.
Limitations
- Single device — Only one phone can be linked at a time
- No groups initially — Group support requires additional setup
- Rate limits — WhatsApp may throttle excessive messaging
- Phone must stay online — If your phone loses internet, the bridge disconnects
Configuration
# ~/.monoclaw/config.yaml
gateway:
whatsapp:
session_name: "monoclaw-whatsapp"
auth_folder: "~/.monoclaw/whatsapp-auth/"
mark_read: true
Security
WhatsApp connections are end-to-end encrypted by WhatsApp itself. Mona can only read messages sent directly to her.
Warning
Using unofficial WhatsApp libraries may violate WhatsApp's Terms of Service. Use at your own risk. For production, consider the official WhatsApp Business API.
Troubleshooting
| Problem | Fix |
|---|---|
| QR code not appearing | Check terminal size; make it larger |
| "Session expired" | Re-scan the QR code |
| Phone shows "Linked Devices" offline | Restart the gateway |
| Messages not arriving | Ensure phone has internet and WhatsApp is running |