Guide
WhatsApp Bot Hosting — Deploy Your AI Assistant on WhatsApp
Running a WhatsApp bot isn't just about writing the code — it's about keeping it online. This guide explains why WhatsApp bots need dedicated cloud hosting, how OpenClaw handles the hard parts (QR auth, session persistence, auto-reconnect), and how to get your AI assistant running in minutes without touching a server.
Why WhatsApp Bots Need Managed Hosting
A WhatsApp bot isn't a simple webhook that wakes up when a message arrives. It holds an active, persistent connection to WhatsApp's servers — similar to how your phone app stays connected in the background. Break that connection and messages stop arriving. Reconnect too slowly and WhatsApp may temporarily flag your session.
Running a bot on your laptop means it goes offline every time you close the lid, restart, or lose Wi-Fi. For a personal assistant that's supposed to answer you at 2 AM or respond to a customer while you're asleep, that's a non-starter. You need a server that's always on, always connected, and smart enough to recover on its own when something goes wrong.
Three things make WhatsApp hosting trickier than Telegram or Discord:
- QR re-authentication — WhatsApp sessions expire, and re-linking requires scanning a new QR code. Without a hosted UI, you'd need to SSH into your server every time.
- Connection stability — The Baileys protocol library that powers personal-number WhatsApp bots requires a stable long-lived TCP connection. Network blips need fast, automatic recovery.
- Session persistence — WhatsApp session keys are stored on disk. If you lose them (container restart, disk wipe), you have to re-pair from scratch.
Managed hosting solves all three — and that's exactly what OpenClaw Launch is built for.
How OpenClaw Uses Baileys for WhatsApp
OpenClaw's WhatsApp integration uses the Baileys library — an open-source implementation of the WhatsApp Web protocol. This means you can connect a regular personal WhatsApp number without needing a Meta Business account, going through business verification, or paying Meta's per-message fees.
Connection works exactly like WhatsApp Web: scan a QR code once from your phone, and the bot takes over from that linked device slot. Your number stays yours — the bot just acts as another linked device. You can still use WhatsApp normally on your phone while the bot runs in the cloud.
On OpenClaw Launch, the QR code appears right in your dashboard. No SSH required, no terminal commands, no config files to edit. When your session expires and needs re-authentication, you get notified and can re-scan from the same dashboard page.
Hosting Options Compared
There are several ways to host a WhatsApp bot, each with different trade-offs between cost, setup complexity, and reliability:
| Option | Cost | Setup Time | Auto-Reconnect | Session Backup |
|---|---|---|---|---|
| OpenClaw Launch | From $3/mo | ~1 min | Yes | Yes |
| Self-host on VPS (Hetzner, etc.) | $4–6/mo + time | 2–6 hours | Manual setup | Manual setup |
| WhatsApp Business API (Meta) | Per-message fees | Days (verification) | Yes (webhook) | N/A |
| Local machine | Free | ~30 min | No | No |
For most users, managed hosting on OpenClaw Launch hits the right balance. The WhatsApp Business API is the right choice if you need a dedicated business number, CRM integrations, or high-volume messaging — but it requires Meta verification (which can take days) and charges per conversation. For personal use or small teams, Baileys via OpenClaw Launch is simpler, cheaper, and works with a number you already have.
Deploy Steps: WhatsApp Bot with OpenClaw Launch
Getting a WhatsApp AI bot running on OpenClaw Launch takes four steps:
- Sign up at OpenClaw Launch. Free trial available — no credit card required to start.
- Deploy an instance. Pick your AI model (Claude, GPT-4o, Gemini, DeepSeek, or any OpenRouter model), then click Deploy. Your container is provisioned in seconds using OpenClaw's warm pool — no cold start.
- Connect WhatsApp. In your instance dashboard, select WhatsApp as your channel. The
@openclaw/whatsappplugin installs automatically. A QR code appears on screen — open WhatsApp on your phone, go to Linked Devices, and scan it. - Start chatting. Send any message to your WhatsApp number. The AI responds immediately. Session keys are backed up automatically so you won't need to re-scan unless you explicitly unlink the device.
For more detail on the WhatsApp connection flow, see the OpenClaw WhatsApp guide.
WhatsApp-Specific Hosting Challenges
QR Re-Authentication
WhatsApp Web sessions don't last forever. WhatsApp may revoke a linked device session after extended inactivity, a phone OS update, or a security event on your account. When that happens, your bot stops receiving messages until you re-scan.
On a self-hosted VPS, re-authentication requires SSHing in, running a script, and somehow viewing the QR code in a terminal — which is awkward and easy to miss at 3 AM. OpenClaw Launch surfaces re-authentication as a simple dashboard prompt. You get a notification, open the page, scan, done.
Connection Stability
Baileys maintains a persistent WebSocket connection to WhatsApp. Network interruptions, server reboots, or memory pressure can drop this connection. A well-written deployment needs to detect disconnection and reconnect within seconds — not minutes.
OpenClaw's built-in reconnection logic handles this automatically. The container monitors connection health and re-establishes the session without losing queued messages. You don't need to configure anything.
Session Persistence
The session keys that prove your bot is a legitimate linked device live in a directory on disk. If your container is deleted and recreated (say, after a host migration or an accidentaldocker rm), those keys are gone and you have to re-pair from scratch.
OpenClaw Launch uses bind-mounted volumes for session data. Even if the container is recreated, the session directory survives. Your pairing persists across restarts, updates, and redeployments without any extra configuration on your part.
How Managed Hosting Solves These Problems
Running a reliable WhatsApp bot yourself means building your own monitoring, reconnection logic, session backup strategy, and dashboard for QR re-auth. That's weeks of work. Managed hosting packages all of this as a service:
- Auto-reconnect — Connection drops are detected and recovered in seconds, automatically.
- Session backup — Session keys are persisted to durable storage and survive container restarts and updates.
- Dashboard QR re-auth — When WhatsApp revokes the session, you get notified and can re-scan without touching a terminal.
- 24/7 uptime monitoring — Your bot is monitored continuously. PM2 or equivalent restarts it if it crashes.
- Zero maintenance updates — OpenClaw and its plugins are kept updated by the platform. You don't chase breaking changes in Baileys.
For a deeper look at how OpenClaw handles hosting more broadly, see the OpenClaw Hosting Guide and the hosting overview.
Frequently Asked Questions
Do I need a WhatsApp Business account?
No. OpenClaw's WhatsApp integration uses Baileys, which connects via the WhatsApp Web protocol. Any regular WhatsApp number works — personal or business. You do not need a Meta Business account, business verification, or a dedicated business phone number. If you do need the official WhatsApp Business API (for high-volume or CRM integrations), that's a separate path that requires going through Meta directly.
What happens if my WhatsApp session expires?
OpenClaw Launch will notify you that the session needs re-authentication. Open your dashboard, find the WhatsApp connect section, and scan the new QR code with your phone. The whole process takes under a minute. Your bot's memory, settings, and AI model configuration are not affected — only the WhatsApp pairing is reset.
Can I use the same WhatsApp number for the bot and my personal chats?
Yes. The bot runs as a linked device on your account, just like WhatsApp Web on a computer. You can still send and receive messages normally on your phone. The bot will respond to messages directed at it based on your configured dmPolicy — set to pairingby default, which means only users who have paired through the web gateway can interact with the AI.
Is WhatsApp bot hosting cheaper than the Business API?
Yes, significantly. The WhatsApp Business API charges per conversation (typically $0.005–$0.08 per conversation depending on country and conversation type). At moderate volumes — say, 500 conversations per month — that adds up to $5–40 in API fees alone, before hosting costs. OpenClaw Launch with Baileys charges a flat monthly fee starting at $3/mo with no per-message charges. The trade-off is scale: Baileys suits personal use and small teams; the Business API is designed for enterprise volume.