
Deploy Evolution API
Self-hosted WhatsApp API with manager UI, Postgres & Redis
Redis
Just deployed
/data
Just deployed
/var/lib/postgresql/data
evolution-api
Just deployed
/evolution/instances
Deploy and Host self hosted Evolution API (Open-Source WhatsApp API) on Railway
Evolution API v2.3.7 is an open-source WhatsApp integration layer you can self-host. This Railway template pins the official image, wires Postgres and Redis, and exposes the manager at /manager. You get a multi-instance WhatsApp API with zero deploy-time input, ready for messages, webhooks, and integrations.
About Hosting Evolution API open-source software on Railway (self hosted Evolution API template)
Evolution API is Node.js and TypeScript under an Apache-2.0 based license. It connects through Baileys, the free but unofficial WhatsApp Web protocol, or the official WhatsApp Business Cloud API. The Railway template runs evolution-api on port 8080, Postgres for persistence, and Redis for cache.
Why Deploy Evolution API, the Twilio WhatsApp alternative on Railway (Railway Free Trial)
Evolution API gives you a self-hosted WhatsApp API without Twilio's per-message markup. You own the deployment, data, and webhook flow. Twilio only supports the official Meta Cloud API and adds fees on top of Meta's charges. Evolution API can use Baileys for free WhatsApp Web connections or the official Cloud API.
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 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 self hosting
| Provider | Setup for Evolution API | Managed Postgres and Redis | Cost pattern | Best fit |
|---|---|---|---|---|
| DigitalOcean | Manual Droplet plus Docker | Managed databases cost extra | Predictable but you configure everything | Teams already using DO |
| AWS | ECS, EKS, or Lightsail with manual wiring | RDS and ElastiCache add complexity | Metered and easy to overspend | Enterprise with AWS experience |
| Hetzner | VPS plus Docker Compose | Self-managed Postgres and Redis | Very low but fully on you | Price-sensitive tinkerers |
| Railway | One-click template with pinned image | Railway Postgres and Redis wired by template | About 5-15 USD per month at light use | Developers who want deploy and forget |
Common Use Cases for hosted Evolution API
- Customer support inboxes connected to Chatwoot or n8n.
- Transactional notifications such as order updates and appointment reminders.
- AI chat assistants with OpenAI, Dify, or Flowise.
- Multi-tenant SaaS with isolated WhatsApp instances per client.
- Inbound messages and webhook reactions to your backend.
Dependencies for Evolution API Docker hosted on Railway
The Railway template handles three dependencies for you. Evolution API needs a persistent store for instances and message history, a cache for session state, and a writable volume for WhatsApp session files. The template provides Postgres, Redis, and a named volume automatically.
Deployment Dependencies for Managed Evolution API Service (WhatsApp API)
- Railway Postgres: DATABASE_CONNECTION_URI is built from Postgres DATABASE_URL. Set DATABASE_PROVIDER to postgresql and enable DATABASE_SAVE_INSTANCE, DATABASE_SAVE_MESSAGES, DATABASE_SAVE_CONTACTS, and DATABASE_SAVE_CHATS.
- Railway Redis: CACHE_REDIS_URI is built from Redis REDIS_URL. Redis is a cache, not the primary database.
Implementation Details for Evolution API (Using the official Evolution API docker image)
The template pins evoapicloud/evolution-api:v2.3.7 by digest for reproducibility. The container listens on port 8080 and exposes a public HTTP endpoint. The health check hits the root path, which returns a welcome JSON with the version. The manager UI is served at /manager. When you create an instance, Evolution API writes session credentials to the volume.
How does Evolution API compare against other WhatsApp API platforms
Evolution API vs Twilio
- Cost: Evolution API is free to self-host; Twilio adds per-message fees on top of Meta's WhatsApp charges.
- Protocols: Twilio supports only the official Cloud API; Evolution API supports Baileys and Cloud API.
- Control: Evolution API gives direct database access and full webhook control; Twilio keeps message data inside its platform.
Evolution API vs WAHA
- License: Evolution API is fully free under an Apache-2.0 based license; WAHA has a free core and a paid Plus edition.
- Features: Evolution API offers multi-instance management, Postgres persistence, Redis cache, and a web manager.
- Simplicity: WAHA has a simpler single-container setup and strong dashboard.
Evolution API vs the official WhatsApp Cloud API used directly
- Compliance: The official Cloud API is Meta-supported; Evolution API can proxy it but does not replace Meta approval.
- Setup: Direct Cloud API requires webhooks, token refresh, template approval, and business verification; Evolution API wraps those in a simpler REST shape.
Evolution API vs Z-API
- Hosting: Z-API is a hosted service with a monthly per-instance fee; Evolution API is free software you host yourself.
- Events: Evolution API supports webhooks, WebSocket, RabbitMQ, and SQS; Z-API focuses on REST and webhooks.
How to use Evolution API (the OSS WhatsApp API)?
After deploy, open your Railway domain at the root path and confirm the welcome JSON shows v2.3.7. Go to /manager and log in with the global AUTHENTICATION_API_KEY. Create a new instance, choose Baileys or Cloud API, and name it. For Baileys, the manager shows a QR code.
How to self host Evolution API on other VPS Services (Evolution API self hosting guide)
To run outside Railway, clone the repository and use Docker Compose. You need a Linux server, Docker, and Docker Compose.
Clone the Repository
Run git clone https://github.com/EvolutionAPI/evolution-api and change into the project directory. The repo includes a docker-compose.yml with API, Postgres, and Redis. You can run only the API and connect to external Postgres and Redis if preferred.
Install Dependencies
The Docker image bundles Node.js dependencies, so no npm install is needed unless running from source. For source, use Node.js 20 or newer and run npm install. For Docker, install Docker Engine and Compose plugin. Open port 8080 or your chosen port.
Configure Environment Variables
Copy .env.example to .env. Set AUTHENTICATION_API_KEY to a strong random string. Set DATABASE_PROVIDER to postgresql and DATABASE_CONNECTION_URI to your Postgres string. Set CACHE_REDIS_URI to your Redis URL. Optionally set SERVER_URL to your public domain and TELEMETRY_ENABLED=false.
Start the Evolution API Application
Run docker compose up -d. Check logs with docker compose logs -f evolution-api. Open http://your-server-ip:8080 for the welcome JSON, then /manager to create instances. To update, pull the new tag and restart. Back up the /evolution/instances volume and Postgres regularly.
Official Pricing of Evolution API (Evolution API pricing)
Evolution API is free and open source. There is no license fee or per-message charge for the software. You pay only for infrastructure. On Railway, that is about 5-15 USD per month for the API, Postgres, and Redis at light to moderate use. If you use the official Cloud API through Evolution API, Meta charges per message according to Meta's pricing page.
Evolution API cloud vs self hosted comparison (Pricing, features, costs, and more)
A hosted Evolution API service charges per instance or per message and handles updates and uptime. Self-hosting on Railway gives full control over data, variables, and integrations at infrastructure cost only. You are responsible for upgrades, backups, and monitoring.
Monthly cost of self hosting Evolution API on Railway
At light use, expect about 5 USD per month for the API, Postgres, and Redis. Moderate use with more history and webhook traffic might reach 10-15 USD. Railway's free trial gives 5 USD in credits. Scale the API vertically for many instances or heavy media. Monitor Postgres storage as messages accumulate.
System Requirements for Hosting Evolution API on a VPS
A small VPS with 1 GB RAM and 1 vCPU can run Evolution API, Postgres, and Redis for a few instances. For 10 or more active Baileys sessions, use at least 2 GB RAM and 2 vCPUs. 20 GB disk is a safe start. The Railway template handles scaling automatically. Elsewhere, use Docker volumes for /evolution/instances and Postgres data.
Frequently Asked Questions (FAQs)
Is Evolution API free to use?
Yes. Evolution API is open source and free. You pay only for hosting, and Meta charges per message only if you use the official Cloud API.
Can I use Evolution API with a normal WhatsApp number?
Yes. Baileys mode works with a normal number through Linked devices. It is unofficial, so use a dedicated number and avoid spam to reduce ban risk.
How do I log into the Evolution API manager on Railway?
Open https://your-domain/manager and enter the global AUTHENTICATION_API_KEY from Railway variables. Each instance gets its own token for API calls.
Does the Railway template persist WhatsApp sessions across deploys?
Yes. A named volume at /evolution/instances keeps QR sessions and credentials across restarts and redeploys.
What is the difference between Baileys and the official Cloud API in Evolution API?
Baileys uses the WhatsApp Web protocol, is free, but unofficial. The Cloud API is Meta's business channel, requires verification and approved templates, and charges per message.
Can I receive incoming WhatsApp messages with Evolution API?
Yes. Set a webhook URL on the instance, or use WebSocket, RabbitMQ, or SQS. Evolution API delivers message events, connection updates, and QR changes.
Template Content
Redis
redis:8.2evolution-api
evoapicloud/evolution-api:v2.3.7