See the example env file in the official repository.

Key Variables

VariableDescriptionExample
SERVER_URLThe address for your running server. This address is used to return internal request data, such as webhook links.https://example.evolution-api.com
WEBSOCKET_ENABLEDEnable or disable WebSockettrue
WEBSOCKET_GLOBAL_EVENTSEnable Websocket globallytrue
CONFIG_SESSION_PHONE_CLIENTName that will be displayed on smartphone connectionEvolutionAPI
CONFIG_SESSION_PHONE_NAMEBrowser name that will be displayed on smartphone connectionChrome

Logs

VariableDescriptionExample
LOG_LEVELLogs to be shown: ERROR, WARN, DEBUG, INFO, LOG, VERBOSE, DARK, WEBHOOKSERROR,WARN,DEBUG,INFO,LOG,VERBOSE,DARK,WEBHOOKS
LOG_COLORShow colors in Logs (true or false)true
LOG_BAILEYSWhich Baileys logs to show: “fatal”, “error”, “warn”, “info”, “debug”, and “trace”error

Temporary Storage

Temporary data storage. Values are true or false to store or not.

VariableDescription
STORE_MESSAGESStore messages
STORE_MESSAGE_UPStore message updates
STORE_CONTACTSStore contacts
STORE_CHATSStore chats

Temporary Storage Cleaning

Cleaning temporary storage.

VariableDescription
CLEAN_STORE_CLEANING_INTERVALCleaning interval in seconds
CLEAN_STORE_MESSAGESWhether to delete messages (true or false)
CLEAN_STORE_MESSAGE_UPWhether to delete message updates (true or false)
CLEAN_STORE_CONTACTSWhether to delete contacts (true or false)
CLEAN_STORE_CHATSWhether to delete chats (true or false)

Persistent Storage

Connection configurations:

VariableDescriptionExample
DATABASE_ENABLEDWhether persistent storage is enabledtrue
DATABASE_CONNECTION_URIMongoDB connection URImongodb://username:password@host:port/database
DATABASE_CONNECTION_DB_PREFIX_NAMEPrefix name for database connection logserror

Which data to save (true or false):

VariableDescription
DATABASE_SAVE_DATA_INSTANCESave instance data
DATABASE_SAVE_DATA_NEW_MESSAGESave new messages
DATABASE_SAVE_MESSAGE_UPDATESave message updates
DATABASE_SAVE_DATA_CONTACTSSave contacts
DATABASE_SAVE_DATA_CHATSSave chats

Redis

VariableDescriptionExample
CACHE_REDIS_ENABLEDWhether Redis is enabled (true or false)true
CACHE_REDIS_URIRedis connection URIredis://redis:6379
CACHE_REDIS_PREFIX_KEYKey name prefixevolution
CACHE_REDIS_TTLTime to keep cached data in Redis604800
CACHE_REDIS_SAVE_INSTANCESSave WhatsApp connection credentials on Redisfalse
CACHE_LOCAL_ENABLEDCache data in memory (an alternative for Redis)false
CACHE_LOCAL_TTLTime to keep cached data in memory604800

RabbitMQ

