Skip to main content
Evolution API provides official Docker images for easy deployment and scaling. This guide covers single-container deployment and complete multi-service setups using Docker Compose.

Prerequisites

Before you begin, ensure you have:
  • Docker Engine 20.10 or later
  • Docker Compose 2.0 or later (optional, for multi-service deployment)
  • At least 2GB RAM available
  • Ports 8080 (API), 5432 (PostgreSQL), and 6379 (Redis) available

Quick Start with Docker

Single Container Deployment

For testing or development, you can run Evolution API in a single container:
Access the API at http://localhost:8080.
Single container deployment without external database and Redis is only suitable for testing. Production deployments should use Docker Compose with persistent storage.

Docker Compose Deployment

The recommended way to deploy Evolution API is using Docker Compose, which sets up all required services.

Complete Setup

1

Create project directory

Create a directory for your Evolution API deployment:
2

Create docker-compose.yaml

Create a docker-compose.yaml file with the following content:
docker-compose.yaml
3

Create environment file

Create a .env file with your configuration:
.env
4

Start services

Start all services using Docker Compose:
This will start:
  • Evolution API (port 8080)
  • Evolution Manager UI (port 3000)
  • PostgreSQL database (internal)
  • Redis cache (internal)
5

Verify deployment

Check that all containers are running:
You should see all services with status “Up”.
6

Access the application

  • API: http://localhost:8080
  • Manager UI: http://localhost:3000
Test the API:

Service Configuration

Evolution API Service

The main API service configuration:
string
The Docker image to use. Options:
  • evoapicloud/evolution-api:latest - Latest stable version
  • evoapicloud/evolution-api:v2.3.1 - Specific version
  • evoapicloud/evolution-api:develop - Development version
string
Port mapping in format host:container.Examples:
  • "8080:8080" - Expose on all interfaces
  • "127.0.0.1:8080:8080" - Expose only on localhost
  • "9090:8080" - Expose on host port 9090
array
Volume mounts for persistent data:
  • evolution_instances:/evolution/instances - Instance data and QR codes
  • ./custom-data:/evolution/custom - Mount custom directory (optional)

PostgreSQL Service

Database configuration with performance optimizations:
The max_connections=1000 setting allows Evolution API to handle many concurrent WhatsApp instances.

Redis Service

Cache configuration with persistence:
The --appendonly yes flag enables AOF persistence for data durability.

Volume Management

Evolution API uses Docker volumes for persistent storage:

Backup Volumes

Create backups of your volumes:

Restore Volumes

Restore from backups:

Network Configuration

The evolution-net bridge network connects all services:
Services can communicate using container names:
  • Database: evolution-postgres:5432
  • Redis: evolution-redis:6379
  • API: evolution_api:8080

Custom Network

For integration with other services (e.g., reverse proxy):
Add the external network to your services:

Dockerfile Reference

Evolution API uses a multi-stage build process:
The Dockerfile:
  1. Uses Node.js 24 Alpine for minimal image size
  2. Installs required system dependencies (ffmpeg for audio conversion)
  3. Builds TypeScript source code
  4. Creates optimized production image
  5. Runs database migrations on startup

Environment Variables

Key environment variables for Docker deployment:
.env
See the Environment Variables page for complete documentation.

Production Considerations

Resource Limits

Set resource limits for containers:

Health Checks

Add health checks to monitor service status:

Restart Policies

Configure automatic restart on failure:

Troubleshooting

Check container logs:
Common issues:
  • Missing environment variables in .env
  • Port conflicts (8080, 5432, or 6379 already in use)
  • Database connection errors
Verify database is running and accessible:
Check connection URI format in .env:
Monitor container resource usage:
Optimize by:
  • Setting resource limits
  • Reducing number of concurrent instances
  • Enabling Redis cache to reduce database load
  • Increasing server RAM
If ports are already in use, change them in docker-compose.yaml:
Find processes using ports:

Useful Commands

Next Steps

Environment Variables

Complete guide to all configuration options

Database Setup

Configure PostgreSQL or MySQL for production