Railway

Deploy Evolution API — WhatsApp REST API

The Most Powerful WhatsApp REST API. Self-Hosted. Scalable. Reliable.

Deploy Evolution API — WhatsApp REST API

/var/lib/postgresql/data

Just deployed

/data

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

ServicePurpose
Evolution APIREST API, WhatsApp instances, messaging, webhooks, and integrations
PostgreSQLPersistent application and messaging database
RedisCache and runtime data
Evolution VolumePersistent instance storage at /evolution/instances
Redis VolumePersistent Redis data at /data
PostgreSQL VolumePersistent 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

PlatformSelf-HostedREST APIMulti-InstanceWebhooksBest Fit
Evolution API✅ Yes✅ Yes✅ Yes✅ YesSelf-hosted WhatsApp automation and integrations
WhatsApp Cloud API❌ Managed✅ Yes⚠️ Business-managed✅ YesOfficial Meta business messaging
WPPConnect✅ Yes✅ Yes✅ Yes✅ YesWhatsApp Web automation
WAHA✅ Yes✅ Yes✅ Yes✅ YesLightweight WhatsApp HTTP API
Baileys✅ Library⚠️ Build your own✅ Possible⚠️ Build your ownDevelopers 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

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

  1. Deploy the template.
  2. Wait until Evolution API, Redis, and PostgreSQL are online.
  3. Open the public domain assigned to the Evolution API service.
  4. Copy AUTHENTICATION_API_KEY from the Railway Variables tab.
  5. Use the API to create your first WhatsApp instance.
  6. Generate or retrieve the QR code for the instance.
  7. Scan the QR code using WhatsApp.
  8. Start sending messages or configuring webhooks.
  9. 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

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
120
View Template
Evolution API with n8n
[Jul'26] WhatsApp automation platform using Evolution API, n8n & PostgreSQL

codestorm
70
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
870