VariableDescriptionExample
RABBITMQ_ENABLEDEnables RabbitMQ (true or false)true
RABBITMQ_GLOBAL_ENABLEDEnables RabbitMQ globally (true or false)false
RABBITMQ_URIRabbitMQ connection URIamqp://guest:guest@rabbitmq:5672
RABBITMQ_EXCHANGE_NAMEExchange nameevolution_exchange
RABBITMQ_EVENTS_APPLICATION_STARTUPSends an event on app startupfalse
RABBITMQ_EVENTS_QRCODE_UPDATEDSends QR Code Update eventstrue
RABBITMQ_EVENTS_MESSAGES_SETSends Message Creation events (message retrieval)true
RABBITMQ_EVENTS_MESSAGES_UPSERTSends Message Receipt eventstrue
RABBITMQ_EVENTS_MESSAGES_UPDATESends Message Update eventstrue
RABBITMQ_EVENTS_MESSAGES_DELETESends Message Deletion eventstrue
RABBITMQ_EVENTS_SEND_MESSAGESends Message Sending eventstrue
RABBITMQ_EVENTS_CONTACTS_SETSends Contact Creation eventstrue
RABBITMQ_EVENTS_CONTACTS_UPSERTSends Contact Creation events (contact retrieval)true
RABBITMQ_EVENTS_CONTACTS_UPDATESends Contact Update eventstrue
RABBITMQ_EVENTS_PRESENCE_UPDATESends Presence Update events (“typing…” or “recording…“)true
RABBITMQ_EVENTS_CHATS_SETSends Chat Creation events (chat retrieval)true
RABBITMQ_EVENTS_CHATS_UPSERTSends Chat Creation events (message receipt or sending in new chats)true
RABBITMQ_EVENTS_CHATS_UPDATESends Chat Update eventstrue
RABBITMQ_EVENTS_CHATS_DELETESends Chat Deletion eventstrue
RABBITMQ_EVENTS_GROUPS_UPSERTSends Group Creation eventstrue
RABBITMQ_EVENTS_GROUPS_UPDATESends Group Update eventstrue
RABBITMQ_EVENTS_GROUP_PARTICIPANTS_UPDATESends Group Participant Update eventstrue
RABBITMQ_EVENTS_CONNECTION_UPDATESends Connection Update eventstrue
RABBITMQ_EVENTS_LABELS_EDITSends Label Edit eventstrue
RABBITMQ_EVENTS_LABELS_ASSOCIATIONSends Label Association eventstrue
RABBITMQ_EVENTS_CALLSends Call eventstrue
RABBITMQ_EVENTS_TYPEBOT_STARTSends Typebot flow start eventsfalse
RABBITMQ_EVENTS_TYPEBOT_CHANGE_STATUSSends Typebot status update eventsfalse

SQS

VariableDescription
SQS_ENABLEDWhether SQS is enabled (true or false)
SQS_ACCESS_KEY_IDSQS access key ID
SQS_SECRET_ACCESS_KEYSQS access key
SQS_ACCOUNT_IDAccount ID
SQS_REGIONSQS region

Instances

VariableDescriptionExample
DEL_INSTANCEIn how many minutes an instance will be deleted if not connected. Use “false” to never delete.5
DEL_TEMP_INSTANCESDelete closed instances on startuptrue

CORS

VariableDescriptionExample
CORS_ORIGINAllowed origins for the API, separated by commas (use ”*” to accept requests from any origin).https://my-frontend.com,https://my-other-frontend.com
CORS_METHODSAllowed HTTP methods, separated by commas.POST,GET,PUT,DELETE
CORS_CREDENTIALSAllow cookies in requests (true or false).true

Webhook

VariableDescription
WEBHOOK_GLOBAL_URLURL to receive webhook requests
WEBHOOK_GLOBAL_ENABLEDWhether webhooks are enabled (true or false)
WEBHOOK_GLOBAL_WEBHOOK_BY_EVENTSEnable specific webhook events

Webhook events with true or false values:

Variable
WEBHOOK_EVENTS_APPLICATION_STARTUP
WEBHOOK_EVENTS_QRCODE_UPDATED
WEBHOOK_EVENTS_MESSAGES_SET
WEBHOOK_EVENTS_MESSAGES_UPSERT
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_NEW_JWT_TOKEN
WEBHOOK_EVENTS_TYPEBOT_START
WEBHOOK_EVENTS_TYPEBOT_CHANGE_STATUS
WEBHOOK_EVENTS_CHAMA_AI_ACTION
WEBHOOK_EVENTS_ERRORS
WEBHOOK_EVENTS_ERRORS_WEBHOOK

QR Code

VariableDescription
QRCODE_LIMITDuration for which the QR code will last
QRCODE_COLORColor of the generated QR code

Typebot

VariableDescription
TYPEBOT_API_VERSIONAPI version (fixed version or latest)
TYPEBOT_KEEP_OPENKeep Typebot open (true or false)

Authentication

VariableDescription
AUTHENTICATION_TYPEAuthentication type (jwt or apikey)
AUTHENTICATION_API_KEYAPI key to be used for authentication
AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES
AUTHENTICATION_JWT_EXPIRIN_INJWT token expiration time
AUTHENTICATION_JWT_SECRETSecret used to generate the JWT