Skip to main content

Overview

Evolution API can be installed in multiple ways depending on your needs. This guide covers Docker installation (recommended), manual installation with npm, and production deployment configurations.
Evolution API requires Node.js 20+, PostgreSQL or MySQL, and Redis for production use.
Docker provides the fastest and most reliable way to run Evolution API with all dependencies pre-configured.

Prerequisites

Ensure you have installed:
  • Docker (version 20.10 or higher)
  • Docker Compose (version 2.0 or higher)
  • At least 2GB of available RAM
  • 5GB of free disk space

Installation steps

1

Clone the repository

2

Configure environment variables

Copy the example environment file:
Edit .env with your preferred text editor. Here are the essential variables:
.env
Evolution API supports over 100 configuration options. Here are additional important variables:Webhooks:
WebSocket:
RabbitMQ:
Apache Kafka:
Amazon SQS:
S3 Storage (Amazon S3 or MinIO):
OpenAI Integration:
Chatwoot Integration:
Typebot Integration:
Dify Integration:
Proxy Configuration:
SSL Configuration:
See the .env.example file for the complete list.
Generate a secure API key: openssl rand -hex 32
3

Configure PostgreSQL credentials

The docker-compose.yaml expects PostgreSQL environment variables. Add these to your .env:
.env
Update your database connection URI to match:
.env
4

Start the services

Launch all services with Docker Compose:
This creates and starts:
  • evolution_api - Main API server (port 8080)
  • evolution_frontend - Management interface (port 3000)
  • evolution_postgres - PostgreSQL database (port 5432)
  • evolution_redis - Redis cache (port 6379)
Verify all services are running:
You should see all containers in “Up” status.
5

Verify the installation

Check if the API is responding:
Access the Evolution Manager interface at:
View API logs:

Docker Compose services

The default docker-compose.yaml includes:
The Evolution API Docker image is based on node:24-alpine and includes ffmpeg for media processing.

Manual installation (npm)

For development or custom deployments, you can install Evolution API manually using npm.

Prerequisites

1

Install Node.js

Evolution API requires Node.js 20 or higher. We recommend using nvm:
2

Install system dependencies

Install required system packages:Ubuntu/Debian:
macOS:
CentOS/RHEL:
3

Install PostgreSQL

Install and configure PostgreSQL:Ubuntu/Debian:
macOS:
Create the database:
4

Install Redis

Install and start Redis:Ubuntu/Debian:
macOS:
Verify Redis is running:

Installation steps

1

Clone and install

2

Configure environment

Copy and edit the environment file:
Update the database connection for your local setup:
.env
3

Set database provider

Evolution API supports PostgreSQL and MySQL. Set the provider before running database commands:
Or for MySQL:
4

Generate and deploy database

Generate Prisma client and run migrations:
The db:deploy script automatically selects the correct schema based on your DATABASE_PROVIDER environment variable.
5

Build the project

Compile TypeScript to JavaScript:
This creates the production build in the dist/ directory.
6

Start the server

For development with hot reload:
For production:
The API will be available at http://localhost:8080

Using the installation script

Evolution API includes an automated installation script for Linux and macOS:
For development mode:
The script automatically:
  • Installs nvm and Node.js 20
  • Installs project dependencies
  • Generates and deploys the database
  • Starts the server

MySQL configuration

To use MySQL instead of PostgreSQL:
1

Install MySQL

Ubuntu/Debian:
macOS:
2

Create database

3

Update environment

.env
4

Deploy database

Production deployment

For production environments, consider these additional configurations:

Using process managers

Install and configure PM2:
Monitor your application:

SSL/HTTPS configuration

To enable HTTPS, update your .env:
.env
Use Let’s Encrypt with Certbot to obtain free SSL certificates.

Reverse proxy with Nginx

Example Nginx configuration:
/etc/nginx/sites-available/evolution-api
Enable the site:

Environment-specific settings

Security:
Performance:
Logging:
Monitoring:

Database migrations

When updating Evolution API, you may need to run database migrations:
For development (creating new migrations):
Always backup your database before running migrations in production.

Troubleshooting

Check container logs:
Common issues:
  • Port conflicts: Check if ports 8080, 3000, 5432, or 6379 are already in use
  • Missing environment variables: Verify all required variables are set in .env
  • Database connection: Ensure PostgreSQL credentials match in both .env and docker-compose.yaml
Verify database is accessible:
Check connection URI format:
  • PostgreSQL: postgresql://user:pass@host:5432/database?schema=public
  • MySQL: mysql://user:pass@host:3306/database
Test Redis connection:
Verify Redis URI in .env:
If npm run build fails:
  1. Clear node modules and reinstall:
  2. Verify Node.js version:
  3. Check TypeScript compilation:
Change the default port in .env:
For Docker, update docker-compose.yaml:

Next steps

Now that Evolution API is installed, you can:

Create your first instance

Follow the quickstart guide to create a WhatsApp instance

Configure webhooks

Set up webhooks to receive real-time events

Explore integrations

Connect with Typebot, Chatwoot, OpenAI, and more

API documentation

Explore all available endpoints and features