Skip to main content
GOWA reads configuration from three places:
  • Command-line flags on whatsapp rest (run ./whatsapp rest --help for the full list).
  • Environment variables.
  • A .env file in the working directory (src/.env when running from source; copy src/.env.example).
The .env file only fills in variables that are not already set in the environment.
In the current code, environment variables (including .env) are applied after flags are parsed, so a variable that is set overrides the matching flag. MCP OAuth settings, --allow-unauthenticated, --trusted-origins, --chatwoot-webhook-allow-unsigned, and --webhook-all-device-receipts are exceptions whose explicit flags win. Set each option in one place only. For example, WHATSAPP_WEBHOOK_INSECURE_SKIP_VERIFY=true overrides --webhook-insecure-skip-verify=false.
Booleans accept true/false. Durations use Go syntax (30s, 5m, 3h). List values are comma-separated.

Commands

Server

Dashboard

MCP

See MCP server.

Storage

Chat storage (chats, messages, schedules) always lives in storages/chatstorage.db and is not configurable. SQLite databases for sessions, chat storage, and OAuth are created with 0600 permissions. Directories GOWA creates for these files use 0700. Existing directories keep their permissions. Permission changes that are not supported by the filesystem are logged as warnings. For PostgreSQL session and key stores, an omitted or blank sslmode defaults to verify-full for remote dial targets. localhost, loopback IPs, and Unix sockets default to disable. Explicit URI settings, PGSSLMODE, and service configuration remain effective. A PGSERVICE entry can override the URI host and TLS mode. For managed PostgreSQL, supply sslmode=verify-full and the required CA configuration explicitly.

WhatsApp behavior

Webhooks

See Webhooks.

Chatwoot

The event filter and one-way revoke option are available on GOWA main after v9.9.0. See Chatwoot integration for behavior and examples.

Fixed limits

These are compiled in and cannot be changed by configuration:

Media URL downloads

Send requests that fetch media, documents, or link previews accept HTTP and HTTPS URLs. Public URL fetches reject loopback, private, link-local, metadata, multicast, and reserved destinations. Redirects and the address actually dialed are checked. These downloads connect directly and do not use HTTP_PROXY or HTTPS_PROXY. GOWA can read its own /statics URLs from disk. Chatwoot attachment downloads can use the configured Chatwoot destination or allowed hosts, including an internal host when trusted through that integration. This exception does not apply to arbitrary URLs submitted to the send API. Use file uploads when the source is private.

Not used

src/.env.example lists WHATSAPP_WEBHOOK_INCLUDE_OUTGOING and WHATSAPP_CHAT_STORAGE, but the current code does not read either. Setting them has no effect.

Example

.env
Equivalent flags: