Deploy Evolution API — WhatsApp REST API
The Most Powerful WhatsApp REST API. Self-Hosted. Scalable. Reliable.
Just deployed
/var/lib/postgresql/data
Redis
Just deployed
/data
Evolution
Just deployed
/evolution/instances
Deploy and Host Evolution API — WhatsApp REST API on Railway
Evolution API is a self-hosted REST API for WhatsApp and multi-channel messaging. It supports WhatsApp Web through Baileys as well as the official WhatsApp Cloud API, while providing integrations with tools such as Typebot, Chatwoot, Dify, OpenAI, Kafka, RabbitMQ, S3-compatible storage, and more.
About Hosting Evolution API
This template deploys a complete Evolution API stack with PostgreSQL, Redis, and persistent instance storage.
Evolution API exposes a REST API for creating and managing WhatsApp instances, sending and receiving messages, handling contacts, groups, webhooks, and integrations.
PostgreSQL stores persistent application and messaging data, while Redis provides caching and instance-related runtime data. A dedicated persistent volume mounted at /evolution/instances keeps Evolution API instance files available across restarts and redeployments.
The official Evolution API Docker Compose configuration uses the same core architecture: Evolution API, Redis, PostgreSQL, and persistent instance storage.
Included Architecture
| Service | Purpose |
|---|---|
| Evolution API | REST API, WhatsApp instances, messaging, webhooks, and integrations |
| PostgreSQL | Persistent application and messaging database |
| Redis | Cache and runtime data |
| Evolution Volume | Persistent instance storage at /evolution/instances |
| Redis Volume | Persistent Redis data at /data |
| PostgreSQL Volume | Persistent database files |
┌─────────────────┐
│ API Client │
│ n8n / App / CRM │
└────────┬────────┘
│
▼
Railway HTTPS Proxy
│
▼
┌─────────────────┐
│ Evolution API │
│ │
│ WhatsApp REST │
│ API / Webhooks │
└──────┬────┬─────┘
│ │
┌────────────┘ └────────────┐
▼ ▼
┌──────────────┐ ┌──────────────┐
│ PostgreSQL │ │ Redis │
│ Persistent │ │ Cache │
│ Database │ │ Runtime Data │
└──────────────┘ └──────────────┘
Evolution API Volume
/evolution/instances
Common Use Cases
- Build WhatsApp messaging integrations
- Send and receive WhatsApp messages through REST APIs
- Connect WhatsApp with n8n workflows
- Build customer support automation
- Create WhatsApp chatbots
- Connect CRM systems with WhatsApp
- Receive message events through webhooks
- Automate notifications and transactional messages
- Manage multiple WhatsApp instances
- Integrate WhatsApp with AI agents and LLM applications
- Connect Chatwoot, Typebot, Dify, and other automation platforms
Evolution API vs Other WhatsApp API Solutions
| Platform | Self-Hosted | REST API | Multi-Instance | Webhooks | Best Fit |
|---|---|---|---|---|---|
| Evolution API | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | Self-hosted WhatsApp automation and integrations |
| WhatsApp Cloud API | ❌ Managed | ✅ Yes | ⚠️ Business-managed | ✅ Yes | Official Meta business messaging |
| WPPConnect | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | WhatsApp Web automation |
| WAHA | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | Lightweight WhatsApp HTTP API |
| Baileys | ✅ Library | ⚠️ Build your own | ✅ Possible | ⚠️ Build your own | Developers building custom WhatsApp systems |
Evolution API sits between low-level WhatsApp libraries and fully managed messaging platforms by providing a ready-to-use REST API with instance management, webhooks, integrations, and persistent infrastructure.
Dependencies for Evolution API Hosting
- Evolution API — messaging and WhatsApp REST API service
- PostgreSQL — primary persistent database
- Redis — cache and runtime data
- Persistent Volume — stores Evolution instance data
- Railway Private Networking — internal communication between application, Redis, and PostgreSQL
- API Key — protects Evolution API endpoints
Deployment Dependencies
- Evolution API GitHub: https://github.com/evolution-foundation/evolution-api
- Evolution API Docker Image: https://hub.docker.com/r/evoapicloud/evolution-api
- Evolution API Documentation: https://doc.evolution-api.com/
- Evolution Manager: https://github.com/EvolutionAPI/evolution-manager-v2
- Railway PostgreSQL: https://docs.railway.com/databases/postgresql
- Railway Redis: https://docs.railway.com/databases/redis
Environment Configuration
The template automatically connects Evolution API to PostgreSQL and Redis using Railway service references.
Typical configuration includes:
PORT=8080
SERVER_PORT=8080
SERVER_URL=https://
AUTHENTICATION_API_KEY=
DATABASE_PROVIDER=postgresql
DATABASE_CONNECTION_URI=postgresql://user:password@host:5432/database
DATABASE_CONNECTION_CLIENT_NAME=evolution
CACHE_REDIS_ENABLED=true
CACHE_REDIS_URI=redis://user:password@host:6379
CACHE_REDIS_PREFIX_KEY=evolution
CACHE_REDIS_SAVE_INSTANCES=false
CACHE_LOCAL_ENABLED=false
DATABASE_SAVE_DATA_INSTANCE=true
DATABASE_SAVE_DATA_NEW_MESSAGE=true
DATABASE_SAVE_MESSAGE_UPDATE=true
DATABASE_SAVE_DATA_CONTACTS=true
DATABASE_SAVE_DATA_CHATS=true
DATABASE_SAVE_DATA_HISTORIC=true
The API key should be sent using the apikey request header when calling protected Evolution API endpoints.
Persistent Storage
Evolution API
The Evolution API service mounts persistent storage at:
/evolution/instances
The official Docker Compose configuration also persists this directory for Evolution API instance data.
PostgreSQL
PostgreSQL stores persistent database files using its Railway volume:
/var/lib/postgresql/data
Redis
Redis stores persistent data at:
/data
This gives the stack persistent application, database, cache, and WhatsApp instance state across service restarts and redeployments.
API Authentication
The template automatically generates:
AUTHENTICATION_API_KEY
Use this value in the apikey HTTP header when interacting with Evolution API.
Example:
curl https:///instance/fetchInstances \
-H "apikey: YOUR_API_KEY"
Keep this key private because it provides access to the Evolution API management endpoints.
Getting Started
- Deploy the template.
- Wait until Evolution API, Redis, and PostgreSQL are online.
- Open the public domain assigned to the Evolution API service.
- Copy
AUTHENTICATION_API_KEYfrom the Railway Variables tab. - Use the API to create your first WhatsApp instance.
- Generate or retrieve the QR code for the instance.
- Scan the QR code using WhatsApp.
- Start sending messages or configuring webhooks.
- Connect external tools such as n8n, Chatwoot, Typebot, or your own application.
Integrations
Evolution API supports a broad integration ecosystem, including messaging, automation, AI, queueing, and storage tools. The project currently documents integrations with technologies such as Chatwoot, Typebot, Dify, OpenAI, RabbitMQ, Kafka, SQS, Socket.io, and S3-compatible storage.
This makes Evolution API useful as a messaging layer for:
- n8n workflows
- AI agents
- CRM applications
- Helpdesk systems
- Notification services
- Customer support bots
- Internal automation
- SaaS applications
Why Deploy 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 a complete WhatsApp REST API stack with PostgreSQL, Redis, persistent storage, private networking, and automatic HTTPS access in a single deployment.
Template Content
Redis
redis:8.2Evolution
evoapicloud/evolution-api:latest