Description
MultiWA
Self-hosted WhatsApp API gateway with a built-in team inbox
Quick Start โข
Features โข
Screenshots โข
Architecture โข
API Docs โข
SDKs โข
Deployment โข
Release Checks โข
Contributing
—
> [!WARNING]
> MultiWA is not affiliated with WhatsApp or Meta. It connects through WhatsApp Web, and WhatsApp can block or log out numbers that break its terms. Use a number you can afford to lose, and follow WhatsApp’s policies.
๐ฏ What is MultiWA?
MultiWA is a fully self-hosted, open-source WhatsApp API gateway that lets you connect multiple WhatsApp numbers through a single unified REST + WebSocket API. It runs as a docker compose up stack on your own server, ships an admin dashboard for QR onboarding and live chat, and exposes official SDKs for TypeScript, Python, and PHP.
If you want to send and receive WhatsApp messages from your own backend without per-message pricing, vendor lock-in, or sending customer data through a third party, MultiWA is built for you.
โจ Why MultiWA?
| Feature | MultiWA | WhatsApp Cloud API | Evolution API |
|———|———|——————-|—————|
| Self-hosted | โ
Full control | โ Meta-hosted | โ
|
| WhatsApp connection | WhatsApp Web via whatsapp-web.js (a Baileys adapter is experimental) | Meta’s official Cloud API | Baileys or the official Cloud API |
| Admin Dashboard | โ
Full-featured | โ None | โ ๏ธ Basic |
| Visual Automation | โ
Drag & drop builder | โ | โ |
| Knowledge Base AI | โ
OpenAI-compatible | โ | โ |
| Plugin System | โ
Extensible | โ | โ |
| Free | โ
MIT License | โ ๏ธ Per-message pricing | โ
|
| Official SDKs | โ
TS, Python, PHP | โ
Multiple | โ ๏ธ Community |
โญ If you find MultiWA useful, please consider giving it a star!
It helps us grow and motivates continued development.
—
๐ Quick Start
Option 1: Docker โ One Command Setup โก
git clone https://github.com/ribato22/MultiWA.git
cd MultiWA
cp .env.docker .env
docker compose up -d
That’s it! Access:
- ๐ฅ๏ธ Admin Dashboard: http://localhost:3001
- ๐ API Swagger Docs: http://localhost:3333/api/docs
- ๐ API Endpoint: http://localhost:3333/api/v1
> Full stack (with S3 storage + Nginx proxy): docker compose --profile full up -d
> ๐ฆ **Published SDK packages, signed container images, and a one-click Render
> deploy are rolling out** โ see Releasing & Distribution.
Option 2: Local Development
Prerequisites: Node.js โฅ 20 ยท PostgreSQL โฅ 16 ยท Redis โฅ 7 ยท pnpm โฅ 9
git clone https://github.com/ribato22/MultiWA.git
cd MultiWA
pnpm installcp .env.example .env
Setup database (no migrations dir โ db push syncs the schema)
pnpm --filter database exec prisma generate
pnpm --filter database exec prisma db pushBuild workspace packages
pnpm --filter database build
pnpm --filter engines buildStart development
pnpm --filter api dev # API on http://localhost:3000
pnpm --filter admin dev # Admin on http://localhost:3001
—
โก Features
Core
sendReaction and resolveIdentity are stubs and history sync / WhatsApp-addressbook contact save are whatsapp-web.js-only; see Engine Abstraction)call.* webhooks; call links need whatsapp-web.js (see Webhook Events)Admin Dashboard
Automation & AI
Integrations
Enterprise
/metrics (API, root path) + /metrics on the worker health port: default Node/process metrics plus BullMQ queue depth. Public like /health โ restrict at your proxy/firewall background jobs; with DURABLE_SEND=true outbound sends are enqueued (Redis)
and delivered with retry, and with ENGINE_HOST=worker the worker can host
the WhatsApp engine itself (default: engine runs in the API process)
—
๐ธ Screenshots


—
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Nginx (SSL / Proxy) โ
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Admin (Next.js) โ API (NestJS / Fastify) โ
โ Port 3001 โ Port 3333 (Docker) โ
โ โ Port 3000 (local dev) โ
โ โ โโ /api/v1 REST + Swagger UI โ
โ โ โโ /socket.io realtime events โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ WhatsApp Engine Adapters โ
โ โ โโ whatsapp-web.js โ
โ โ โโ Baileys (experimental) โ
โโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Worker (BullMQ) โ PostgreSQL 16 โ Redis 7 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Tech Stack
| Layer | Technology |
|——-|———–|
| API | NestJS 10 + Fastify |
| Admin | Next.js 14 + Tailwind CSS |
| Database | PostgreSQL 16 + Prisma ORM |
| Cache/Queue | Redis 7 + BullMQ |
| WhatsApp | whatsapp-web.js (production) / Baileys (experimental) |
| Auth | JWT (access + refresh tokens) |
| Realtime | Socket.IO |
| Container | Docker + Docker Compose |
| CI/CD | GitHub Actions |
—
๐ API Documentation
Full interactive API documentation is available at /api/docs (Swagger UI).
Example: Send a Text Message
curl -X POST http://localhost:3333/api/v1/messages/text
-H "Authorization: Bearer YOUR_TOKEN"
-H "Content-Type: application/json"
-d '{
"profileId": "profile-uuid",
"to": "6281234567890",
"text": "Hello from MultiWA! ๐"
}'
Example: Connect a WhatsApp Session
curl -X POST http://localhost:3333/api/v1/accounts/YOURACCOUNTID/profiles/YOURPROFILEID/connect
-H "Authorization: Bearer YOUR_TOKEN"
> ๐ See the full documentation site for detailed guides, API reference, webhook events, and more. Source docs are in the docs/ directory.
—
๐ฆ SDKs
The TypeScript SDK is published on npm (npm install @multiwa/sdk), the
Python SDK on PyPI (pip install multiwa), the PHP SDK on Packagist
(composer require multiwa/multiwa-php), and the n8n community node on npm
(npm install n8n-nodes-multiwa).
| Language | Source | Status |
|———-|——–|——–|
| TypeScript/Node.js | packages/sdk | Published on npm ยท npm install @multiwa/sdk |
| Python | packages/sdk-python | Published on PyPI ยท pip install multiwa |
| PHP | packages/sdk-php | Published on Packagist ยท composer require multiwa/multiwa-php |
| n8n community node | packages/n8n-nodes-multiwa | Published on npm ยท npm install n8n-nodes-multiwa |
TypeScript SDK Example
npm install @multiwa/sdk
import { MultiWAClient } from '@multiwa/sdk';const client = new MultiWAClient({
// Docker default: 'http://localhost:3333/api/v1'
// Local dev default if you omit baseUrl: 'http://localhost:3000/api/v1'
baseUrl: 'http://localhost:3333/api/v1',
apiKey: 'your-api-key',
});
// Send a text message
await client.messages.sendText({
profileId: 'profile-uuid',
to: '6281234567890',
text: 'Hello! ๐',
});
—
๐๏ธ Project Structure
MultiWA/
โโโ apps/
โ โโโ api/ # NestJS backend API
โ โโโ admin/ # Next.js admin dashboard
โ โโโ worker/ # BullMQ background worker (can host the engine)
โโโ packages/
โ โโโ core/ # Shared types and utilities
โ โโโ database/ # Prisma schema and migrations
โ โโโ engines/ # WhatsApp engine adapters (whatsapp-web.js, Baileys, mock)
โ โโโ engine-runtime/ # Shared engine helpers (ack status, media, send gate, โฆ)
โ โโโ sdk/ # TypeScript SDK (@multiwa/sdk)
โ โโโ sdk-python/ # Python SDK (multiwa)
โ โโโ sdk-php/ # PHP SDK (multiwa/multiwa-php)
โ โโโ n8n-nodes-multiwa/ # n8n community node (n8n-nodes-multiwa)
โ โโโ chatwoot-bridge/ # Chatwoot integration
โ โโโ wordpress-plugin/# WordPress contact-form plugin
โโโ plugins/ # Plugin directory (runtime loadable)
โโโ docker/ # Dockerfiles + nginx reverse-proxy config
โโโ docs/ # Public documentation (mirrored into docs-site)
โโโ docs-site/ # Docusaurus documentation site (+ GitHub Pages build)
โโโ landing/ # Static landing page assets
โโโ scripts/ # Release-gate scripts and utilities
โโโ .github/workflows/ # CI, release-gate, docker-publish, docs-deploy
—
๐ณ Production Deployment
Detailed deployment guide: docs/16-deployment-docker.md
1. Clone and configure
git clone https://github.com/ribato22/MultiWA.git
cd MultiWA
cp .env.production.example .env
Edit .env with your settings (JWTSECRET, DBPASSWORD, etc.)
2. Build and start (with all optional services)
docker compose --profile full up -d --build3. Sync the database schema (the API container also does this automatically
on startup; run manually only if you need to force it)
docker exec multiwa-api npx prisma db push --schema=packages/database/prisma/schema.prisma4. Access
API: http://your-server:3333/api/docs
Admin: http://your-server:3001
> ๐ก For advanced production setups (custom Nginx, external PostgreSQL, SSL), see the
> docker-compose.production.yml which is optimized
> for enterprise deployments with pre-configured Nginx reverse proxy.
—
โ Release Checks
Every push to main and every pull request runs the Release Gate
workflow at .github/workflows/release-gate.yml.
It performs three checks:
pnpm check:public-boundary. Hard-fails on PEM private key blocks, merge conflict markers, and RFC1918 private IP
literals in non-doc tracked files.
pnpm check:api-contract. Diffs the source controllers in apps/api/src against
scripts/api-routes.snapshot.json
and against the table rows in
docs/07-api-specification.md. If any
side drifts, the gate fails with a precise list of routes that are
added, removed, or missing from the docs.
working file or note slips into the public tree.
Run the gate locally before opening a PR:
pnpm check:release
When you change a controller, also refresh the snapshot so the docs-drift
check stays in sync:
pnpm check:api-contract:update
See docs/release-checklist.md for the full
maintainer release flow.
—
๐ค Contributing
Contributions are welcome. See CONTRIBUTING.md for the
full guide.
1. Fork the repository.
2. Create your feature branch (git checkout -b feature/amazing-feature).
3. Make your changes, then run pnpm check:release to confirm the release
gate still passes.
4. Commit (git commit -m 'feat: add amazing feature').
5. Push to the branch (git push origin feature/amazing-feature).
6. Open a Pull Request.
The Release Checks section above explains what the
gate enforces. For controller changes, also see
CONTRIBUTING.md โ Release Checks.
—
๐ License
This project is licensed under the MIT License โ see the LICENSE file for details.
—
๐ Links
—
Made with โค๏ธ by the MultiWA team


