Created
September 30, 2025 02:11
-
-
Save mdestafadilah/9421048657930a50f58cb94239c5ed90 to your computer and use it in GitHub Desktop.
Install EvolutionAPI on VPS (English Version ~ Translated)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| How to Install aaPanel + Evolution API 2.2.3 on a VPS (Step by Step) | |
| π Evolution V2 Installation | |
| 1οΈβ£ System Update and Dependency Installation | |
| Open a terminal and run the following command: | |
| sudo apt-get update ; apt-get install -y apparmor-utils | |
| 2οΈβ£ Server Name Setting | |
| You can replace manager1 with a name of your choice: | |
| hostnamectl set-hostname manager1 | |
| 3οΈβ£ /etc/hosts File Configuration | |
| Edit the hosts file with the command: | |
| nano /etc/hosts | |
| Change the localhost line to the name you defined in the previous step (example: manager1): | |
| 127.0.0.1 manager1 | |
| After editing, save and exit (Ctrl+X, press Y and Enter). | |
| 4οΈβ£ Docker Installation | |
| Run this command to install Docker: | |
| curl -fsSL https://get.docker.com | bash | |
| 5οΈβ£ Swarm Initialization | |
| After installation, start Docker Swarm with: | |
| docker swarm init | |
| 6οΈβ£ Network Creation | |
| Now, create the network for the containers: | |
| docker network create --driver=overlay network_public | |
| 7οΈβ£ Traefik.yaml File Configuration | |
| Open a text editor: | |
| nano traefik.yaml | |
| After editing the file, save and exit (Ctrl+X, press Y and Enter). | |
| 8οΈβ£ Stack Deployment | |
| Finally, run the command below to deploy Traefik: | |
| docker stack deploy --prune --resolve-image always -c traefik.yaml traefik | |
| 9οΈβ£ Portainer Installation | |
| Run the following command to install Portainer: | |
| docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest | |
| π‘ Tip: Verify that the commands were executed correctly before proceeding to the next steps. | |
| WARNING: If you change the Postgres password in the postgres.yaml file, you must update this password in the evolution.yaml file on lines 40 and 75. Failure to do so will result in errors. |
Author
WORKING VERSION
services:
# --- Layanan Evolution API ---
evolution_api:
image: atendai/evolution-api:latest # Atau versi tertentu, misalnya :v2.x.x
container_name: evolution_api_service
restart: always
ports:
- "${EVO_PORT_EXT}:8080" # Mapping port eksternal:internal
volumes:
- evolution_instances:/evolution/instances # Data sesi WhatsApp
networks:
- evo-network
environment:
# Variabel Umum
- AUTHENTICATION_API_KEY=${EVO_API_KEY}
- DEL_INSTANCE=${EVO_DEL_INSTANCE}
- SECRET_KEY=${EVO_SECRET_KEY}
- SERVER_URL=${EVO_SERVER_URL}
# Konfigurasi Database (PostgreSQL)
- DATABASE_ENABLED=true
- DATABASE_PROVIDER=postgresql
- DATABASE_CONNECTION_URI=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:${POSTGRES_PORT_INT}/${POSTGRES_DB}
# Konfigurasi Cache (Redis)
- REDIS_ENABLED=true
- REDIS_URI=redis://redis:${REDIS_PORT_INT}
# --- Layanan PostgreSQL ---
postgres:
image: postgres:15-alpine
container_name: postgres_db
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- ./postgres/data:/var/lib/postgresql/data# Volume data persisten
ports:
- "${POSTGRES_PORT_EXT}:${POSTGRES_PORT_INT}" # Opsional: Untuk akses DB dari luar Docker
networks:
- evo-network
# --- Layanan Redis ---
redis:
image: redis:7-alpine
container_name: redis_cache
restart: always
command: redis-server --appendonly yes
volumes:
- redis_data:/data # Volume data persisten
ports:
- "${REDIS_PORT_EXT}:${REDIS_PORT_INT}" # Opsional: Untuk akses Redis dari luar Docker
networks:
- evo-network
# --- Volume Persisten ---
volumes:
evolution_instances: # Untuk data sesi Evolution API
postgres_data: # Untuk data PostgreSQL
redis_data: # Untuk data Redis
# --- Jaringan ---
networks:
evo-network:
driver: bridge
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.