Self-Hosted WhatsApp AI Agent Stack
One docker-compose file that runs n8n, Evolution API, Postgres and Redis locally. No Ngrok, no paid tunnels.
version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: evolution_postgres
restart: always
environment:
POSTGRES_USER: evolution
POSTGRES_PASSWORD: evolutionpassword
POSTGRES_DB: evolution
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:7-alpine
container_name: evolution_redis
restart: always
ports:
- "6379:6379"
evolution-api:
image: atendai/evolution-api:latest
container_name: evolution_api
restart: always
ports:
- "8080:8080"
environment:
- SERVER_URL=http://localhost:8080
- AUTHENTICATION_API_KEY=supersecretapikey
- DATABASE_ENABLED=true
- DATABASE_PROVIDER=postgresql
- DATABASE_CONNECTION_URI=postgresql://evolution:evolutionpassword@postgres:5432/evolution?schema=public
- CACHE_REDIS_ENABLED=true
- CACHE_REDIS_URI=redis://redis:6379
- CONFIG_SESSION_PHONE_VERSION=2.3000.1032750324
depends_on:
- postgres
- redis
volumes:
- evolution_instances:/evolution/instances
- evolution_store:/evolution/store
n8n:
image: docker.n8n.io/n8nio/n8n:latest
container_name: n8n
restart: always
ports:
- "5678:5678"
environment:
- N8N_SECURE_COOKIE=false
volumes:
- n8n_data:/home/node/.local/share/n8n
volumes:
postgres_data:
evolution_instances:
evolution_store:
n8n_data:Everything runs on Docker's internal network, so n8n reaches Evolution API at http://evolution_api:8080 and Evolution API sends webhooks to http://n8n:5678. Fast, private and free.
How to run it
- Install Docker Desktop.
- Save the file above as
docker-compose.ymlin an empty folder. - Run
docker compose up -d. - Open Evolution Manager at
http://localhost:8080/manager, create an instance and scan the QR code with WhatsApp. - Open n8n at
http://localhost:5678and point the instance webhook to your n8n workflow.
Change
POSTGRES_PASSWORDandAUTHENTICATION_API_KEYbefore exposing this anywhere outside your machine.
In the video
The workflow listens for messages that start with !bot, cleans the text and uses an AI Agent with memory to translate and reply in the same chat.
More drops like this

ATS Resume Enhancer Prompt
Paste your messy resume into Claude and get back a clean, ATS-safe Word document with impact-driven bullet points.

AI Cold Email Optimizer (Claude Artifact)
One prompt that builds a working micro-app inside Claude, with a UI that rewrites bad sales emails using the Claude API.

Briefing → Jira Ticket Claude Skill
A custom Claude Skill that turns chaotic client messages and voice transcripts into clean Linear or Jira engineering tickets.