open-wa / wa-automate-docker

💬 🤖 The easiest way to turn your WhatsApp into an API. Be sure to 🌟 this repository for updates!
110 stars 31 forks source link

How to enable multiple devices #70

Closed adeltut closed 2 months ago

adeltut commented 2 months ago

I can't get it to work with 2 devices in any way. How can I do this, I run it through: docker ru -p 8002:8002 --init openwa/wa-automate --multi-device After that, I go to the port and scan the qr code, and then it's unclear how to add 1 more account

smashah commented 2 months ago

hey @adeltut This is a misunderstanding (albeit i see why). One docker container = One account.

The way you get multiple accounts is by using a different session ID on both and creating a session volume to share between them (this way your sessions can persist between container instances).

So maybe you should try something like this.

> docker run -v ./sessions:/sessions -p 8002:8002 --init openwa/wa-automate --session-id account-one
> docker run -v ./sessions:/sessions -p 8003:8002 --init openwa/wa-automate --session-id account-two

There is an orchestration service which is highly memory efficient but that's for enterprise users.