Deploy Evolution API n8n

WhatsApp automation with Evolution API and n8n

Deploy Evolution API n8n

Just deployed

/evolution/instances

/var/lib/postgresql/data

Just deployed

/data

Deploy and Host Evolution API with n8n (Open-Source WhatsApp API) on Railway

Evolution API is a self-hosted Node.js service that turns your WhatsApp number into an HTTP API. Deploy it on Railway, connect instance webhooks to an n8n Webhook node, and build WhatsApp automations without per-message fees. This guide covers the Railway template, n8n integration, pricing, and self-hosting.

About Hosting Evolution API open-source software on Railway (self hosted Evolution API template)

Evolution API is Apache-2.0 licensed TypeScript. It connects to WhatsApp via Baileys, the unofficial WhatsApp Web protocol, or the official Meta Cloud API. It supports multiple instances, each with its own QR session and token. You can send text, media, audio, location, contacts, reactions, polls, and lists.

The Railway template runs Evolution API v2.3.7 on port 8080 with Postgres and Redis. A volume stores session files under /evolution/instances so restarts do not drop the phone connection. For n8n, set the instance webhook to an n8n Webhook node URL, parse incoming messages, and reply with an HTTP Request to sendText. Deploy n8n separately.

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

Twilio only supports the official Cloud API, adds per-message markup, and keeps data on its platform. Evolution API is free, open-source, and self-hosted. You own data, webhooks, and automation logic. Pair it with n8n for a Twilio-like integration without platform fees.

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 n8n 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

ProviderSetup complexityBuilt-in Postgres and RedisCost for light useBest for
DigitalOceanMedium: droplet, Docker, firewallNo, add managed databases6-12 USD/mo plus databasesVPS comfortable users
AWSHigh: IAM, VPC, ECS or EC2Yes, separate config10-30 USD/mo for small instancesEnterprises on AWS
HetznerMedium: cloud VM, manual setupNo managed Postgres/Redis5-10 EUR/mo plus databasesBudget self-hosters in Europe

Railway removes VPS overhead. The template wires Postgres and Redis automatically.

Common Use Cases for hosted Evolution API

  • n8n WhatsApp automation: Incoming messages trigger workflows for lead capture, support tickets, or AI chat.
  • Customer support bots: Connect webhooks to a chatbot or LLM and reply in seconds.
  • Notification services: Send order confirmations or reminders from any backend.
  • CRM integrations: Log WhatsApp conversations into HubSpot, Salesforce, or Postgres via webhooks.

Dependencies for Evolution API Docker hosted on Railway

The template deploys three services and a volume. Postgres stores instances, messages, contacts, and chats when DATABASE_SAVE_* variables are true. Redis caches session data. The API uses evoapicloud/evolution-api:v2.3.7, exposes port 8080, and mounts a volume at /evolution/instances.

Deployment Dependencies for Managed Evolution API Service (WhatsApp API)

  • evolution-api service: Main API, public on port 8080. Health check at root returns welcome JSON.
  • Postgres: Persistent storage. DATABASE_CONNECTION_URI comes from Railway Postgres DATABASE_URL.
  • Redis: Cache. CACHE_REDIS_URI comes from Railway Redis REDIS_URL.
  • Volume: Named volume at /evolution/instances for Baileys session credentials.

Implementation Details for Evolution API (Using the official Evolution API docker image)

The image is evoapicloud/evolution-api:v2.3.7, listening on port 8080. The root path returns version JSON. Generated env vars include AUTHENTICATION_API_KEY (32-character global API key for the apikey header and /manager login), SERVER_URL set to https://your-domain, and TELEMETRY_ENABLED=false.

After deploy, open https://your-domain/manager, log in with the global API key, and create an instance. Each instance gets its own token. Scan the QR code with WhatsApp under Linked devices. Set the instance webhook to your n8n Webhook node URL with events like MESSAGES_UPSERT.

How does Evolution API compare against other WhatsApp API platforms

Evolution API vs Twilio

  • Cost: Free plus hosting vs per-message on top of Meta fees.
  • Control: Self-hosted vs closed managed platform.
  • Backend: Baileys and Cloud API vs Cloud API only.
  • n8n: Raw webhooks vs Twilio's format and billing.
  • Risk: Ban risk on Baileys vs lower but costlier.

Evolution API vs the official WhatsApp Cloud API used directly

  • Hosting: Self-hosted vs Meta hosted.
  • Setup: Docker and QR scan vs business verification and templates.
  • Messages: Baileys free-form vs template restrictions.
  • Webhooks: Full control vs Meta format.
  • Cost: No per-message fee vs per conversation.

