Skip to main content
Evolution API is configured entirely through environment variables. This page documents all available options organized by category.

Getting Started

Create a .env file in your project root based on the provided .env.example:
Edit the .env file with your configuration values.
Never commit your .env file to version control. It contains sensitive credentials and API keys.

Server Configuration

Basic server settings that control how Evolution API runs.
string
default:"evolution"
The name identifier for your Evolution API server.
string
default:"http"
Server protocol type. Use http or https.
number
default:"8080"
The port your API server will listen on.
string
required
The full URL where your Evolution API is accessible. Used for webhooks and callbacks.

SSL Configuration

string
Path to your SSL private key file.
string
Path to your SSL certificate file.

Authentication

string
required
Global API key for authenticating requests. This key is required in the apikey header for all API calls.
Use a strong, randomly generated key. This key provides full access to your Evolution API.
boolean
default:"true"
Whether to expose instances in the fetch instances endpoint.

Database Configuration

Evolution API supports PostgreSQL, MySQL, and PostgreSQL with PgBouncer.
enum
required
Database provider to use. Options: postgresql, mysql, psql_bouncer
string
required
Database connection string in URI format.PostgreSQL:
MySQL:
string
default:"evolution_exchange"
Client name for database connection. Used to separate multiple Evolution API installations using the same database.
string
PostgreSQL connection URI with PgBouncer. Only used when DATABASE_PROVIDER=psql_bouncer.

Data Storage Options

Control what data is saved to the database:
boolean
default:"true"
Save instance data to database.
boolean
default:"true"
Save new messages to database.
boolean
default:"true"
Save message updates (delivery status, read status) to database.
boolean
default:"true"
Save contacts to database.
boolean
default:"true"
Save chats to database.
boolean
default:"true"
Save labels to database.
boolean
default:"true"
Save message history to database.
boolean
default:"true"
Save WhatsApp number verification data.
number
default:"7"
Number of days to keep WhatsApp verification data.
boolean
default:"true"
Delete messages from database when deleted in WhatsApp.

Cache Configuration

Evolution API supports Redis and local caching.

Redis Cache

boolean
default:"true"
Enable Redis caching.
string
required
Redis connection URI.
number
default:"604800"
Time-to-live for cached data in seconds (default: 7 days).
string
default:"evolution"
Prefix for Redis keys. Used to separate data from multiple installations.
boolean
default:"false"
Save WhatsApp instance connection data in Redis instead of database.

Local Cache

boolean
default:"false"
Enable local in-memory caching.

CORS Configuration

string
default:"*"
Allowed origins for CORS. Use * for all or comma-separated domains.
string
default:"GET,POST,PUT,DELETE"
Allowed HTTP methods for CORS.
boolean
default:"true"
Allow credentials in CORS requests.

Logging

string
Comma-separated list of log levels to display.
boolean
default:"true"
Enable colored log output.
string
default:"error"
Baileys library log level. Options: fatal, error, warn, info, debug, trace

WhatsApp Configuration

string
default:"Evolution API"
Name displayed on the smartphone when connecting.
string
default:"Chrome"
Browser name displayed. Options: Chrome, Firefox, Edge, Opera, Safari
number
default:"30"
Maximum number of QR code generation attempts.
string
default:"#175197"
QR code color in hex format.

Storage Configuration

Amazon S3 / MinIO

boolean
default:"false"
Enable S3-compatible storage for media files.
string
S3 access key ID.
string
S3 secret access key.
string
default:"evolution"
S3 bucket name.
number
default:"443"
S3 endpoint port.
string
default:"s3.domain.com"
S3 endpoint URL.
string
default:"eu-west-3"
S3 region.
boolean
default:"true"
Use SSL for S3 connections.

Webhook Configuration

boolean
default:"false"
Enable global webhooks for all instances.
string
Global webhook URL that receives events from all instances.
boolean
default:"false"
Send each event type to a separate webhook URL.

Webhook Retry Configuration

number
default:"60000"
Webhook request timeout in milliseconds.
number
default:"10"
Maximum number of retry attempts for failed webhooks.
number
default:"5"
Initial delay before first retry in seconds.
boolean
default:"true"
Use exponential backoff for retries.
number
default:"300"
Maximum delay between retries in seconds.
number
default:"0.2"
Random jitter factor for retry delays (0.0 to 1.0).
string
default:"400,401,403,404,422"
HTTP status codes that should not trigger retries.

Event Integration

RabbitMQ

boolean
default:"false"
Enable RabbitMQ event integration.
string
default:"amqp://localhost"
RabbitMQ connection URI.
string
default:"evolution"
RabbitMQ exchange name.
boolean
default:"false"
Send events from all instances to the same queue.

SQS

boolean
default:"false"
Enable Amazon SQS event integration.
string
AWS access key ID for SQS.
string
AWS secret access key for SQS.
string
AWS account ID.
string
AWS region for SQS.

WebSocket

boolean
default:"false"
Enable WebSocket event streaming.
boolean
default:"false"
Stream events from all instances.
string
default:"127.0.0.1,::1,::ffff:127.0.0.1"
Comma-separated list of allowed hosts for WebSocket connections.

Monitoring

Prometheus Metrics

boolean
default:"false"
Enable Prometheus metrics endpoint.
boolean
default:"true"
Require authentication for metrics endpoint.
string
default:"prometheus"
Username for metrics endpoint authentication.
string
default:"secure_random_password_here"
Password for metrics endpoint authentication.
string
default:"127.0.0.1,10.0.0.100,192.168.1.50"
Comma-separated list of allowed IP addresses for metrics endpoint.

Telemetry

boolean
default:"true"
Enable anonymous usage telemetry.
string
Sentry DSN for error tracking.

Proxy Configuration

string
Global proxy host.
string
Global proxy port.
string
Global proxy protocol (http or https).
string
Global proxy username.
string
Global proxy password.

Instance Management

string
default:"false"
Delete disconnected instances after specified time (in minutes) or set to false to disable.
number
default:"50"
Maximum number of event listeners per instance.
string
default:"en"
API response language. Options: en, pt, es

Example Configurations

Minimal Configuration

.env

Production Configuration

.env

Next Steps

Database Setup

Configure your database for Evolution API

Docker Deployment

Deploy Evolution API with Docker Compose