Getting Started
Create a.env file in your project root based on the provided .env.example:
.env file with your configuration values.
Server Configuration
Basic server settings that control how Evolution API runs.The name identifier for your Evolution API server.
Server protocol type. Use
http or https.The port your API server will listen on.
The full URL where your Evolution API is accessible. Used for webhooks and callbacks.
SSL Configuration
Path to your SSL private key file.
Path to your SSL certificate file.
Authentication
Global API key for authenticating requests. This key is required in the
apikey header for all API calls.Whether to expose instances in the fetch instances endpoint.
Database Configuration
Evolution API supports PostgreSQL, MySQL, and PostgreSQL with PgBouncer.Database provider to use. Options:
postgresql, mysql, psql_bouncerDatabase connection string in URI format.PostgreSQL:MySQL:
Client name for database connection. Used to separate multiple Evolution API installations using the same database.
PostgreSQL connection URI with PgBouncer. Only used when
DATABASE_PROVIDER=psql_bouncer.Data Storage Options
Control what data is saved to the database:Save instance data to database.
Save new messages to database.
Save message updates (delivery status, read status) to database.
Save contacts to database.
Save chats to database.
Save labels to database.
Save message history to database.
Save WhatsApp number verification data.
Number of days to keep WhatsApp verification data.
Delete messages from database when deleted in WhatsApp.
Cache Configuration
Evolution API supports Redis and local caching.Redis Cache
Enable Redis caching.
Redis connection URI.
Time-to-live for cached data in seconds (default: 7 days).
Prefix for Redis keys. Used to separate data from multiple installations.
Save WhatsApp instance connection data in Redis instead of database.
Local Cache
Enable local in-memory caching.
CORS Configuration
Allowed origins for CORS. Use
* for all or comma-separated domains.Allowed HTTP methods for CORS.
Allow credentials in CORS requests.
Logging
Comma-separated list of log levels to display.
Enable colored log output.
Baileys library log level. Options:
fatal, error, warn, info, debug, traceWhatsApp Configuration
Name displayed on the smartphone when connecting.
Browser name displayed. Options:
Chrome, Firefox, Edge, Opera, SafariMaximum number of QR code generation attempts.
QR code color in hex format.
Storage Configuration
Amazon S3 / MinIO
Enable S3-compatible storage for media files.
S3 access key ID.
S3 secret access key.
S3 bucket name.
S3 endpoint port.
S3 endpoint URL.
S3 region.
Use SSL for S3 connections.
Webhook Configuration
Enable global webhooks for all instances.
Global webhook URL that receives events from all instances.
Send each event type to a separate webhook URL.
Webhook Retry Configuration
Webhook request timeout in milliseconds.
Maximum number of retry attempts for failed webhooks.
Initial delay before first retry in seconds.
Use exponential backoff for retries.
Maximum delay between retries in seconds.
Random jitter factor for retry delays (0.0 to 1.0).
HTTP status codes that should not trigger retries.
Event Integration
RabbitMQ
Enable RabbitMQ event integration.
RabbitMQ connection URI.
RabbitMQ exchange name.
Send events from all instances to the same queue.
SQS
Enable Amazon SQS event integration.
AWS access key ID for SQS.
AWS secret access key for SQS.
AWS account ID.
AWS region for SQS.
WebSocket
Enable WebSocket event streaming.
Stream events from all instances.
Comma-separated list of allowed hosts for WebSocket connections.
Monitoring
Prometheus Metrics
Enable Prometheus metrics endpoint.
Require authentication for metrics endpoint.
Username for metrics endpoint authentication.
Password for metrics endpoint authentication.
Comma-separated list of allowed IP addresses for metrics endpoint.
Telemetry
Enable anonymous usage telemetry.
Sentry DSN for error tracking.
Proxy Configuration
Global proxy host.
Global proxy port.
Global proxy protocol (
http or https).Global proxy username.
Global proxy password.
Instance Management
Delete disconnected instances after specified time (in minutes) or set to
false to disable.Maximum number of event listeners per instance.
API response language. Options:
en, pt, esExample 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