whatsapp-gateway-relay-softagon
Health Uyari
- License — License: Apache-2.0
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 7 GitHub stars
Code Basarisiz
- rm -rf — Recursive force deletion command in .github/workflows/release-binaries.yml
- Hardcoded secret — Potential hardcoded credential in .github/workflows/release-binaries.yml
- network request — Outbound network request in console/src/composables/useApi.ts
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
Connect your apps and local AI agents to WhatsApp without Chromium, Node.js, PostgreSQL, or Redis. Single ~55 MB Rust container with Web Console & MCP Server.
Softagon Relay
Connect your apps and local AI agents to WhatsApp without spinning up Chromium, Node.js, PostgreSQL, Redis, or external transcription APIs.
Self-hosted WhatsApp Web gateway, embedded Web Console, and native local MCP Server in a single Rust container (~55 MB).
Docs: Português (BR) · English · Español · Français · Bahasa Indonesia · Basa Betawi · Basa Sunda · Basa Jawa · Hata Batak Toba · Bahasa Melayu · Native Binary & AI Sandboxes · Grok Bot Guide · Add to Grok Bot (1-Click Template) · Changelog & Roadmap · Contributing · Security
Quick Start (One-Line Docker Run)
KEY="$(openssl rand -hex 32)" && echo "RELAY_API_KEY=$KEY" && docker run -d --name softagon-relay --restart unless-stopped -p 127.0.0.1:8080:8080 -v relay-data:/data -e RELAY_API_KEY="$KEY" softagon/relay:latest
Binds to
127.0.0.1:8080by default and generates a random 256-bit key. Known placeholder keys and keys shorter than 16 characters are rejected at startup.
Open http://localhost:8080/console (or /manager), paste the printed RELAY_API_KEY, type a phone number, and scan the live SVG QR code.
Quick Start Without Docker (Native Linux Binary & AI Sandboxes)
Every GitHub Release publishes verified linux-x86_64 and linux-arm64 native binaries (.tar.gz + .sha256) built with 100% feature parity with Docker — Whisper offline transcription enabled by default, embedded 10-language Web Console, SQLite WAL, and all 29 MCP tools in one executable. Ideal for AI cloud computers/sandboxes (Meta Use AI / Muse, Grok Bot), Raspberry Pi, or rootless Linux hosts where Docker is unavailable or non-persistent.
See the Native Binary & AI Sandboxes Guide for SHA-256 verified setup in ~/workspace/softagon-relay, RELAY_API_KEY_FILE (chmod 600) + RELAY_ENV_FILE, and loopback-only pairing (8-character phone code or qr.png).

