Getting Started
Environment Variables
See the example env file in the official repository.
Key Variables
Variable | Description | Example |
---|---|---|
SERVER_URL | The address for your running server. This address is used to return internal request data, such as webhook links. | https://example.evolution-api.com |
WEBSOCKET_ENABLED | Enable or disable WebSocket | true |
WEBSOCKET_GLOBAL_EVENTS | Enable Websocket globally | true |
CONFIG_SESSION_PHONE_CLIENT | Name that will be displayed on smartphone connection | EvolutionAPI |
CONFIG_SESSION_PHONE_NAME | Browser name that will be displayed on smartphone connection | Chrome |
Logs
Variable | Description | Example |
---|---|---|
LOG_LEVEL | Logs to be shown: ERROR, WARN, DEBUG, INFO, LOG, VERBOSE, DARK, WEBHOOKS | ERROR,WARN,DEBUG,INFO,LOG,VERBOSE,DARK,WEBHOOKS |
LOG_COLOR | Show colors in Logs (true or false) | true |
LOG_BAILEYS | Which 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.
Variable | Description |
---|---|
STORE_MESSAGES | Store messages |
STORE_MESSAGE_UP | Store message updates |
STORE_CONTACTS | Store contacts |
STORE_CHATS | Store chats |
Temporary Storage Cleaning
Cleaning temporary storage.
Variable | Description |
---|---|
CLEAN_STORE_CLEANING_INTERVAL | Cleaning interval in seconds |
CLEAN_STORE_MESSAGES | Whether to delete messages (true or false) |
CLEAN_STORE_MESSAGE_UP | Whether to delete message updates (true or false) |
CLEAN_STORE_CONTACTS | Whether to delete contacts (true or false) |
CLEAN_STORE_CHATS | Whether to delete chats (true or false) |
Persistent Storage
Connection configurations:
Variable | Description | Example |
---|---|---|
DATABASE_ENABLED | Whether persistent storage is enabled | true |
DATABASE_CONNECTION_URI | MongoDB connection URI | mongodb://username:password@host:port/database |
DATABASE_CONNECTION_DB_PREFIX_NAME | Prefix name for database connection logs | error |
Which data to save (true or false):
Variable | Description |
---|---|
DATABASE_SAVE_DATA_INSTANCE | Save instance data |
DATABASE_SAVE_DATA_NEW_MESSAGE | Save new messages |
DATABASE_SAVE_MESSAGE_UPDATE | Save message updates |
DATABASE_SAVE_DATA_CONTACTS | Save contacts |
DATABASE_SAVE_DATA_CHATS | Save chats |
Redis
Variable | Description | Example |
---|---|---|
CACHE_REDIS_ENABLED | Whether Redis is enabled (true or false) | true |
CACHE_REDIS_URI | Redis connection URI | redis://redis:6379 |
CACHE_REDIS_PREFIX_KEY | Key name prefix | evolution |
CACHE_REDIS_TTL | Time to keep cached data in Redis | 604800 |
CACHE_REDIS_SAVE_INSTANCES | Save WhatsApp connection credentials on Redis | false |
CACHE_LOCAL_ENABLED | Cache data in memory (an alternative for Redis) | false |
CACHE_LOCAL_TTL | Time to keep cached data in memory | 604800 |
RabbitMQ
Variable | Description | Example |
---|---|---|
RABBITMQ_ENABLED | Enables RabbitMQ (true or false) | true |
RABBITMQ_GLOBAL_ENABLED | Enables RabbitMQ globally (true or false) | false |
RABBITMQ_URI | RabbitMQ connection URI | amqp://guest:guest@rabbitmq:5672 |
RABBITMQ_EXCHANGE_NAME | Exchange name | evolution_exchange |
RABBITMQ_EVENTS_APPLICATION_STARTUP | Sends an event on app startup | false |
RABBITMQ_EVENTS_QRCODE_UPDATED | Sends QR Code Update events | true |
RABBITMQ_EVENTS_MESSAGES_SET | Sends Message Creation events (message retrieval) | true |
RABBITMQ_EVENTS_MESSAGES_UPSERT | Sends Message Receipt events | true |
RABBITMQ_EVENTS_MESSAGES_UPDATE | Sends Message Update events | true |
RABBITMQ_EVENTS_MESSAGES_DELETE | Sends Message Deletion events | true |
RABBITMQ_EVENTS_SEND_MESSAGE | Sends Message Sending events | true |
RABBITMQ_EVENTS_CONTACTS_SET | Sends Contact Creation events | true |
RABBITMQ_EVENTS_CONTACTS_UPSERT | Sends Contact Creation events (contact retrieval) | true |
RABBITMQ_EVENTS_CONTACTS_UPDATE | Sends Contact Update events | true |
RABBITMQ_EVENTS_PRESENCE_UPDATE | Sends Presence Update events (“typing…” or “recording…“) | true |
RABBITMQ_EVENTS_CHATS_SET | Sends Chat Creation events (chat retrieval) | true |
RABBITMQ_EVENTS_CHATS_UPSERT | Sends Chat Creation events (message receipt or sending in new chats) | true |
RABBITMQ_EVENTS_CHATS_UPDATE | Sends Chat Update events | true |
RABBITMQ_EVENTS_CHATS_DELETE | Sends Chat Deletion events | true |
RABBITMQ_EVENTS_GROUPS_UPSERT | Sends Group Creation events | true |
RABBITMQ_EVENTS_GROUPS_UPDATE | Sends Group Update events | true |
RABBITMQ_EVENTS_GROUP_PARTICIPANTS_UPDATE | Sends Group Participant Update events | true |
RABBITMQ_EVENTS_CONNECTION_UPDATE | Sends Connection Update events | true |
RABBITMQ_EVENTS_LABELS_EDIT | Sends Label Edit events | true |
RABBITMQ_EVENTS_LABELS_ASSOCIATION | Sends Label Association events | true |
RABBITMQ_EVENTS_CALL | Sends Call events | true |
RABBITMQ_EVENTS_TYPEBOT_START | Sends Typebot flow start events | false |
RABBITMQ_EVENTS_TYPEBOT_CHANGE_STATUS | Sends Typebot status update events | false |
SQS
Variable | Description |
---|---|
SQS_ENABLED | Whether SQS is enabled (true or false) |
SQS_ACCESS_KEY_ID | SQS access key ID |
SQS_SECRET_ACCESS_KEY | SQS access key |
SQS_ACCOUNT_ID | Account ID |
SQS_REGION | SQS region |
Instances
Variable | Description | Example |
---|---|---|
DEL_INSTANCE | In how many minutes an instance will be deleted if not connected. Use “false” to never delete. | 5 |
DEL_TEMP_INSTANCES | Delete closed instances on startup | true |
CORS
Variable | Description | Example |
---|---|---|
CORS_ORIGIN | Allowed origins for the API, separated by commas (use ”*” to accept requests from any origin). | https://my-frontend.com,https://my-other-frontend.com |
CORS_METHODS | Allowed HTTP methods, separated by commas. | POST,GET,PUT,DELETE |
CORS_CREDENTIALS | Allow cookies in requests (true or false). | true |
Webhook
Variable | Description |
---|---|
WEBHOOK_GLOBAL_URL | URL to receive webhook requests |
WEBHOOK_GLOBAL_ENABLED | Whether webhooks are enabled (true or false) |
WEBHOOK_GLOBAL_WEBHOOK_BY_EVENTS | Enable 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
Variable | Description |
---|---|
QRCODE_LIMIT | Duration for which the QR code will last |
QRCODE_COLOR | Color of the generated QR code |
Typebot
Variable | Description |
---|---|
TYPEBOT_API_VERSION | API version (fixed version or latest) |
TYPEBOT_KEEP_OPEN | Keep Typebot open (true or false) |
Authentication
Variable | Description |
---|---|
AUTHENTICATION_TYPE | Authentication type (jwt or apikey ) |
AUTHENTICATION_API_KEY | API key to be used for authentication |
AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES | |
AUTHENTICATION_JWT_EXPIRIN_IN | JWT token expiration time |
AUTHENTICATION_JWT_SECRET | Secret used to generate the JWT |