Railway

Deploy WAHA — Self-Hosted WhatsApp REST API

WhatsApp HTTP API. No per-message fees. Replaces Twilio.

Deploy WAHA — Self-Hosted WhatsApp REST API

Just deployed

/local

Deploy and Host WAHA on Railway

With 6,600+ GitHub stars and 1,500+ forks, WAHA (WhatsApp HTTP API) is the most-deployed open-source REST API for WhatsApp automation. Run it on Railway for under $5/month — compared to Twilio's $0.005 per message plus Meta template fees that scale to hundreds of dollars at volume.

> Important: WAHA runs on top of WhatsApp Web and is not affiliated with or endorsed by WhatsApp/Meta. WhatsApp does not permit unofficial clients. Use at your own risk; accounts can be restricted. For business-critical workloads, consider the official WhatsApp Business API.

What This Template Deploys

ServiceImagePurpose
WAHAdevlikeapro/wahaWhatsApp HTTP REST API + Dashboard + Swagger UI

About Hosting WAHA

Hosted WhatsApp API providers charge per message or per session. Twilio's WhatsApp integration starts at $0.005 per message (plus Meta's per-template fee of up to $0.0499 per message) — a single campaign to 10,000 contacts can cost $500+ in API fees alone. WAHA is free and open source with no message limits, no per-session fees, and no license expiration.

Railway runs WAHA as a persistent Docker container with automatic restarts, environment variable management, and a generated HTTPS domain — no VPS configuration, no Nginx setup required.

Estimated Railway cost: $2–$5/month on the Starter plan for a single WhatsApp session.

Deploy WAHA on Railway in Under 5 Minutes

  1. Click Deploy on Railway and create or log into your Railway account
  2. Set WAHA_API_KEY to a strong random string (required — protects your API endpoints)
  3. Set WAHA_DASHBOARD_USERNAME and WAHA_DASHBOARD_PASSWORD for dashboard access
  4. Railway generates a public HTTPS domain — set this as WAHA_PUBLIC_URL in your env vars
  5. Open /dashboard on your Railway domain, connect with your API key, and scan the QR code with your WhatsApp app
  6. Send your first message via POST /api/sendText using the Swagger UI at /swagger

Common Use Cases

Users search for WAHA to solve problems like:

  • "how to send WhatsApp messages via REST API"
  • "self-hosted WhatsApp API free alternative to Twilio"
  • "WhatsApp automation without WhatsApp Business API fees"
  • "n8n WhatsApp integration self-hosted"
  • "WhatsApp chatbot open source docker"
  • "send WhatsApp notifications from my app"

Configuration

VariableRequiredDescription
WAHA_API_KEYYesAPI key for all REST endpoints. Always set this in production.
WAHA_DASHBOARD_USERNAMERecommendedUsername for the web dashboard login
WAHA_DASHBOARD_PASSWORDRecommendedPassword for the web dashboard login
WAHA_PUBLIC_URLRecommendedYour Railway public domain (e.g. https://yourapp.up.railway.app) — required for media URLs to resolve correctly
WHATSAPP_DEFAULT_ENGINENoEngine to use: WEBJS (default, browser-based) or NOWEB (lighter, websocket-based)
WHATSAPP_HOOK_URLNoWebhook URL to receive incoming message events
WHATSAPP_HOOK_EVENTSNoEvents to forward to the webhook (e.g. message,session.status)
WHATSAPP_RESTART_ALL_SESSIONSNoSet to True to restore all sessions on container restart
TZNoContainer timezone (default: UTC). Example: Asia/Kolkata

WAHA vs. Alternatives

FeatureWAHA (self-hosted)Twilio WhatsApp APIOfficial WhatsApp Cloud API
Cost per messageFree$0.005 + Meta feesMeta fees only
Monthly minimum~$2–5 (Railway hosting)None, but costs scale fastNone
Setup time< 5 minutesHours (WABA approval)Days (Meta review)
Message limitsNonePer-tier limitsPer-tier limits
Multiple sessionsYes (WAHA Plus)NoNo
WhatsApp approval requiredNoYesYes
Account ban riskYes (unofficial)NoNo
Open sourceYesNoNo

Dependencies for WAHA Hosting

  • Docker — WAHA is distributed as a Docker image; Railway handles the runtime automatically
  • A WhatsApp account — personal or business number to scan the QR code and activate the session
  • A webhook receiver (optional) — any HTTPS endpoint (n8n, Chatwoot, your app server) to receive incoming message events

Deployment Dependencies

Implementation Details

WAHA runs on port 3000 by default. Railway auto-assigns a public HTTPS domain. The dashboard is at /dashboard and Swagger UI at /swagger. Sessions persist across restarts when WHATSAPP_RESTART_ALL_SESSIONS=True is set. The WEBJS engine runs a headless Chromium instance; for lower memory usage switch to the NOWEB engine via WHATSAPP_DEFAULT_ENGINE=NOWEB.

FAQ

Is WAHA free to use? Yes. WAHA is 100% open source (Apache-2.0) with no message limits, no session caps, and no subscription fees. You pay only for Railway hosting (~$2–5/month).

Will my WhatsApp account get banned? Possibly. WAHA uses WhatsApp Web under the hood, which WhatsApp/Meta does not officially support for automation. Risk depends on message volume, patterns, and Meta's detection algorithms. For production business use, consider the official WhatsApp Business API instead.

What's the difference between WAHA and WAHA Plus? The free devlikeapro/waha image supports a single WhatsApp session with the WEBJS and NOWEB engines. WAHA Plus (requires a Patreon subscription key) adds multiple simultaneous sessions, the GOWS engine, and media storage features.

Which engine should I use on Railway? Start with NOWEB (WHATSAPP_DEFAULT_ENGINE=NOWEB) — it uses significantly less memory than WEBJS (which runs headless Chromium), making it better suited for Railway's Starter tier.

How do I receive incoming WhatsApp messages? Set WHATSAPP_HOOK_URL to any publicly reachable HTTPS endpoint (e.g., an n8n webhook, a Chatwoot instance, or your app server) and set WHATSAPP_HOOK_EVENTS=message to forward incoming messages as HTTP POST requests.

Can I integrate WAHA with n8n or Chatwoot? Yes. WAHA has official integration guides for both. Deploy an n8n instance on Railway alongside WAHA and connect them using WAHA's webhook events — no additional middleware needed.

Why Deploy WAHA on Railway?

Twilio charges $0.005 per WhatsApp message plus Meta template fees — a 10,000-message campaign costs $50–$550 in API fees alone. WAHA eliminates per-message costs entirely. Railway gives you a persistent container with HTTPS and auto-restarts for under $5/month, with no Nginx configuration or VPS management required.


Character count check

Body content: ~6,447 characters (limit: 10,000) ✓


Template Content

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
113
View Template
Evolution API with n8n
[Jun'26] WhatsApp automation platform using Evolution API, n8n & PostgreSQL

codestorm
18
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
861