Self-hosted WhatsApp API on Railway with Evolution API

By Tracklayer · Updated 2026-11-20

Short answer: deploy Evolution API, an open-source REST API for WhatsApp. You connect a phone number by scanning a QR code, then your app sends messages with an HTTP call and receives incoming messages and status changes as webhooks. The template runs Evolution API 2.3.7 with Postgres, Redis, the built-in Manager UI and a generated API key. The default connection is unofficial and WhatsApp can ban numbers that use it.

Deploy Evolution API on Railway

When this fits

Evolution API suits cases where your own backend talks to people who contacted you first:

It is not a tool for bulk or unsolicited messaging. See the limits below.

Evolution API templates people deploy on Railway

TemplateCreatorDeploymentsServices
Evolution APIRBR Digital6,3943
WhatsApp API — Self-Host Evolution API, No Meta Approval [Updated Nov'26]SilverBanana7203
WAHAmyworkspace7041
Evolution API | Open Source Messaging Automation Platformbond007's Projects3803
OpenClawPragmatic Growth3581
Evolution APIcodestorm2733
Evolution APi Whatsapp using n8nomarmustafa-ops's Projects2033
Evolution APIcodestorm1302

Railway marketplace data as of 2026-11-19. Full ranking: Best WhatsApp API templates on Railway.

Names on the marketplace rarely say which version is pinned, whether the API key is generated, or whether Postgres and Redis are included. Open each template page and check its services before you deploy.

Deploy it, step by step

These steps use Tracklayer’s Evolution API v2.3.7 template.

  1. Deploy the template. It creates the Evolution API service, Postgres 18 and Redis 8.2. All three have volumes, and they talk over Railway’s private network.
  2. Wait for the deploy to finish. On boot the service waits for Postgres and Redis, applies database migrations, then starts.
  3. Find your login. Open the Evolution API service, then Variables, and copy AUTHENTICATION_API_KEY. It is generated at deploy and is 48 characters long. Every endpoint requires it; requests without the key get a 401.
  4. Open the Manager. Go to https://your-domain/manager, enter https://your-domain as the server URL, paste the key and create an instance. One instance is one phone number.
  5. Scan the QR code. In WhatsApp, open Linked devices and scan it.
  6. Send a test message. Call POST /message/sendText/main with the header apikey: <key> and a body such as {"number":"<country code + number>","text":"Hello"}. Here main is your instance name.

You can skip the Manager and create the instance through the API with POST /instance/create. GET /healthz is the health check.

Persistence

Instances, credentials, messages and contacts live in Postgres. Redis keeps its cache and WhatsApp session keys with append-only persistence. The Evolution API service also has a volume at /evolution/instances. Redeploys keep this data.

Cost

Railway bills usage, so cost follows memory and uptime. The template’s README gives measurements, not estimates: Evolution API about 0.12 GB idle and 0.28 GB while an instance generates QR codes, Postgres 0.06 to 0.12 GB, Redis 0.03 GB. The README says it ran on Railway’s Free plan (0.5 GB per service) in testing and on Trial (1 GB). Each connected number adds memory.

Ban risk and WhatsApp rules

Read this before you connect a number you care about.

Licence and affiliation

Evolution API is Apache-2.0 with additional conditions: keep the Manager’s logo and copyright unchanged, and show administrators a notice if you build it into a product. Otherwise a commercial licence from Evolution Foundation may be required. “Evolution API” is a trademark of Evolution Foundation. The template is a community template and is not affiliated with Evolution Foundation, Meta or WhatsApp. The template keeps the Manager unmodified and prints the usage notice in the service log at every start.

Scaling and upgrades

Other options

For other self-hosted WhatsApp APIs, see the full ranking of WhatsApp API templates on Railway. If you plan to trigger bots from incoming messages, n8n templates are a common companion. For how this site works, see About.

FAQ

Can WhatsApp ban a number I connect to Evolution API?

Yes. The default connection (WHATSAPP-BAILEYS) uses Baileys, an unofficial implementation of the WhatsApp Web protocol that Meta and WhatsApp do not provide or endorse. WhatsApp can restrict or ban numbers that use it, especially new numbers or numbers that send many messages. Use a number you can afford to lose for testing, and use the official Cloud API integration for business-critical or high-volume messaging.

Can I use Evolution API commercially?

Evolution API is licensed under Apache-2.0 with two additional conditions: you may not remove or change the logo and copyright in its Manager UI, and if you build it into a product you must show your administrators a clear notice that Evolution API is used. Otherwise a commercial licence from Evolution Foundation may be required. Read the licence for your case, and ask a lawyer if you are unsure.

How do I log in and connect my first number?

Copy AUTHENTICATION_API_KEY from the Evolution API service's Variables tab, open /manager on your domain, enter your domain as the server URL plus the key, create an instance and scan the QR code under Linked devices in WhatsApp. You can do the same with POST /instance/create.

How much does it cost to run on Railway?

Railway bills usage. The template's README reports measurements: Evolution API about 0.12 GB of memory idle and 0.28 GB while an instance generates QR codes, Postgres 0.06 to 0.12 GB and Redis 0.03 GB. Each connected number adds memory, so plan more for many instances.

Can I run two replicas for more capacity?

No. Two replicas would open the same WhatsApp sessions twice. Run one replica.