Native installation
Requirements
Section titled “Requirements”- Node.js 24 LTS
- MongoDB
- Redis
- FFmpeg and FFprobe for audio/video processing
Native install is from source. v1.0.1 was released on 2026-12-05 (tag
v1.0.1, GitHub Release, published imageghcr.io/leviro/relay:1.0.1), but a native install still needs the source tree — clone the repository first, as the commands below will not work without it (.env.examplelives in it).
git clone https://github.com/leviro/relay.gitcd relaycp .env.example .envnpm cinpm startnpm start builds the frontend and launches the API and worker together as separate processes. Ensure MONGODB_URI, REDIS_HOST, and REDIS_PORT in .env point to reachable services. Production startup validates the configuration and refuses to start with placeholder secrets, equal JWT_SECRET/SESSION_SECRET values, or a missing APP_BASE_URL.
MONGODB_URI and REDIS_HOST are required in production — there is no localhost default there. APP_BASE_URL must be a bare origin (scheme + host, no path/query/fragment/userinfo) and is required in production; APP_BIND_ADDRESS (new) wins over HOST when set, and the default bind is loopback-only.
For a single-process installation:
npm run start:singleFor development with file watching:
npm run devProcess topology
Section titled “Process topology”| Mode | Command | When to use |
|---|---|---|
| Separate (recommended) | npm start |
Production — restarting the API never drops the WhatsApp connection |
| Single | npm run start:single |
Small installs and local troubleshooting |
Do not launch src/worker.js alongside WORKER_MODE=single; that would create two consumers and two WhatsApp connections. Run exactly one worker per WhatsApp account/session.
For systemd/supervisord, run the two roles explicitly: WORKER_MODE=separate node src/index.js plus WORKER_MODE=separate node src/worker.js.