Overview
MinIO provides:- S3-compatible API (works with Evolution API’s S3 integration)
- Self-hosted deployment (full data sovereignty)
- High performance and scalability
- Simple installation and configuration
- SSL/TLS support for secure connections
Installation
Docker Deployment
The easiest way to deploy MinIO is using Docker:Access MinIO Console
Open your browser and navigate to
http://localhost:9001 to access the MinIO web console.Login with:- Username:
minioadmin - Password:
minioadmin123
Create a bucket
In the MinIO console, create a new bucket named
evolution for storing Evolution API media files.Docker Compose Deployment
For production deployments, use Docker Compose:docker-compose.yaml
Evolution API Configuration
Basic Configuration
Configure Evolution API to use MinIO by setting these environment variables:.env
SSL/TLS Configuration
For production deployments, enable SSL/TLS on MinIO:Environment Variables
Required Variables
Enable S3 storage integration.
MinIO access key ID created in the MinIO console.
MinIO secret key corresponding to the access key.
The name of the MinIO bucket for storing media files.
MinIO server endpoint URL (without http:// or https://).Examples:
- Local:
localhost:9000 - Domain:
minio.yourdomain.com - IP:
192.168.1.100:9000
Optional Variables
Enable SSL/TLS for secure connections to MinIO.Default:
trueThe port MinIO is running on.Default:
443 (with SSL) or 9000 (without SSL)MinIO region identifier. MinIO uses
us-east-1 by default.Default: us-east-1Configuration Examples
Complete Docker Compose Setup
Here’s a completedocker-compose.yaml with Evolution API and MinIO:
docker-compose.yaml
.env file:
.env
Bucket Configuration
Access Policy
Set appropriate access policies for your MinIO bucket:Versioning
Enable versioning to protect against accidental deletions:Lifecycle Rules
Set up lifecycle rules to manage storage:Monitoring and Management
MinIO Console
Access the MinIO console athttp://your-server:9001 to:
- Monitor bucket usage and statistics
- Manage access keys and users
- Configure bucket policies and lifecycle rules
- Browse and download files
- View server health and performance metrics
Using MinIO Client (mc)
Install and configure the MinIO client for command-line management:Troubleshooting
Connection refused errors
Connection refused errors
If Evolution API cannot connect to MinIO:
- Verify MinIO is running:
docker ps | grep minio - Check that the endpoint is accessible:
curl http://localhost:9000/minio/health/live - If using Docker networks, ensure both containers are on the same network
- Verify firewall rules allow traffic on port 9000
Access denied errors
Access denied errors
If you receive access denied errors:
- Verify the access key and secret key are correct
- Check bucket permissions in the MinIO console
- Ensure the bucket exists:
mc ls myminio/evolution - Verify the MinIO user has read/write permissions on the bucket
SSL certificate errors
SSL certificate errors
For SSL/TLS issues:
- Verify certificates are correctly mounted in the Docker container
- Check certificate file permissions:
chmod 644 public.crtandchmod 600 private.key - Ensure certificate paths are correct:
/root/.minio/certs/ - For self-signed certificates, you may need to add them to your system’s trust store
Performance issues
Performance issues
To improve MinIO performance:
- Use SSD storage for the data volume
- Increase Docker memory allocation if running locally
- Enable erasure coding for large deployments
- Use MinIO’s distributed mode for high availability
- Monitor disk I/O and network bandwidth
High Availability Setup
For production deployments, consider MinIO’s distributed mode:Distributed MinIO requires at least 4 drives across multiple servers for high availability.
Security Best Practices
- Change default credentials - Never use
minioadmin/minioadmin123in production - Enable SSL/TLS - Always use HTTPS for production deployments
- Use strong passwords - Generate secure passwords for root and access keys
- Restrict network access - Use firewall rules to limit access to MinIO ports
- Regular backups - Implement backup strategies for MinIO data
- Monitor access logs - Enable and review MinIO audit logs
- Update regularly - Keep MinIO updated to the latest stable version
Next Steps
Amazon S3
Learn about using Amazon S3 instead of self-hosted MinIO
Docker Deployment
Complete guide to deploying Evolution API with Docker