---
title: "Deploy Evolution API"
description: "[Jul'26] The cheapest self-hosted WhatsApp REST API"
category: "Automation"
url: https://railway.com/deploy/self-hosted-evolution-api
---

# Deploy Evolution API

[Jul'26] The cheapest self-hosted WhatsApp REST API

**[Deploy Evolution API on Railway](https://railway.com/template/self-hosted-evolution-api)**

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

- **Creator:** codestorm
- **Category:** Automation
- **Total deploys:** 130

## Template content

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

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

### evolution-api https://i.imgur.com/KFzkV34.png

- **Image:** evoapicloud/evolution-api:latest
- **Public domain:** Yes

## Documentation

![Railway](https://img.shields.io/badge/Railway-Supported-shamrock?logo=railway)

# Deploy and Host Evolution API with PostgreSQL on Railway

Evolution API with PostgreSQL is a lightweight Evolution API deployment template for Railway. It runs Evolution API with PostgreSQL for reliable data persistence, local cache for simpler operation, and no Redis dependency, making it a practical low-cost option for hosting a WhatsApp HTTP REST API backend.

## About Hosting Evolution API with PostgreSQL

Hosting Evolution API with PostgreSQL on Railway gives you a fast way to run Evolution API with the required database layer already connected. PostgreSQL stores application data such as instances, messages, contacts, sessions, and other API-related records, while local cache keeps the setup simpler by avoiding an additional Redis service.

This template is useful for demos, personal projects, lightweight automation, and small-to-medium WhatsApp API workloads. Railway handles service deployment, networking, environment variables, public domain setup, PostgreSQL provisioning, and optional persistent volume storage.

Compared to a Redis-backed setup, this version keeps the infrastructure lighter and cheaper while still using PostgreSQL as the main database provider required by Evolution API.

## Common Use Cases

* Running a lightweight WhatsApp REST API backend
* Hosting Evolution API with PostgreSQL persistence
* Building WhatsApp automations for personal or small business projects
* Connecting WhatsApp workflows with n8n, Typebot, Chatwoot, or custom apps
* Creating a low-cost Evolution API starter environment without Redis
* Testing Evolution API before scaling to a larger production stack

## Dependencies for Evolution API with PostgreSQL Hosting

* Evolution API service
* PostgreSQL database
* Optional Railway volume for persistent instance/session files

### Deployment Dependencies

* [Evolution API Documentation](https://doc.evolution-api.com/)
* [Evolution API GitHub Repository](https://github.com/EvolutionAPI/evolution-api)
* [Railway Documentation](https://docs.railway.com/)

### Implementation Details

This template deploys Evolution API with PostgreSQL as the database provider and local cache enabled. Redis is disabled to keep the deployment lighter.

```env
PORT=8080
SERVER_URL=https://${{RAILWAY_PUBLIC_DOMAIN}}

CACHE_LOCAL_ENABLED=true
CACHE_REDIS_ENABLED=false

DATABASE_PROVIDER=postgresql
DATABASE_CONNECTION_URI=${{Postgres.DATABASE_URL}}

AUTHENTICATION_API_KEY=${{secret(64, "abcdef0123456789")}}
```

If your Evolution API image requires the database layer to be explicitly enabled, you can also include:

```env
DATABASE_ENABLED=true
```

## PostgreSQL Configuration

This template uses PostgreSQL as the main database provider for Evolution API.

Recommended Railway variable:

```env
DATABASE_CONNECTION_URI=${{Postgres.DATABASE_URL}}
```

PostgreSQL is required because Evolution API needs a valid database provider during startup. If `DATABASE_PROVIDER` is missing or empty, the service may fail with an error similar to:

```text
Error: Database provider invalid.
```

For this template, the database provider should be:

```env
DATABASE_PROVIDER=postgresql
```

## Persistent Volume Configuration

This template can optionally use a Railway volume mounted into the Evolution API service to persist instance-related files.

Recommended volume configuration:

```text
Mount Path: /evolution/instances
Initial Size: 5.00 GB
Resize: Live resize supported
```

The volume is mounted to the following directory inside the `evolution-api` service:

```text
/evolution/instances
```

This mount is useful because Evolution API may store instance/session-related files in the instances directory. By using a persistent volume, the data in this path can remain available even when the service is redeployed or restarted.

The default volume size can start at **5.00 GB**. Railway only charges for the amount of data stored, and the volume can be resized later using **Live Resize** when more storage is needed.

## Important Notes

This template includes PostgreSQL and does not include Redis.

That makes the deployment lighter than a full PostgreSQL + Redis stack, while still keeping the database persistence required by Evolution API. For heavier production workloads, high-volume messaging, or larger multi-instance usage, consider using a full setup with PostgreSQL and Redis.

Use this PostgreSQL version when you want:

* A lightweight Evolution API deployment
* PostgreSQL-backed persistence
* No Redis dependency
* Lower Railway resource usage
* A quick testing or demo environment
* A WhatsApp API backend for small automations

## How to Access the Evolution API Manager

After the deployment is complete, Railway will generate a public URL for your Evolution API service. You can use this public URL to confirm that the API is running and to find the Manager URL.

1. Open the public URL of your Evolution API service.

   You should see a response similar to this:

   ```json
   {
     "status": 200,
     "message": "Welcome to the Evolution API, it is working!",
     "version": "2.3.7",
     "clientName": "evolution_exchange",
     "manager": "http://XXXXXX.up.railway.app/manager",
     "documentation": "https://doc.evolution-api.com",
     "whatsappWebVersion": "2.3000.1040316331"
   }
   ```

2. Copy the value from the `manager` field.

   Example:

   ```text
   http://XXXXXX.up.railway.app/manager
   ```

3. Open the Manager URL in your browser.

4. When the Manager asks for the **API Key Global**, use the value of `AUTHENTICATION_API_KEY` from your Evolution API service.

   You can find it in Railway by opening your Evolution API service, then going to the **Variables** tab.

5. Paste the `AUTHENTICATION_API_KEY` value into the **API Key Global** field.

6. Congrats, you are now inside the Evolution API Manager and can start creating or managing WhatsApp instances.

## Create a WhatsApp Instance

After you are inside the Evolution API Manager, create a new WhatsApp instance.

Use this simple starter configuration:

```text
Instance name: main
Channel: Baileys
```

The instance name `main` is recommended for a simple starter setup. If you use this Evolution API service later with n8n, Chatwoot, Typebot, or another automation tool, you can use `main` as the instance name in your API endpoint.

After creating the instance, open the connection or QR code page in the Manager.

Then scan the QR code using WhatsApp on your phone:

```text
WhatsApp -> Linked devices -> Link a device -> Scan QR code
```

Wait until the instance status becomes connected.

After the instance is connected, you can test it by sending a WhatsApp message from another number to the connected WhatsApp account. If the message appears in the Evolution API Manager or the instance stays connected successfully, your Evolution API setup is ready to use.

You can now start using Evolution API as a WhatsApp HTTP REST API backend for automations, alerts, notifications, or integrations with tools such as n8n, Chatwoot, Typebot, or your own custom application.

## Why Deploy Evolution API with PostgreSQL on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you do not have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Evolution API with PostgreSQL on Railway, you get a simple and reliable way to start using Evolution API with database-backed persistence. It is ideal for testing, demos, personal automation, and lightweight WhatsApp API workloads without running an additional Redis service.


## 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/self-hosted-evolution-api
