Security
- Set
APP_BASIC_AUTHwith a long random password. Without it, anyone who can reach the port controls your WhatsApp account. - Change
WHATSAPP_WEBHOOK_SECRET. The default issecret. VerifyX-Hub-Signature-256on every webhook. - Terminate TLS at a reverse proxy; GOWA itself speaks plain HTTP.
- Restrict
/statics. QR codes and downloaded media under/statics/*are served without Basic Auth. Block or protect that path at the proxy if media is sensitive, and prunestatics/mediaregularly. - Do not expose
/chatwoot/webhookwithoutCHATWOOT_WEBHOOK_SECRETwhen Chatwoot is enabled. - Set
APP_CORS_ALLOWED_ORIGINSif browsers call the API directly; empty allows any origin. - Bind privately (
APP_HOST=127.0.0.1or a private network) when only local services need access. - Rate-limit failed logins at the proxy; GOWA has no built-in rate limiting.
Storage and backups
- Use PostgreSQL for
DB_URIif you want managed backups; chat storage is always SQLite. - Back up while GOWA is stopped, or use your database’s online backup tools.
- Store backups encrypted: the session database is equivalent to a logged-in account.
- Run one GOWA instance per storage. Two processes sharing a session cause disconnects and conflicts. GOWA does not support horizontal scaling.
Docker
- Pin a version tag rather than
latest, and read the release notes before upgrading. - The container runs as a non-root user (UID 20001); make sure mounted volumes are writable.
- The image sets
TZ=UTC. Schedules use thetimezoneyou pass, so this does not affect them.
Reverse proxy
- Set
APP_TRUSTED_PROXIESto your proxy’s address range so client IPs are read correctly. - Allow WebSocket upgrades on
/ws. - Raise the body limit to at least 100 MB (
client_max_body_size 100m;in nginx). - Keep proxy timeouts above GOWA’s 45-second request timeout.
- For sub-path deployments use
APP_BASE_PATH;/healthremains at the root.
Monitoring
- Liveness:
GET /healthreturns200 OKwhen the process and store are up. It does not check WhatsApp. - WhatsApp connectivity: poll
GET /devices/{device_id}/statusand alert whenis_logged_inisfalse. - Events: subscribe to webhooks and alert on missing traffic for busy numbers.
- Logs: collect container stdout; use
APP_DEBUG=trueonly while troubleshooting.
Webhook receivers
- Respond
2xxwithin 10 seconds; process work asynchronously. - Deduplicate by message
id: retries can deliver an event more than once. - After 5 failed attempts the event is dropped. Use
GET /chatsandGET /chat/{jid}/messagesto catch up after an outage.
Sending hygiene
- Message people who opted in or wrote first.
- Pace sends with delays and jitter; avoid identical bulk text.
- Stop on
WA_REACHOUT_TIMELOCK. - Keep
WHATSAPP_ACCOUNT_VALIDATION=trueso unregistered numbers fail fast. - WhatsApp allows up to four linked companion devices per account, and unlinks companions after about 14 days if the phone stays offline.