Evolution API vs WAHA

  • License: Apache-2.0 vs core free with paid Plus.
  • Backends: Baileys and Cloud API vs Baileys focus.
  • Multi-instance: Manager UI vs fewer options.
  • Integrations: Typebot, Chatwoot, Dify, OpenAI, Flowise, n8n, EvoAI.
  • Community: Larger and more frequent releases.

Evolution API vs Z-API

  • Model: Self-hosted open-source vs hosted Brazilian API.
  • Pricing: Hosting only vs monthly per-instance fee.
  • Setup: Railway minutes vs Z-API account.
  • Flexibility: Baileys and Cloud API vs Cloud API focus.
  • Data: Own Postgres vs their servers.

How to use Evolution API (the OSS WhatsApp API)?

  1. Deploy the Railway template and wait for the service to become healthy. 2. Open https://your-domain/manager and log in with AUTHENTICATION_API_KEY. 3. Create an instance and copy its token. 4. Scan the QR code with WhatsApp on your phone under Linked devices. 5. Set the instance webhook to your n8n Webhook node URL with MESSAGES_UPSERT. 6.

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

You can run Evolution API on any Docker-capable VPS. The official repository includes docker-compose with Postgres and Redis.

Clone the Repository

Run git clone https://github.com/EvolutionAPI/evolution-api then cd evolution-api.

Install Dependencies

Install Docker and Docker Compose. On Ubuntu use sudo apt update and sudo apt install docker.io docker-compose-plugin.

Configure Environment Variables

Copy .env.example to .env and set AUTHENTICATION_API_KEY, DATABASE_PROVIDER=postgresql, DATABASE_CONNECTION_URI, and CACHE_REDIS_URI.

Start the Evolution API Application

Run docker compose up -d. Open http://your-vps-ip:8080/manager. Documentation is at doc.evolution-api.com.

Official Pricing of Evolution API (Evolution API pricing)

Evolution API is completely free and open source. There is no license fee, no per-message charge, and no paid tier. You pay only for infrastructure. On Railway, light use costs about 5-15 USD per month for the API, Postgres, and Redis. Railway's trial gives 5 USD. A cheap VPS can cost as little as 5 USD per month.

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

Evolution API has no first-party cloud. Hosted providers like Twilio or Z-API resell the official WhatsApp API. Self-hosting gives full control, free Baileys messaging, and direct n8n webhooks. The trade-off is operational work and ban risk on unofficial connections.

Monthly cost of self hosting Evolution API on Railway

A minimal Railway deployment with 512 MB API, small Postgres, and small Redis costs 5-15 USD per month at light usage. The trial covers the first 5 USD. Hosted providers often exceed 20 USD per month plus Meta message fees.

System Requirements for Hosting Evolution API on a VPS

  • CPU: 1 vCPU for a single instance and moderate webhook traffic.
  • RAM: 512 MB minimum, 1 GB recommended for multiple instances.
  • Disk: 5 GB free for Docker image, session files, and logs.
  • Network: Public IP or domain with HTTPS for webhooks and n8n access.

Frequently Asked Questions (FAQs)

Can I connect Evolution API to n8n without writing code?

Yes. Set the Evolution API instance webhook to your n8n Webhook node URL and use n8n's HTTP Request node to send replies.

Will my WhatsApp number get banned if I use Evolution API with Baileys?

Possibly. Baileys is unofficial. WhatsApp bans numbers that send bulk unsolicited messages. Use a dedicated number, keep volume human-like, and switch to the Cloud API for business scale.

Do I need the official WhatsApp Cloud API to use Evolution API?

No. Baileys works out of the box for free-form messaging. The Cloud API backend is optional and requires Meta business verification and templates.

How many WhatsApp numbers can I run on one Evolution API instance?

You can create many instances, each with its own QR code and token. The Railway template supports multiple instances and stores sessions in the volume.

Where does Evolution API store messages and contacts?

With DATABASE_SAVE_MESSAGES, DATABASE_SAVE_MESSAGE_UPDATE, DATABASE_SAVE_CONTACTS, and DATABASE_SAVE_CHATS set to true, data goes into Railway Postgres. Query it directly or through n8n.

Can I use Evolution API for two-way customer support in n8n?

Yes. The MESSAGES_UPSERT webhook fires on every incoming message. In n8n, check the sender, look up the conversation, call an LLM or human handoff, then reply via sendText. Avoid loops by checking the fromMe field. Keep the volume attached; it holds all session state.


Template Content

More templates in this category

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

jakemerson
121
View Template
Evolution API with n8n
Automate WhatsApp workflows with Evolution API, n8n, and Postgres.

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

Railway Templates
870