What It Includes
- Single container, zero external databases: native Rust binary (Tokio + Axum) with embedded SQLite (WAL) — no PostgreSQL, Redis, RabbitMQ, or Chromium required.
- Embedded Raycast-style Web Console (
/console): keyboard-first Vue 3 UI (⌘K/Ctrl+K), Light/Dark theme, 10 languages — Português (pt-BR), English (en), Español (es), Français (fr), Bahasa Indonesia (id), Basa Betawi (bew, Jakarta & Bekasi), Basa Sunda (su, Bandung & Bekasi), Basa Jawa (jv, Surabaya), Hata Batak Toba (bbc, Medan), and Bahasa Melayu (ms, Medan) — WebMCP-ready (document.modelContext.registerTool+ declarative agentic HTML forms so browser AI agents like Claude/ChatGPT can inspect health, sessions, webhooks, and send messages natively), live SVG QR & 8-character code pairing (personal & WhatsApp Business / Coexistence viawhatsapp-rust 0.8.0), localized protocol errors, test messaging, all 11 webhook events, live OpenAPI runner (/console/api), and dedicated MCP Server Reference (/console/mcp) with copyable setup snippets and searchable catalog of all 29 tools. - Native Local MCP Server (
v0.3.0+,rmcp): connects local AI agents (Claude Desktop, Cursor, Antigravity, VS Code) directly to the internalRelayServicewithout going through HTTP REST:- STDIO (default local mode):
softagon-relay mcp --stdio(logs routed tostderr). - Streamable HTTP:
softagon-relay mcp --httporMCP_HTTP_ENABLED=true— binds to127.0.0.1by default (Docker opt-in:MCP_HTTP_HOST=0.0.0.0+MCP_ALLOW_CONTAINER_BIND=truebehind-p 127.0.0.1:8091:8091),Originvalidation (anti-DNS rebinding), Bearer auth, destructive tools blocked by default, and SQLite audit log (mcp_audit_log).
- STDIO (default local mode):
- Versioned HTTP API (
/v1) + OpenAPI 3.2.1: available at/openapi.json,/openapi.yaml, and/docs(Scalar). - Signed Webhooks (HMAC-SHA256): persistent SQLite outbox with exponential backoff + jitter and stable UUIDv7 event IDs.
- Offline Multilingual Voice-Note Transcription: pure-Rust OGG/Opus decoding (
symphonia+symphonia-opus+rubato, no FFmpeg) +whisper.cpp(lazy-loaded on demand and unloaded after idle timeout). - Pluggable Media Storage: Local filesystem (
/data/media) or S3-compatible object storage (AWS S3, Cloudflare R2, MinIO).
Measured Resource Footprint & 8-Hour Production Soak Test
Measured in continuous real-world production (2026-11-27/28, linux/amd64, compiled with --features whisper, 1 real WhatsApp account connected, 16 automated 30-minute checkpoints over 8 hours) using docker stats --no-stream on Docker 29.1.3 / Linux (x86_64):
| Metric | Measured Result (8h Soak Test) | Notes |
|---|---|---|
Docker image size (linux/amd64) |
~55 MB compressed | Rust binary, Vue 3 Console, SQLite, Opus decoder, rmcp, whisper.cpp |
| Boot / Idle (0 paired sessions) | ~4–5 MiB RAM | Right after container startup, before pairing |
| Steady-state RAM (1 active session, 8h) | 31.7–32.1 MiB RAM | Returned below initial 48 MiB baseline after Whisper idle unload — zero memory leak |
Peak RAM (Whisper base transcribing) |
286.4 MiB RAM | Lazy-loaded on voice note, auto-unloaded after 180s idle back to ~32 MiB |
| Average CPU | 0.04%–0.19% | Continuous WebSocket + SQLite WAL + webhook dispatcher |
| Signed webhooks delivered (Bearer + HMAC) | 1,083 | 0 auth failures, 0 missing signatures, 0 status@broadcast leaks |
@lid → phone resolution (human chats) |
100% (127/127) | Resolved across private @lid, @s.whatsapp.net, and @g.us group chats |
Offline Whisper base audio transcription |
100% (5/5) | Pure-Rust OGG/Opus decode + CPU inference up to 4.5× faster than real-time |
Critical errors (level: ERROR) in 8h |
0 | Longest continuous unbroken streak: 6h20 (plus 2 automatic WebSocket reconnects) |
Architecture note: Prebuilt Docker images currently publish
linux/amd64. Multi-archlinux/arm64support is tracked on our roadmap (you can also build locally on ARM64 withdocker build).
Local MCP Server (AI Agents)
- Recommended when
softagon-relayis already running in Docker: enable Streamable HTTP inside the same container so a single process owns the WhatsApp WebSocket and SQLite database. Publish the port only on host loopback (-p 127.0.0.1:8091:8091) and opt in to container bind (-e MCP_HTTP_ENABLED=true -e MCP_HTTP_HOST=0.0.0.0 -e MCP_ALLOW_CONTAINER_BIND=true) — the MCP server still enforces loopbackHost&Originchecks plusAuthorization: Bearer <RELAY_API_KEY>athttp://127.0.0.1:8091/mcp. - STDIO via Docker (safe default alongside a running server — reads SQLite without touching active WhatsApp sessions):
{
"mcpServers": {
"softagon-relay": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "relay-data:/data",
"-e", "RELAY_API_KEY",
"softagon/relay:latest",
"mcp", "--stdio"
],
"env": {
"RELAY_API_KEY": "<paste-your-generated-key>"
}
}
}
}
Standalone STDIO (no
servecontainer running): add"-e", "MCP_RESTORE_SESSIONS=true"toargsso STDIO reconnects your persisted WhatsApp sessions directly. Never setMCP_RESTORE_SESSIONS=truewhile anothersoftagon-relayserver is already connected to the same/datavolume.
If you prefer running natively without Docker, prebuilt linux-x86_64 and linux-arm64 binaries (.tar.gz + .sha256, with Whisper and Web Console embedded) are attached to GitHub Releases — see Native Binary & AI Sandboxes.
Tools exposed: list_sessions, create_session, create_pairing_link (zero-login auto-renewing QR page /pair/{token} + qr.png), request_pair_code (8-character phone code alternative), get_session_status, list_chats, search_messages, get_chat_messages, get_message_transcription, get_contact (@lid phone & display name resolution), list_contacts, save_contact, sync_contacts, check_whatsapp, get_profile_picture, list_groups, get_group_info, subscribe_presence, send_chat_presence, mark_read, send_text_message (with reply_to_message_id), send_media_message (media_url or data_base64, as_voice_note, sticker), send_reaction, send_location, send_contact, edit_message, revoke_message, and (disabled unless MCP_ALLOW_DESTRUCTIVE=true + confirm: true) logout_session / delete_session.
Using Grok Bot? Import our official 1-Click Grok Bot Template (or copy
integrations/grok-bot/TEMPLATE.md) and follow the Grok Bot Integration Guide — zero-login/pair/{token}QR pairing, directbearer_tokenroutine webhooks withsession.disconnectedalerts,WEBHOOK_COALESCE_SECONDS=4(global default0for zero-latency APIs;4sin Grok Bot kit to coalesce rapid client message bursts and preserve hourly routine quotas), HTTP429 Retry-After, automatic@lidhistory migration, and dynamicRELAY_HOMEpersistence.
Hardened Docker Compose
Use the repository's compose.yaml (read_only: true, cap_drop: ALL, no-new-privileges:true, non-root UID 10001). It builds the image locally from the Dockerfile (tagged softagon/relay:<version>); to run the prebuilt Docker Hub image instead, replace the build: block with image: softagon/relay:latest. The port is published on host loopback only (127.0.0.1:${HOST_PORT:-8080}:8080); to expose it on a server, put a TLS reverse proxy in front of it or edit the ports: mapping deliberately.
cp .env.example .env
# Edit RELAY_API_KEY in .env
docker compose up -d
Backups
docker exec softagon-relay softagon-relay backup /data/backups/manual
docker cp softagon-relay:/data/backups/manual ./relay-backup
backup [dir] writes a WAL-safe snapshot of both relay.db and whatsapp-sessions.db (WhatsApp Web encryption keys, files created 0600) into the directory (default $DATA_DIR/backup-<timestamp>/). Store the copy encrypted.
Frequently Asked Questions (FAQ)
How much RAM does Softagon Relay use compared to Chromium-based WhatsApp gateways?
Softagon Relay uses ~4–5 MiB RAM at idle and ~32 MiB RAM (31.7–32.1 MiB measured over 8 h) with an active WhatsApp WebSocket session in a ~55 MB compressed Docker image, compared to 350–900+ MiB commonly required by headless Chromium/Puppeteer and Node.js stacks.
Does Softagon Relay require PostgreSQL, Redis, RabbitMQ, or FFmpeg?
No. Sessions, messages, webhook delivery retries, and MCP audit logs run on embedded SQLite (WAL), and OGG/Opus voice-note decoding runs in pure Rust (symphonia + rubato) before local whisper.cpp transcription.
Which languages are supported in the Web Console and documentation?
The embedded Web Console and visual guides support 10 languages: Português (BR), English, Español, Français, Bahasa Indonesia, Basa Betawi (Jakarta & Bekasi), Basa Sunda (Bandung & Bekasi), Basa Jawa (Surabaya), Hata Batak Toba (Medan), and Bahasa Melayu (Medan).
How do I connect Claude Desktop, Cursor, Antigravity, or n8n?
AI coding/desktop agents connect via the native MCP Server (softagon-relay mcp --stdio or Streamable HTTP at http://127.0.0.1:8091/mcp). Workflow tools like n8n, Make, or custom backends connect via the versioned /v1 REST API, HMAC-SHA256 webhooks, and /openapi.json.
Transparency on AI-Assisted Development
Softagon Relay was built using AI-assisted software engineering alongside human architecture decisions, code review, security design, and live testing against real WhatsApp accounts. All automated checks (vue-tsc, vite build, cargo fmt, cargo clippy --all-targets -- -D warnings, and integration tests covering REST, SQLite, webhooks, audio decoding, and MCP security) run locally before every push.
Roadmap
- Native Desktop App (Tauri — Windows, Linux & macOS): bundle the Rust core, embedded Console, and local MCP Server with a system tray icon so desktop users do not need Docker.
- Multi-arch
linux/arm64Docker images for Raspberry Pi, Apple Silicon, and ARM VPS servers.
If you need the Tauri Desktop edition, ARM64 images, or specific MCP tools, open a GitHub Issue and share your OS and use case!
Contributors & Language Maintainers
Thank you to our community contributors helping make Softagon Relay better across languages and platforms:
- Bahasa Melayu (
ms): Casey Lee (@caseylee-TC) — UI localization & Bahasa Melayu documentation maintainer (console/src/i18n/ms.json,docs/ms/README.md)
Interested in helping review or maintain another locale? Check out open localization issues and CONTRIBUTING.md!
Disclaimer & License
Softagon Relay is an independent, unofficial open-source project built on whatsapp-rust and is not affiliated with, authorized by, or endorsed by Meta or WhatsApp. Review Meta's Terms of Service, deploy behind TLS, and protect backups of /data.
Licensed under the Apache License, Version 2.0 · Maintained by Softagon Sistemas.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi