How I Built Luna: A Multi-Dimensional WhatsApp Bot That Survives Meta's Ban Hammer
Описание и применение
Бот WhatsApp Luna успешно работает на VPS без интерактивного терминала, избегает блокировок за быстрые реакции, не перегружает сервер и не превышает лимиты бесплатных сервисов Redis и MongoDB.
Задача
Deploying a WhatsApp bot on VPS without interactive terminal, avoiding bans from fast reactions, preventing server overload, and overcoming free tier Redis limits.
Результат
The bot now operates reliably on VPS without interactive terminals, avoids WhatsApp bans by throttling reactions, runs without server overload, and no longer hits free tier limits on Redis or MongoDB.
Рабочий процесс
- 1. Deploy luna_connect to generate session tokens via web QR pairing.
- 2. Set SESSION env variable with generated token.
- 3. Disable REACT=true; enable reaction queueing with BullMQ.
- 4. For bloombot, run three instances and rotate them to distribute traffic.
- 5. Move bot to a higher-tier VPS, add pm2 and an Express dashboard on port 3000.
- 6. Replace free-tier Upstash Redis with self-hosted or managed Redis; use MongoDB Atlas instead of local MongoDB.
Доказательства
QR on server: Some VPS don't give you interactive terminal. You can't scan. Fix: I built luna_connect / xserver.frionode.online — generates BLOOM~ / LUNA~ session tokens via pairing code. Use that in SESSION env.
WhatsApp bans: Not random. Caused by fast reactions + one account sending too fast in groups. Fix: REACT=false by default, queue reactions with BullMQ, and for bloombot I use triple instance rotation to spread load.
Server overload: Luna logs, spawns Pokemon, watches statuses — kills small VPS. Fix: moved off free tiers to better server, added pm2 + Express dashboard on :3000 to monitor uptime.
Upstash Redis limit: Free tier hits limit fast with usage tracking/caching. Fix: self-host Redis or use managed Redis with higher limit. Don't use local Mongo on VPS either, use Atlas.
- Дата записи: 2026-10-11T14:56:12.040Z