Pick the right library first
Baileys and whatsapp-web.js are unofficial clients that act like WhatsApp Web. They are popular, but WhatsApp can restrict numbers that break its terms, so avoid bulk messaging and use a dedicated number. The Cloud API is the official route for business use.
| Library | How it connects | Typical memory | Notes |
|---|---|---|---|
| Baileys | WebSocket to WhatsApp Web | Low (a few hundred MB) | No browser; fits the free plan |
| whatsapp-web.js | Headless Chromium (Puppeteer) | High (about 1 GB or more) | Easiest API, heavier on RAM |
| WhatsApp Cloud API | Official Meta HTTPS API + webhooks | Low | Needs a Meta business account and a public HTTPS endpoint |
Keeping the session alive
- Store the auth/session folder on disk so a restart does not ask for a new QR scan.
- Back up the session folder over SFTP before you update the bot.
- Run one bot process per number; two processes on the same session will log each other out.
Plans that fit WhatsApp bots
The same bot plans run Discord, Telegram and WhatsApp bots. For whatsapp-web.js pick at least the 1 GB Pro plan; Baileys bots usually run on Starter or the free plan.
| Plan | RAM | CPU | Storage | Price |
|---|---|---|---|---|
| Nano | 256 MB | 1 core · 15% | 340 MB NVMe | ₹20/mo |
| Starter | 512 MB | 1 core · 50% | 2 GB NVMe | ₹53/mo |
| Pro | 1 GB | 1 core · 100% | 6 GB NVMe | ₹130/mo |
| Ultra | 4 GB | 2 cores · 150% | 12 GB NVMe | ₹260/mo |
| Elite | 8 GB | 4 cores · 400% | 18 GB NVMe | ₹455/mo |
| Diamond | 12 GB | 5 cores · 500% | 25 GB NVMe | ₹754/mo |
| Ultimate | 16 GB | 8 cores · 800% | 32 GB NVMe | ₹1,027/mo |
Frequently asked questions
Can I host a WhatsApp bot for free?
Yes. HeavenCloud free WhatsApp bot hosting gives 715 MB RAM, 1 GB SSD and 75% of a CPU core in Nuremberg (Germany) or Miami (USA), online 24/7 with no idle sleep. Lightweight Baileys bots fit it well.
How much RAM does whatsapp-web.js need?
whatsapp-web.js runs a headless Chromium browser, so plan for about 1 GB; the 1 GB Pro plan costs ₹130/mo on HeavenCloud.
Is Baileys or whatsapp-web.js better?
Baileys uses far less memory because it does not run a browser. whatsapp-web.js has a simpler API but needs more RAM.
Will my WhatsApp bot get banned?
Unofficial libraries can get a number restricted if it breaks WhatsApp's terms, for example by bulk messaging. Use a dedicated number, or the official Cloud API for business use.
How do I avoid scanning the QR code after every restart?
Save the session or auth folder to disk and keep it between restarts; the bot then logs back in without a new QR scan.