See the example env file in the official repository.

Server

VariableValueExample
SERVER_TYPEThe type of server (http or https)http
SERVER_PORTPort on which the server will run8080
SERVER_URLThe address for your running server. This address is used to return data from internal requests, such as webhook links.https://example.evolution-api.com

Telemetry

VariableValueExample
TELEMETRYEnables or disables telemetry (true or false)true
TELEMETRY_URLURL of the telemetry serverhttps://telemetry.example.com

CORS

VariableValueExample
CORS_ORIGINAllowed origins for the API, separated by commas (use ”*” to accept requests from any origin)*
CORS_METHODSAllowed HTTP methods, separated by commasGET,POST,PUT,DELETE
CORS_CREDENTIALSPermission for cookies in requests (true or false)true

Logs

VariableValueExample
LOG_LEVELLogs that will be displayed among: ERROR, WARN, DEBUG, INFO, LOG, VERBOSE, DARK, WEBHOOKSERROR,WARN,DEBUG,INFO,LOG,VERBOSE,DARK,WEBHOOKS
LOG_COLORWhether or not to show colors in Logs (true or false)true
LOG_BAILEYSWhich Baileys logs will be displayed among: “fatal”, “error”, “warn”, “info”, “debug”, “trace”error

Instances

VariableValueExample
DEL_INSTANCEIn how many minutes an instance will be deleted if not connected. Use “false” to never deletefalse

Persistent Storage

VariableValueExample
DATABASE_ENABLEDWhether persistent storage is enabled (true or false)true
DATABASE_PROVIDERDatabase provider (postgresql or mysql)postgresql
DATABASE_CONNECTION_URIThe database connection URIpostgresql://user:pass@localhost:5432/evolution?schema=public
DATABASE_CONNECTION_CLIENT_NAMEClient name for the database connection, used to separate one API installation from another using the same databaseevolution_exchange

Which data will be saved (true or false)

VariableValue
DATABASE_SAVE_DATA_INSTANCESaves instance data
DATABASE_SAVE_DATA_NEW_MESSAGESaves new messages
DATABASE_SAVE_MESSAGE_UPDATESaves message updates
DATABASE_SAVE_DATA_CONTACTSSaves contacts
DATABASE_SAVE_DATA_CHATSSaves chats
DATABASE_SAVE_DATA_LABELSSaves labels
DATABASE_SAVE_DATA_HISTORICSaves event history

RabbitMQ

VariableValueExample
RABBITMQ_ENABLEDEnables RabbitMQ (true or false)false
RABBITMQ_URIRabbitMQ connection URIamqp://localhost
RABBITMQ_EXCHANGE_NAMEExchange nameevolution
RABBITMQ_GLOBAL_ENABLEDEnables RabbitMQ globally (true or false)false

Choose the events you want to send to RabbitMQ

VariableValueExample
RABBITMQ_EVENTS_APPLICATION_STARTUPSends an event on app startup (true or false)false
RABBITMQ_EVENTS_INSTANCE_CREATESends instance creation events (true or false)false
RABBITMQ_EVENTS_INSTANCE_DELETESends instance deletion events (true or false)false
RABBITMQ_EVENTS_QRCODE_UPDATEDSends QR Code update events (true or false)false
RABBITMQ_EVENTS_MESSAGES_SETSends message creation events (message retrieval) (true or false)false
RABBITMQ_EVENTS_MESSAGES_UPSERTSends message receipt events (true or false)false
RABBITMQ_EVENTS_MESSAGES_EDITEDSends message editing events (true or false)false
RABBITMQ_EVENTS_MESSAGES_UPDATESends message update events (true or false)false
RABBITMQ_EVENTS_MESSAGES_DELETESends message deletion events (true or false)false
RABBITMQ_EVENTS_SEND_MESSAGESends message sending events (true or false)false
RABBITMQ_EVENTS_CONTACTS_SETSends contact creation events (true or false)false
RABBITMQ_EVENTS_CONTACTS_UPSERTSends contact retrieval events (true or false)false
RABBITMQ_EVENTS_CONTACTS_UPDATESends contact update events (true or false)false
RABBITMQ_EVENTS_PRESENCE_UPDATESends presence update events (“typing…” or “recording…“) (true or false)false
RABBITMQ_EVENTS_CHATS_SETSends chat creation events (chat retrieval) (true or false)false
RABBITMQ_EVENTS_CHATS_UPSERTSends chat creation events (receiving or sending messages in new chats) (true or false)false
RABBITMQ_EVENTS_CHATS_UPDATESends chat update events (true or false)false
RABBITMQ_EVENTS_CHATS_DELETESends chat deletion events (true or false)false
RABBITMQ_EVENTS_GROUPS_UPSERTSends group creation events (true or false)false
RABBITMQ_EVENTS_GROUP_UPDATESends group update events (true or false)false
RABBITMQ_EVENTS_GROUP_PARTICIPANTS_UPDATESends group participant update events (true or false)false
RABBITMQ_EVENTS_CONNECTION_UPDATESends connection update events (true or false)false
RABBITMQ_EVENTS_CALLSends call events (true or false)false
RABBITMQ_EVENTS_TYPEBOT_STARTSends Typebot flow start events (true or false)false
RABBITMQ_EVENTS_TYPEBOT_CHANGE_STATUSSends Typebot status update events (true or false)false

SQS

VariableValueExample
SQS_ENABLEDWhether SQS is enabled (true or false)false
SQS_ACCESS_KEY_IDSQS key ID-
SQS_SECRET_ACCESS_KEYAccess key-
SQS_ACCOUNT_IDAccount ID-
SQS_REGIONSQS region-

WebSocket

VariableValueExample
WEBSOCKET_ENABLEDEnables WebSocket (true or false)false
WEBSOCKET_GLOBAL_EVENTSEnables global events in WebSocket (true or false)false

WhatsApp Business API

VariableValueExample
WA_BUSINESS_TOKEN_WEBHOOKToken used to validate the webhook in the Facebook APPevolution
WA_BUSINESS_URLWhatsApp Business API URLhttps://graph.facebook.com
WA_BUSINESS_VERSIONWhatsApp Business API versionv20.0
WA_BUSINESS_LANGUAGEWhatsApp Business API languageen_US

Global Webhook

VariableValueExample
WEBHOOK_GLOBAL_ENABLEDWhether webhooks are globally enabled (true or false)false
WEBHOOK_GLOBAL_URLURL that will receive webhook requestshttps://webhook.example.com
WEBHOOK_GLOBAL_WEBHOOK_BY_EVENTSEnables webhook by event, respecting the global URL and each event’s name (true or false)false

Webhook events with true or false value

Variable
WEBHOOK_EVENTS_APPLICATION_STARTUP
WEBHOOK_EVENTS_QRCODE_UPDATED
WEBHOOK_EVENTS_MESSAGES_SET
WEBHOOK_EVENTS_MESSAGES_UPSERT
WEBHOOK_EVENTS_MESSAGES_EDITED
WEBHOOK_EVENTS_MESSAGES_UPDATE
WEBHOOK_EVENTS_MESSAGES_DELETE
WEBHOOK_EVENTS_SEND_MESSAGE
WEBHOOK_EVENTS_CONTACTS_SET
WEBHOOK_EVENTS_CONTACTS_UPSERT
WEBHOOK_EVENTS_CONTACTS_UPDATE
WEBHOOK_EVENTS_PRESENCE_UPDATE
WEBHOOK_EVENTS_CHATS_SET
WEBHOOK_EVENTS_CHATS_UPSERT
WEBHOOK_EVENTS_CHATS_UPDATE
WEBHOOK_EVENTS_CHATS_DELETE
WEBHOOK_EVENTS_GROUPS_UPSERT
WEBHOOK_EVENTS_GROUPS_UPDATE
WEBHOOK_EVENTS_GROUP_PARTICIPANTS_UPDATE
WEBHOOK_EVENTS_CONNECTION_UPDATE
WEBHOOK_EVENTS_LABELS_EDIT
WEBHOOK_EVENTS_LABELS_ASSOCIATION
WEBHOOK_EVENTS_CALL
WEBHOOK_EVENTS_TYPEBOT_START
WEBHOOK_EVENTS_TYPEBOT_CHANGE_STATUS
WEBHOOK_EVENTS_ERRORS
WEBHOOK_EVENTS_ERRORS_WEBHOOK

Session Configurations

VariableValueExample
CONFIG_SESSION_PHONE_CLIENTName that will be displayed on the smartphone connectionEvolution API
CONFIG_SESSION_PHONE_NAMEBrowser name (Chrome, Firefox, Edge, Opera, Safari)Chrome

QR Code

VariableValueExample
QRCODE_LIMITHow long the QR code will last30
QRCODE_COLORColor of the generated QR code#175197

Typebot

VariableValueExample
TYPEBOT_API_VERSIONAPI version (fixed

version or latest) | latest |

Chatwoot

VariableValueExample
CHATWOOT_ENABLEDEnables integration with Chatwoot (true or false)false
CHATWOOT_MESSAGE_READMarks the client’s last WhatsApp message as read when sending a message in Chatwoot (true or false)true
CHATWOOT_MESSAGE_DELETEDeletes the message in Chatwoot when deleted in WhatsApp (true or false)true
CHATWOOT_IMPORT_DATABASE_CONNECTION_URIDatabase connection URI for Chatwoot to import messagespostgresql://user:password@host:5432/chatwoot?sslmode=disable
CHATWOOT_IMPORT_PLACEHOLDER_MEDIA_MESSAGEImports media messages as a placeholder in Chatwoot (true or false)true

OpenAI

VariableValueExample
OPENAI_ENABLEDEnables integration with OpenAI (true or false)false

Dify

VariableValueExample
DIFY_ENABLEDEnables integration with Dify (true or false)false

Cache

VariableValueExample
CACHE_REDIS_ENABLEDEnables Redis cache (true or false)true
CACHE_REDIS_URIRedis connection URIredis://localhost:6379/6
CACHE_REDIS_PREFIX_KEYPrefix to differentiate data from one installation to another using the same Redisevolution
CACHE_REDIS_SAVE_INSTANCESSaves WhatsApp connection credentials in Redis (true or false)false
CACHE_LOCAL_ENABLEDEnables local in-memory cache as an alternative to Redis (true or false)false

Amazon S3 / MinIO

VariableValueExample
S3_ENABLEDEnables storage on S3 (true or false)false
S3_ACCESS_KEYS3 access key-
S3_SECRET_KEYS3 secret key-
S3_BUCKETS3 bucket nameevolution
S3_PORTS3 connection port443
S3_ENDPOINTS3 (or MinIO) endpoints3.amazonaws.com
S3_USE_SSLUses SSL for S3 connection (true or false)true

Authentication

VariableValueExample
AUTHENTICATION_API_KEYAPI key used for global authentication429683C4C977415CAAFCCE10F7D57E11
AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCESShows instances in the fetch endpoint (true or false)true

Language

VariableValueExample
LANGUAGEAPI languageen