Skip to content

Quick start (Docker)

Requirements: Docker Engine with Docker Compose v2.

v1.0.1 was released on 2026-12-05 — tag v1.0.1, GitHub Release, and a public container image ghcr.io/leviro/relay:1.0.1 (also 1.0, latest, and sha-0fe673ac7941ed75727353708724af50310b44b3). The steps below install from source with Compose, which builds the image locally; to use the published image instead, run docker pull ghcr.io/leviro/relay:1.0.1.

Terminal window
git clone https://github.com/leviro/relay.git
cd relay
Terminal window
cp .env.example .env

Generate independent secrets for JWT_SECRET, SESSION_SECRET, and WA_SESSION_ENCRYPTION_KEY, and set a strong ADMIN_PASSWORD:

Terminal window
openssl rand -hex 32 # JWT_SECRET
openssl rand -hex 32 # SESSION_SECRET
openssl rand -base64 32 # WA_SESSION_ENCRYPTION_KEY
openssl rand -base64 32 # ADMIN_PASSWORD

Production startup refuses to start with the placeholder values from .env.example, with JWT_SECRET equal to SESSION_SECRET, or with WA_SESSION_ENCRYPTION_KEY equal to either of them. The values must be different, random, and kept private.

Back up your encryption secrets separately from the database. Losing or rotating WA_SESSION_ENCRYPTION_KEY — or SESSION_SECRET when no dedicated key is set — makes every stored WhatsApp credential undecryptable. The only recovery is logging out and pairing again. The same applies to encrypted backup and webhook credentials.

Set APP_BASE_URL in .env to the exact public origin of your installation (for example https://relay.example.com, or http://localhost:3000 for a local-only install). It is required in production and must be a bare origin — scheme + host (+ non-standard port if any), with no path, query, fragment, or userinfo. A lone trailing slash is tolerated and stripped; anything else is refused at startup.

Terminal window
docker compose up -d --build
docker compose ps

This builds the image locally as leviro-relay:local.

Open http://localhost:3000, sign in using the admin credentials from .env, open Session, and scan the QR code from WhatsApp’s Linked devices screen.

The Compose stack binds the application port to localhost only (127.0.0.1:${APP_PORT:-3000}) and does not publish the MongoDB or Redis ports. Follow startup logs with:

Terminal window
docker compose logs -f api worker

Docker persists MongoDB, Redis, uploads, and logs in named volumes. Running docker compose down keeps them; docker compose down -v permanently removes them.

See Deployment for upgrades, backups, reverse proxy configuration, and production hardening.