---
title: "Deploy Evolution API Cloud API"
description: "Official Meta WhatsApp Business API through Evolution API"
category: "Automation"
url: https://railway.com/deploy/deploy-evolution-api-whatsapp-cloud-api
---

# Deploy Evolution API Cloud API

Official Meta WhatsApp Business API through Evolution API

**[Deploy Evolution API Cloud API on Railway](https://railway.com/template/deploy-evolution-api-whatsapp-cloud-api)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/deploy-evolution-api-whatsapp-cloud-api/manifest.json

- **Creator:** onepush
- **Category:** Automation

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### evolution-api

- **Image:** evoapicloud/evolution-api:v2.3.7@sha256:1bd8afc4a6cf48822e6cf02469aeae7bd35a12a6b616eacd1291926307f4d339
- **Health check:** /
- **Public domain:** Yes

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

## Documentation

# Deploy and Host self hosted Evolution API Cloud API (Self-Hosted Gateway for the Official WhatsApp Cloud API) on Railway

Evolution API Cloud API connects a self-hosted Evolution API to Meta's official WhatsApp Business Cloud API instead of the unofficial QR-code link.

## About Hosting Evolution API Cloud API open-source software on Railway (self hosted Evolution API with the official WhatsApp Cloud API template)

This template runs Evolution API v2.3.7 on Railway with Postgres for instances, messages, contacts and chats, and Redis as the cache.

## Why Deploy Evolution API Cloud API, the Twilio alternative on Railway (Railway Free Trial)

Twilio is a managed route to the official WhatsApp Cloud API, but its per-message fees sit on top of Meta's.

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 Cloud API on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

### Railway vs Other Hosting Providers and VPS for Evolution API Cloud API self hosting

Evolution API with the Cloud API template runs three services, so the choice is mostly about how much of that stack you want to manage.

| Provider | What You Get with Railway | What You Get with the Other Provider |
| --- | --- | --- |
| DigitalOcean | Postgres and Redis linked to the API with a public HTTPS domain for the Meta webhook. | A Droplet you control, but you handle the reverse proxy, TLS and Docker updates. |
| AWS | The API, Postgres and Redis in one project with no VPC setup. | Fine-grained networking, but you wire up RDS, ElastiCache and certificates yourself. |
| Hetzner | Database and cache already linked, so you skip firewall and server hardening. | A cheap bare VPS, but you install Docker and keep Postgres, Redis and TLS patched. |

Railway costs more per resource than a bare VPS, but it saves setup time for a gateway Meta has to reach reliably.

## Common Use Cases for hosted Evolution API Cloud API

- **Customer support bot on an official number:** Point a support flow at a dedicated business number on the Cloud API so customers always reach the same verified WhatsApp Business profile, with no phone to keep online.
- **Order and appointment notifications:** Send approved template messages like shipping updates or booking reminders. Meta requires templates for messages sent outside the 24-hour customer service window.
- **Moving a banned QR-code number:** If a Baileys number got restricted, create a fresh WHATSAPP-BUSINESS instance and move the customer flows over instead of reviving the old session.
- **Chatbot integrations over the Cloud API:** Connect an existing bot or CRM to Evolution API endpoints while Meta delivers inbound messages to /webhook/meta.
- **Multi-number setups per instance:** Run one instance per phone number id, each with its own token and businessId, so brands or regions stay separated on one deployment.

## Dependencies for Evolution API Cloud API Docker hosted on Railway

This template runs as three linked services: the Evolution API container, Postgres and Redis.

### Deployment Dependencies for Managed Evolution API Cloud API Service (WhatsApp API)

- **evolution-api service:** image evoapicloud/evolution-api:v2.3.7, port 8080, public, health check on /.
- **Volume:** mount persistent storage at /evolution/instances.
- **Postgres:** DATABASE_CONNECTION_URI from Railway DATABASE_URL, DATABASE_PROVIDER=postgresql.
- **Redis:** CACHE_REDIS_URI from Railway REDIS_URL.
- **Generated values:** AUTHENTICATION_API_KEY (global key) and SERVER_URL set to your Railway domain.
- **Meta values you add:** WA_BUSINESS_TOKEN_WEBHOOK with your own verify token (default "evolution", so change it).

### Implementation Details for Evolution API Cloud API (Using Evolution API official docker image)

The image is the upstream Evolution API build, so there is nothing to compile.

## How does Evolution API Cloud API compare against other ways to use the official WhatsApp Cloud API

### Evolution API vs Twilio for the Cloud API (Twilio Alternative)

- **Cost layer:** Twilio adds its own per-message fee on top of Meta's charges, while Evolution API is free software and you pay only Railway hosting plus Meta's pricing.
- **Control:** You own the gateway, its manager and its Postgres data instead of depending on a managed vendor.
- **Where Twilio wins:** It is fully managed, with support contracts and no server for you to patch.

### Evolution API Cloud API vs Baileys mode (Unofficial WhatsApp Web Alternative)

- **Ban risk:** Baileys uses the unofficial WhatsApp Web protocol and bulk-messaging numbers can get banned, while the Cloud API is Meta's sanctioned route.
- **Feature set:** Baileys covers groups, presence and profile features the Cloud API does not expose.
- **Where Baileys wins:** It needs no Meta app, business verification or approved templates, so it is quicker to start with a low-volume number.

### Evolution API vs calling Meta Graph API directly (Direct Graph API Alternative)

- **Less code:** Send endpoints, webhook handling and instance management already exist, so you skip writing your own Graph API client.
- **Extra moving part:** You run one more service with its own database and Redis.
- **Where direct wins:** No third-party gateway means fewer dependencies to upgrade and fewer layers to debug.

### Evolution API vs 360dialog (Meta BSP Alternative)

- **Fees:** 360dialog charges monthly platform fees as a Meta Business Solution Provider, while Evolution API has no licence charge and you host it yourself.
- **Setup work:** 360dialog handles more onboarding and number management, while you wire the Meta app, system user token and webhook yourself.
- **Where 360dialog wins:** A BSP can help with business verification and support escalations that you would otherwise handle directly with Meta.

## How to use Evolution API Cloud API (the OSS WhatsApp API gateway)?

1. Create a Meta app with the WhatsApp product. Note your phone number ID and WhatsApp Business Account (WABA) ID. 2. Create a System User with a permanent token that has `whatsapp_business_messaging` and `whatsapp_business_management`. Skip the 24-hour temporary token. 3.

```bash
curl -X POST https://your-domain/instance/create \
  -H "apikey: YOUR_GLOBAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"instanceName":"support","integration":"WHATSAPP-BUSINESS","number":"YOUR_PHONE_NUMBER_ID","token":"YOUR_META_TOKEN","businessId":"YOUR_WABA_ID"}'
```

5. In Meta's webhook settings, set the callback to `https://your-domain/webhook/meta`, enter the same verify token, and subscribe to `messages`.
6. Send an approved template to `/message/sendTemplate/support`. Only templates work outside the 24-hour window, so this is your first real test.

## How to self host Evolution API Cloud API on other VPS Services (Evolution API self hosting guide)

Running the stack on a VPS works much like Railway, but you manage Postgres, Redis and TLS yourself.

### Clone the Repository

Clone the upstream project to get the matching compose file.

```bash
git clone https://github.com/EvolutionAPI/evolution-api
cd evolution-api
```

### Install Dependencies

Install Docker and the Compose plugin.

### Configure Environment Variables

Copy the example file and set the Cloud API values.

```bash
cp .env.example .env
AUTHENTICATION_API_KEY=your-long-random-key
SERVER_URL=https://your-domain
DATABASE_PROVIDER=postgresql
DATABASE_CONNECTION_URI=postgresql://user:password@postgres:5432/evolution
CACHE_REDIS_URI=redis://redis:6379/6
WA_BUSINESS_TOKEN_WEBHOOK=your-own-verify-token
```

### Start the Evolution API Cloud API Application

Start the stack in the background, then confirm the root URL returns the welcome JSON.

```bash
docker compose up -d
curl https://your-domain/
```

Railway handles the Postgres and Redis provisioning, the HTTPS domain and restarts for you, which is what you give up on a VPS.

## Official Pricing of Evolution API Cloud API (Evolution API pricing)

Evolution API is free and open source, so there is no license fee.

## Evolution API Cloud API cloud vs self hosted comparison (Pricing, features, costs, and more)

Running Evolution API yourself means you choose where the gateway lives and what it costs, but you also own the uptime.

### Monthly cost of self hosting Evolution API Cloud API on Railway

On Railway, expect roughly 5-15 USD per month for the API plus Postgres and Redis at light use.

### System Requirements for Hosting Evolution API Cloud API on a VPS

A small VPS with 1 vCPU and 1-2 GB of RAM handles a single Cloud API instance for light traffic.

## Frequently Asked Questions (FAQs)

### What is the difference between QR code and Cloud API mode?

QR code mode (WHATSAPP-BAILEYS) links a regular WhatsApp number through WhatsApp Web, so the phone has to stay online.

### What is the verify token and where do I set it?

The verify token is a shared secret that Meta sends when it checks your webhook URL.

### Why can I only send template messages sometimes?

Outside the 24-hour customer service window, which opens when a customer messages you, Meta only allows approved template messages.

### Which Meta token should I use?

Use a System User permanent token with whatsapp_business_messaging and whatsapp_business_management permissions.

### Does Meta charge per message?

Yes, Meta charges per message under its own pricing, and that cost applies on top of Evolution API, which is free.

### What features differ from Baileys mode?

Some Baileys-only features, such as group management, presence updates and profile tricks, are not available through the Cloud API.
Keep the volume attached; it holds all state.


## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/deploy-evolution-api-whatsapp-cloud-api
