Overview
Evolution API can be installed in multiple ways depending on your needs. This guide covers Docker installation (recommended), manual installation with npm, and production deployment configurations.Docker installation (recommended)
Docker provides the fastest and most reliable way to run Evolution API with all dependencies pre-configured.Prerequisites
Ensure you have installed:- Docker (version 20.10 or higher)
- Docker Compose (version 2.0 or higher)
- At least 2GB of available RAM
- 5GB of free disk space
Installation steps
Clone the repository
Configure environment variables
.env with your preferred text editor. Here are the essential variables:View all environment variables
View all environment variables
Configure PostgreSQL credentials
docker-compose.yaml expects PostgreSQL environment variables. Add these to your .env:Start the services
- evolution_api - Main API server (port 8080)
- evolution_frontend - Management interface (port 3000)
- evolution_postgres - PostgreSQL database (port 5432)
- evolution_redis - Redis cache (port 6379)
Verify the installation
Docker Compose services
The defaultdocker-compose.yaml includes:
node:24-alpine and includes ffmpeg for media processing.Manual installation (npm)
For development or custom deployments, you can install Evolution API manually using npm.Prerequisites
Install Node.js
Install system dependencies
Install PostgreSQL
Install Redis
Installation steps
Clone and install
Configure environment
Set database provider
Generate and deploy database
db:deploy script automatically selects the correct schema based on your DATABASE_PROVIDER environment variable.Build the project
dist/ directory.Start the server
http://localhost:8080Using the installation script
Evolution API includes an automated installation script for Linux and macOS:- Installs nvm and Node.js 20
- Installs project dependencies
- Generates and deploys the database
- Starts the server
MySQL configuration
To use MySQL instead of PostgreSQL:Install MySQL
Create database
Update environment
Deploy database
Production deployment
For production environments, consider these additional configurations:Using process managers
- PM2
- systemd
SSL/HTTPS configuration
To enable HTTPS, update your.env:
Reverse proxy with Nginx
Example Nginx configuration:Environment-specific settings
Production environment variables
Production environment variables
Database migrations
When updating Evolution API, you may need to run database migrations:Troubleshooting
Docker container fails to start
Docker container fails to start
- Port conflicts: Check if ports 8080, 3000, 5432, or 6379 are already in use
- Missing environment variables: Verify all required variables are set in
.env - Database connection: Ensure PostgreSQL credentials match in both
.envanddocker-compose.yaml
Database connection errors
Database connection errors
- PostgreSQL:
postgresql://user:pass@host:5432/database?schema=public - MySQL:
mysql://user:pass@host:3306/database
Redis connection errors
Redis connection errors
.env:Build failures
Build failures
npm run build fails:-
Clear node modules and reinstall:
-
Verify Node.js version:
-
Check TypeScript compilation:
Port already in use
Port already in use
.env:docker-compose.yaml: