Installation
WA Gateway runs as a single Docker container. You need a machine with Docker and Docker Compose: a small VPS (1 vCPU, 1 GB RAM) is plenty for a handful of numbers.
1. Create a folder
mkdir -p ~/wa-gateway && cd ~/wa-gateway2. Create docker-compose.yaml
services:
wa-gateway:
container_name: wa-gateway
image: mimamch/wa-gateway:latest
restart: unless-stopped
ports:
- "5001:5001"
volumes:
- ./data:/app/data # database, WhatsApp credentials, inbox media
- ./media:/app/media # media received for webhooks
environment:
- DATABASE_URL= # optional, Postgres URL (empty = SQLite in ./data)Image and versions
The image is published to Docker Hub (mimamch/wa-gateway) and GitHub (ghcr.io/mimamch/wa-gateway). Tags follow the version: 5 gets every v5 update, 5.0 only patches, 5.0.0 never changes, and latest is the newest stable release. edge is built from every change on master, before it's released. Release notes are on GitHub Releases.
3. Start it
docker compose up -dOpen http://YOUR_SERVER:5001. The first visit asks you to create the owner account. Continue with the Quick start.
Keep the volumes
Everything that matters lives in ./data: the SQLite database (users, keys, chats and the linked numbers' credentials) and the inbox media. Back up this folder (and your Postgres database, if you use one) and you can move the gateway to another server at any time.
Using Postgres
SQLite is fine for most setups. If you prefer Postgres (or already run one), add it to the compose file and set DATABASE_URL. Tables are created automatically on start.
services:
wa-gateway:
image: mimamch/wa-gateway:latest
restart: unless-stopped
ports:
- "5001:5001"
volumes:
- ./data:/app/data
- ./media:/app/media
environment:
- DATABASE_URL=postgres://wa:change-me@postgres:5432/wa
depends_on:
- postgres
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
- POSTGRES_USER=wa
- POSTGRES_PASSWORD=change-me
- POSTGRES_DB=wa
volumes:
- ./postgres:/var/lib/postgresql/dataPutting it behind HTTPS
For anything beyond a test, serve the dashboard over HTTPS with a reverse proxy. The live parts of the dashboard (inbox, events) use server-sent events, which work through any proxy that doesn't cut long requests.
wa.example.com {
reverse_proxy localhost:5001
}server {
listen 443 ssl;
server_name wa.example.com;
# ssl_certificate ... ;
client_max_body_size 70m; # inbox attachments go up to 64 MB
location / {
proxy_pass http://127.0.0.1:5001;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_read_timeout 1h; # live updates keep one request open
}
}X-Forwarded-For lets the audit log show your users' real IP addresses.
Updating
cd ~/wa-gateway
docker compose pull
docker compose up -dDatabase changes are applied automatically when the new version starts. Linked numbers stay linked. If you pinned a version (:5.0.0), change the tag in the compose file first.
Running without Docker
You need Node.js 24 or newer and pnpm.
git clone https://github.com/mimamch/wa-gateway.git
cd wa-gateway
pnpm install
pnpm build # builds the dashboard
pnpm start # http://localhost:5001Settings are read from environment variables (or a .env file in development). See Configuration.