Deploy Evolution API

Self-hosted WhatsApp REST API: messages, groups, webhooks. No Meta setup.

Deploy Evolution API

Just deployed

/data

/var/lib/postgresql/data

Just deployed

Deploy and Host Evolution API on Railway

Evolution API, the open-source WhatsApp API

Evolution API is the most popular self-hosted WhatsApp API, with nearly 10,000 GitHub stars. It's a REST API for sending and receiving WhatsApp messages, media, groups and statuses, with webhooks for every event. This template runs Evolution API 2.3.7 on Railway with Postgres for instances and messages, Redis as the cache, and a generated global API key. Connect a number by scanning a QR code, with no Meta Business verification and no template approvals. Twilio charges $0.005 per WhatsApp message plus Meta fees. Your own Evolution API costs about $5–10/month with no per-message fees.


What This Template Deploys

ServicePurpose
Evolution APIEvolution API v2.3.7 on port 8080 with a public HTTPS domain: the REST API, webhooks and the /manager web UI for instances and QR codes.
PostgresPostgres 18 storing instances, sessions, contacts, chats and messages, on a persistent volume.
RedisCache for sessions and message data, password-protected and persisted to a volume.

The three services are connected through Railway reference variables on the private network. The image is pinned to a stable release, so redeploys never pull an untested version.


About Hosting Evolution API

Adding WhatsApp to an app through the official route means a Meta Business account, business verification, approved message templates, and paying per template message, often through a provider that adds its own fee per message. For support chats, notifications to your own customers or internal tools, that's slow and expensive.

Evolution API connects the way WhatsApp Web does: link your phone through Linked devices, and everything you can do in WhatsApp becomes an API call. Send text, images, documents, audio, locations, buttons and polls; manage groups and contacts; and receive every incoming message and status update as a webhook. One server can run many numbers, each as its own instance with its own token.

On Railway, Evolution API gets automatic HTTPS (required for webhooks and the manager), Postgres and Redis on the private network, and persistent storage, so linked numbers stay connected across redeploys.

An unofficial connection, so use it responsibly. Evolution API uses the WhatsApp Web protocol, not Meta's official API. It's well suited to conversations, support and notifications to people who expect them, but mass unsolicited messaging can get a number banned. Use a dedicated number, and send at a human pace.

Typical cost: ~$5–10/month on Railway for Evolution API, Postgres and Redis, however many messages you send.


Deploy Evolution API in Under 5 Minutes

  1. Click Deploy on Railway. Evolution API, Postgres and Redis start (about 2 minutes).
  2. Copy AUTHENTICATION_API_KEY from the Evolution API service's Variables tab.
  3. Open https://your-app.up.railway.app/manager and sign in with that key.
  4. Create an instance, then scan its QR code with WhatsApp (Settings, Linked devices, Link a device).
  5. Send a test message with POST /message/sendText/YOUR_INSTANCE using the apikey header, and set a webhook URL to receive replies.

No Meta Business verification. No template approvals. No per-message fees.


Common Use Cases

  • WhatsApp for your SaaS or app. Add sending and receiving to your product through a simple REST API.
  • Customer support inbox. Connect Chatwoot to answer WhatsApp chats as a team.
  • Chatbots. Plug in Typebot, Dify, Flowise or OpenAI to answer automatically.
  • Order and appointment notifications. Confirmations, reminders and status updates for customers who opted in.
  • Workflow automation. Trigger n8n, Make or your own code from incoming messages through webhooks.
  • Group tools. Create groups, manage participants and post scheduled updates.
  • Multiple numbers. Run separate instances for different brands, departments or clients on one server.
  • Event streaming. Push messages into RabbitMQ, Amazon SQS or a WebSocket for real-time processing.

Configuration

VariableRequiredDescription
AUTHENTICATION_API_KEY🔐 Auto-generatedGlobal API key. Send it in the apikey header and use it to sign in to /manager. Keep it secret.
SERVER_URL✅ Auto-injectedPublic URL from your Railway domain, used for webhooks, media links and the manager.
DATABASE_PROVIDER✅ Setpostgresql.
DATABASE_CONNECTION_URI✅ Auto-injectedPostgres connection over the private network.
CACHE_REDIS_ENABLED✅ Settrue. Use Redis for the cache.
CACHE_REDIS_URI✅ Auto-injectedRedis connection from the Redis service.
PORT✅ Set8080, where Railway routes your domain.

Evolution API reads many more optional variables from its documentation, such as integration switches (TYPEBOT_ENABLED, CHATWOOT_ENABLED, OPENAI_ENABLED), global webhooks (WEBHOOK_GLOBAL_URL) and log levels. Add them in the Variables tab and redeploy.

Instance tokens versus the global key. The global key can create and delete instances, so keep it on your server. Each instance also has its own token, which is safer to use from individual apps because it can only control that one number.

Receiving messages. Set a webhook per instance in the manager (or with POST /webhook/set/YOUR_INSTANCE) and enable the events you need, such as MESSAGES_UPSERT for incoming messages and CONNECTION_UPDATE for connection changes.


Evolution API on Railway vs. Alternatives

Evolution API on RailwayMeta WhatsApp Cloud APITwilio WhatsAppWATI
Monthly cost~$5–10 usageFree API, paid templates$0.005 per message plus Meta feesPaid plans plus message fees
Self-hosted✅ Yes❌ No❌ No❌ No
Per-message fees✅ None❌ Per template❌ Every message❌ Template messages
Business verification needed✅ No, scan a QR code❌ Yes❌ Yes❌ Yes
Groups and statuses✅ Full⚠️ Limited⚠️ Limited⚠️ Limited
Many numbers on one server✅ Unlimited instances⚠️ Per number setup⚠️ Per sender⚠️ By plan
Official Meta API⚠️ Unofficial (WhatsApp Web)✅ Yes✅ Yes✅ Yes
License⚠️ Modified Apache 2.0❌ Proprietary❌ Proprietary❌ Proprietary

Dependencies for Evolution API Hosting

  • Railway account. The Hobby plan ($5/month including $5 of usage) covers a few numbers.
  • A phone with WhatsApp and a number you can dedicate to the API.
  • Optional: Chatwoot, Typebot, n8n or your own app to use the messages.

Deployment Dependencies

Implementation Details

The service runs the official evoapicloud/evolution-api:v2.3.7 image. Instances, session credentials, chats and messages are saved to Postgres through Prisma, and Redis caches hot data, so the API container itself holds no state and can be redeployed freely. Postgres and Redis are reached over Railway's private network.

To upgrade, change the image tag to a newer stable release (release candidates like 2.4.0-rc are for testing) and redeploy. Back up Postgres first.


Frequently Asked Questions

What is Evolution API? A self-hosted, open-source WhatsApp API. It links to WhatsApp like WhatsApp Web and lets you send and receive messages, media and group actions through REST endpoints and webhooks.

How much does it cost compared to Twilio or the official API? About $5–10/month on Railway with no per-message charges. Twilio charges $0.005 per message plus Meta's fees, and the official Cloud API charges per template message.

Why isn't the QR code scanning, or why does the instance keep disconnecting? Reconnect the instance in /manager to get a fresh QR code and scan it within a minute. Make sure the phone has a stable connection, and don't link the same number to another API at the same time.

Do I need to scan the QR code again after a redeploy? No. Sessions are stored in Postgres, so instances reconnect automatically after redeploys and restarts.

Can I connect it to Chatwoot, Typebot or n8n? Yes. Evolution API has built-in integrations for Chatwoot, Typebot, OpenAI, Dify and Flowise, and works with n8n or any tool through webhooks and the REST API.

Is it allowed by WhatsApp? It's an unofficial client, so WhatsApp can ban numbers that look like spam. Use it for conversations and expected notifications, avoid bulk cold outreach, and use the official Cloud API for large marketing campaigns.


Why Deploy and Host Evolution API 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 Evolution API on Railway, you get your own WhatsApp REST API with webhooks, multiple numbers and integrations, with no Meta approvals and no per-message bills.


Template Content

More templates in this category

View Template
Swarm
Named LLM bots join channels, take jobs, run routines on your Railway box

mcmax
3
View Template
Telegram JavaScript Bot
A template for Telegram bot in JavaScript using grammY

Agampreet Singh
294
View Template
Cobalt Tools [Updated Oct ’26]
Cobalt Tools [Oct ’26] (Media Downloader, Converter & Automation) Self Host

shinyduo
308