Skip to content

Quickstart Guide

This guide will walk you through setting up Evolution API Lite using Docker and sending your first WhatsApp message. You’ll have a working instance in under 10 minutes.

Before you begin, ensure you have:

  • Docker and Docker Compose installed
  • A text editor for configuration files
  • Basic familiarity with REST APIs and cURL commands
  1. Clone or Download the Project

    Terminal window
    git clone https://github.com/EvolutionAPI/evolution-api.git
    cd evolution-api

    Or download the docker-compose.yaml and .env.example files directly.

  2. Create Environment Configuration

    Copy the example environment file and configure it:

    Terminal window
    cp .env.example .env

    Open the .env file and update these essential settings:

    Terminal window
    # Server Configuration
    SERVER_URL=http://localhost:8080
    # Database Configuration (using the default PostgreSQL setup)
    DATABASE_PROVIDER=postgresql
    DATABASE_CONNECTION_URI='postgresql://user:pass@postgres:5432/evolution?schema=public'
    # Authentication - Change this to a secure API key
    AUTHENTICATION_API_KEY=your-secure-api-key-here
    # Enable QR Code generation
    QRCODE_LIMIT=30

Launch all services using Docker Compose:

Terminal window
docker-compose up -d

This command starts:

  • Evolution API Lite on port 8080
  • PostgreSQL database on port 5432
  • Redis cache on port 6379

Verify the services are running:

Terminal window
docker-compose ps

You should see all three containers in the “Up” state.

Now create a WhatsApp instance using the API:

Terminal window
curl -X POST http://localhost:8080/instance/create \
-H "Content-Type: application/json" \
-H "apikey: your-secure-api-key-here" \
-d '{
"instanceName": "my-first-instance",
"integration": "WHATSAPP_BAILEYS",
"qrcode": true
}'

The response will include:

  • Instance details (name, ID, status)
  • A QR code (base64 encoded)
  • Authentication hash for this specific instance
  1. Get the QR Code
  • The API response includes a QR code in base64 format. You can:
    • Decode and display it using an online base64 → image converter
    • Use a QR code terminal tool to display it directly in your terminal
    • Or check the Docker logs for a terminal-rendered QR code:
Terminal window
docker-compose logs -f api
  1. Scan with WhatsApp
  • Open WhatsApp on your phone
  • Go to Settings → Linked Devices
  • Tap “Link a Device”
  • Scan the QR code displayed from the API response
  1. Verify Connection

Check your instance connection status:

Terminal window
curl -X GET http://localhost:8080/instance/my-first-instance/connectionState \
-H "apikey: your-secure-api-key-here"

You should see “state”: “open” when successfully connected.

Now send a text message to verify everything works:

Terminal window
curl -X POST http://localhost:8080/message/my-first-instance/sendText \
-H "Content-Type: application/json" \
-H "apikey: your-secure-api-key-here" \
-d '{
"number": "5511999999999",
"text": "Hello from Evolution API Lite! 🚀"
}'
  • Ensure qrcode: true is set in the instance creation request
  • Check Docker logs: docker-compose logs api
  • Verify the instance was created successfully
  • Wait 10-15 seconds after scanning before checking connection status
  • Ensure your phone has a stable internet connection
  • Try restarting the instance: POST /instance/{instanceName}/restart
  • Verify the API key matches exactly between .env and your requests
  • Ensure the apikey header is included in all requests
  • Check that there are no extra spaces or characters in the key
  • Verify PostgreSQL container is running: docker-compose ps
  • Check database logs: docker-compose logs postgres
  • Ensure the DATABASE_CONNECTION_URI in .env is correct

If you encounter issues: