WhatsApp setup
WhatsApp connectivity relies on the unofficial Baileys library and may stop working following upstream protocol changes. Leviro Relay is not affiliated with Meta or WhatsApp.
Pairing
Section titled “Pairing”- Open Session in the dashboard.
- Select Connect and wait for the QR code.
- On the phone, open WhatsApp → Linked devices → Link a device.
- Scan the QR code shown in the dashboard.
- Wait for the state to become Connected and for contact/group sync to complete.
WhatsApp session credentials are stored as encrypted Baileys auth records in MongoDB (AES-256-GCM under WA_SESSION_ENCRYPTION_KEY). They survive application and container restarts.
Use Refresh to request a fresh contacts/groups sync. Use Logout only when you intend to unlink the session; it deletes the stored credentials and the next connection requires a new QR code.
Connection behaviour
Section titled “Connection behaviour”- Reconnection retries with exponential backoff (5s, 10s, 20s … capped at 5 minutes) until the socket comes back or WhatsApp says the session was logged out — only that state needs a QR scan.
- While contact/group sync is running (
directorySyncing), the worker holds sends back; that is not a stuck queue. - Run one worker for a WhatsApp session. Two workers using the same MongoDB auth records can invalidate keys or repeatedly disconnect one another.
If the session cannot be read
Section titled “If the session cannot be read”If the dashboard reports that the saved WhatsApp session cannot be read, the encryption key is wrong or was rotated (see Configuration). There is no recovery except logging out and pairing again.
QR code does not appear
Section titled “QR code does not appear”- Confirm the worker is running:
docker compose ps. - Review
docker compose logs --tail=200 worker. - Confirm MongoDB and Redis are healthy.
- Select Logout only if the stored session is known to be invalid, then pair again.