---
title: "Deploy WhatsApp Poll Bot"
description: "Self-hosted WhatsApp bot to schedule recurring polls across multiple groups"
category: "Bots"
url: https://railway.com/deploy/whatsapp-poll-bot
---

# Deploy WhatsApp Poll Bot

Self-hosted WhatsApp bot to schedule recurring polls across multiple groups

**[Deploy WhatsApp Poll Bot on Railway](https://railway.com/template/whatsapp-poll-bot)**

- **Creator:** Couteau Arthur's Projects
- **Category:** Bots

## Template content

### poll-bot-whatsapp https://devicons.railway.app/React

- **Source:** https://github.com/Logorrheique/poll-bot-whatsapp
- **Health check:** /health
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Documentation

# Deploy and Host WhatsApp Poll Bot on Railway

  WhatsApp Poll Bot is a self-hosted bot that schedules and sends recurring polls to multiple WhatsApp groups, with a mobile-first web dashboard to manage polls, view results, and
  administer users. Powered by Baileys (no headless browser), it runs in ~80 MB RAM and supports daily, weekly, monthly, or custom cron schedules.

  ## About Hosting WhatsApp Poll Bot

  Hosting Poll Bot involves running a single Node.js process that combines an Express HTTP dashboard, a Baileys WebSocket client (the WhatsApp connection), and a node-cron scheduler — all
  inside one container. Persistent state lives in SQLite on a mounted volume so the WhatsApp session survives redeploys; optional PostgreSQL backups go to a separate service for safety.
  After the first deploy, you scan a QR code once with the WhatsApp account dedicated to the bot, then sign in to the dashboard with a 6-digit code sent over WhatsApp. From there, you
  create poll schedules, target groups, and watch votes flow in real time.

  ## Common Use Cases

  - Recurring attendance polls across multiple groups (team check-ins, sports practice, weekly meal planning)
  - Self-hosted survey scheduler for communities, clubs, and small organizations
  - Lightweight alternative to commercial WhatsApp group management SaaS, kept fully on infrastructure you control

  ## Dependencies for WhatsApp Poll Bot Hosting

  - A **secondary WhatsApp account** dedicated to the bot (never use your personal account — Meta may flag automated activity)
  - A **persistent volume** mounted at `/app/data` for the SQLite database and WhatsApp session
  - A **PostgreSQL service** (optional, but recommended) for off-volume backups — auto-provisioned by this template

  ### Deployment Dependencies

  - [Source repository](https://github.com/Logorrheique/whatsapp-poll-bot) — MIT licensed, ~290 Vitest tests
  - [Baileys](https://github.com/WhiskeySockets/Baileys) — pure-Node WhatsApp Web protocol library
  - [WhatsApp Web](https://web.whatsapp.com/) — for the initial QR pairing reference

  ### Implementation Details

  After deployment, set two required environment variables in Railway:

  - `ADMIN_PHONES` — your phone number(s) in international format without the `+` (e.g., `33612345678`), comma-separated
  - `PAIR_SECRET` — 24+ random characters that gate the QR display (generate with `openssl rand -hex 24`)

  Optional variables (`VIEWER_PHONES`, `ALLOWED_PHONES`, `TIMEZONE`, `BACKUP_TRIGGER_SECRET`, `BAILEYS_LOG_LEVEL`) are documented in
  [`.env.example`](https://github.com/Logorrheique/whatsapp-poll-bot/blob/master/.env.example).

  Once the service boots, open its public URL, choose **Admin mode**, enter your `PAIR_SECRET`, and scan the QR code with the bot's WhatsApp account (Settings → Linked Devices → Link a
  Device). You'll then be prompted for your phone number and a 6-digit verification code sent via WhatsApp — and you're in.

  ## Why Deploy WhatsApp Poll Bot on Railway?

  
  Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically
  and horizontally scale it.

  By deploying WhatsApp Poll Bot on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more
  on Railway.
  

## Similar templates

- [Telegram JavaScript Bot](https://railway.com/deploy/5lRkWa) — A template for Telegram bot in JavaScript using grammY
- [Cobalt Tools [Updated Aug ’26]](https://railway.com/deploy/cobalt) — Cobalt Tools [Aug ’26] (Media Downloader, Converter & Automation) Self Host
- [Telegram Gateway](https://railway.com/deploy/railway-telegram-gateway) — Multi-bot Telegram webhook gateway with real-time WebSocket event streaming

Open this page in a browser: https://railway.com/deploy/whatsapp-poll-bot
