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 imageghcr.io/leviro/relay:1.0.1(also1.0,latest, andsha-0fe673ac7941ed75727353708724af50310b44b3). The steps below install from source with Compose, which builds the image locally; to use the published image instead, rundocker pull ghcr.io/leviro/relay:1.0.1.
1. Clone the source
Section titled “1. Clone the source”git clone https://github.com/leviro/relay.gitcd relay2. Create the environment file
Section titled “2. Create the environment file”cp .env.example .env3. Generate secrets
Section titled “3. Generate secrets”Generate independent secrets for JWT_SECRET, SESSION_SECRET, and WA_SESSION_ENCRYPTION_KEY, and set a strong ADMIN_PASSWORD:
openssl rand -hex 32 # JWT_SECRETopenssl rand -hex 32 # SESSION_SECRETopenssl rand -base64 32 # WA_SESSION_ENCRYPTION_KEYopenssl rand -base64 32 # ADMIN_PASSWORDProduction 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— orSESSION_SECRETwhen 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.
4. Set APP_BASE_URL
Section titled “4. Set APP_BASE_URL”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.
5. Start the stack
Section titled “5. Start the stack”docker compose up -d --builddocker compose psThis builds the image locally as leviro-relay:local.
6. Pair WhatsApp
Section titled “6. Pair WhatsApp”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:
docker compose logs -f api workerDocker 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.