Deploy WAHA WhatsApp

WhatsApp REST API for your apps, with webhooks. A Twilio alternative.

Deploy WAHA WhatsApp

Just deployed

/local

Deploy and Host WAHA WhatsApp HTTP API on Railway

WAHA logo

WAHA (WhatsApp HTTP API) gives your apps a REST API for WhatsApp, with 7,600+ GitHub stars: send text, media and buttons, receive messages through webhooks, and manage sessions from a dashboard. Twilio charges $0.005 per WhatsApp message on top of Meta's fees — WAHA on Railway runs for a few dollars a month with no per-message charges, and since v2026.6 every former Plus feature, including unlimited sessions, is free.


What This Template Deploys

ServicePurpose
WAHAWAHA REST API with Swagger docs, web dashboard and webhook delivery (devlikeapro/waha, public HTTPS domain).
Persistent VolumeMounted at /local — WhatsApp sessions stay logged in across restarts and redeploys.

One service. The API key, dashboard password and Swagger password are generated at deploy time, and sessions are restored automatically after every restart.


About Hosting WAHA

A WhatsApp integration needs a process that stays connected 24/7, persistent session storage so you don't rescan the QR code after every restart, HTTPS for webhooks, and protection for an API that can send messages as you. Run on a laptop, it drops whenever the machine sleeps.

On Railway, WAHA stays online with its sessions on a volume, WAHA_RESTART_ALL_SESSIONS reconnects them on boot, and every endpoint requires the generated X-Api-Key. The dashboard and Swagger docs have their own generated passwords.

WAHA is unofficial. It runs on WhatsApp Web, isn't affiliated with WhatsApp or Meta, and accounts can be restricted for automation or spam-like sending. For regulated or high-volume business messaging, use the official WhatsApp Business Platform instead.

Typical cost: ~$3–8/month on Railway, depending on the engine (the browser-based WEBJS engine uses more memory than NOWEB). Twilio adds $0.005 per message plus Meta's fees of around $0.0034 per utility or authentication template.


Deploy WAHA in Under 5 Minutes

  1. Click Deploy on Railway — WAHA starts with generated credentials (~2 minutes).
  2. Open /dashboard on your Railway URL and sign in with WAHA_DASHBOARD_USERNAME and WAHA_DASHBOARD_PASSWORD.
  3. Add the server with your WAHA_API_KEY, start the default session and scan the QR code with WhatsApp.
  4. Open the Swagger docs and send a test message with POST /api/sendText.
  5. Set a webhook URL on the session to receive incoming messages in your app.

No Meta business verification. No per-message billing. No QR rescans after restarts.


Common Use Cases

  • Twilio WhatsApp alternative — "whatsapp rest api self hosted" without per-message fees
  • Notifications from your app — order updates, alerts and reminders over WhatsApp
  • Chatbots — receive messages by webhook and reply from your backend
  • n8n and Make automations — WhatsApp nodes driven by WAHA's REST API
  • Support inboxes — connect WhatsApp to Chatwoot or your own helpdesk
  • Multiple numbers — run several sessions in one server, now free in Core

Configuration

VariableRequiredDescription
WAHA_API_KEY🔐 Auto-generatedSent as the X-Api-Key header on every API request.
WAHA_DASHBOARD_USERNAME / PASSWORD🔐 Auto-generated passwordLogin for /dashboard.
WHATSAPP_SWAGGER_USERNAME / PASSWORD🔐 Auto-generated passwordLogin for the Swagger API docs.
WHATSAPP_DEFAULT_ENGINEOptionalWEBJS (headless browser) by default; NOWEB uses far less memory.
WAHA_RESTART_ALL_SESSIONSOptionalTrue — reconnect every session after a restart.
WAHA_MEDIA_STORAGEOptionalLOCAL by default; S3 or PostgreSQL for larger setups.
WHATSAPP_START_SESSIONOptionalSession started on boot, default.

Protect the API key. Anyone with WAHA_API_KEY can send messages from your WhatsApp number — keep it server-side, never in browser code.


WAHA vs. Alternatives

WAHA on RailwayTwilio WhatsAppWhatsApp Cloud API (Meta)Evolution API
Monthly cost~$3–8 usage$0.005 per message + Meta feesMeta fees per template messageFree, you host it
Self-hosted✅ Yes❌ No❌ No✅ Yes
Per-message fees✅ None❌ Yes❌ Yes✅ None
Business verification needed✅ No, scan a QR code❌ Yes❌ Yes✅ No
Multiple sessions✅ Free since v2026.6✅ Per sender✅ Per number✅ Yes
Account ban risk⚠️ Unofficial client✅ Official✅ Official⚠️ Unofficial client
License✅ Apache-2.0❌ Proprietary❌ Proprietary⚠️ Custom license

Dependencies for WAHA Hosting

  • Railway account — Hobby ($5/month) runs one or two sessions; use NOWEB to save memory.
  • A WhatsApp account on a phone to scan the QR code.
  • A webhook endpoint (your app, n8n, Chatwoot) to receive messages.

Deployment Dependencies

Implementation Details

The service runs the official devlikeapro/waha image with sessions stored under /local/.sessions on the volume and media in /app/.media. WAHA_RESTART_ALL_SESSIONS=True reconnects sessions after each deploy, so you only scan the QR code once.

All API routes require WAHA_API_KEY; the dashboard and Swagger UI have separate generated credentials. Switch WHATSAPP_DEFAULT_ENGINE to NOWEB if memory is tight — it skips the headless browser that WEBJS runs.


Frequently Asked Questions

What is WAHA? An open-source server that turns WhatsApp into a REST API: send and receive messages, media and more over HTTP, with webhooks for incoming events.

How much does WAHA cost compared to Twilio? About $3–8/month on Railway with no per-message fees. Twilio charges $0.005 per message plus Meta's template fees, which add up quickly at volume.

Why does my WhatsApp session keep logging out? Keep the volume attached and WAHA_RESTART_ALL_SESSIONS=True, and don't log the device out from your phone. If WhatsApp ends the session, scan the QR code again in the dashboard.

Do I lose sessions when I redeploy? No. Sessions are stored on the /local volume and reconnect automatically after each restart or redeploy.

Is WAHA Plus still required for multiple sessions? No. Since v2026.6.1, every former Plus feature, including unlimited sessions, is in the free image. An optional $5/month Community tier supports the project.

Can my number get banned? Yes, it's possible. WAHA uses WhatsApp Web, which WhatsApp doesn't officially support for automation. Avoid bulk unsolicited messages, and use the official Business Platform for critical workloads.


Why Deploy and Host WAHA on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying WAHA on Railway, you get a self-hosted WhatsApp REST API with persistent sessions, webhooks and generated credentials, with no per-message fees.


Template Content

More templates in this category

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

jakemerson
120
View Template
Evolution API with n8n
Automate WhatsApp workflows with Evolution API, n8n, and Postgres.

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

Railway Templates
870