- Create a new room for relaybot management and get its internal ID (Room settings → Advanced → Internal room ID in Element Web).
- Enable the relaybot and set the management room ID in the relaybot config.
- Optionally, add your Matrix account to the
inviteslist in the config to get invited to the automatically created portal rooms for the relaybot.
- Make sure the users you want to let into rooms have at least the
relaybotpermission in the permissions section.
- You may also want to set
trueso that you can invite more users to portals created by the bridge. The option is not applied retroactively, but you can use
!wa set-plto make yourself admin in existing rooms.
- Restart the bridge and invite the bridge bot to the management room you created.
Note that only one user can be logged in with one WhatsApp account at a time,
i.e. you can't use the same account for yourself and the relaybot. If you're
currently logged in normally, use
!wa logout in your normal (not relaybot)
management room before logging in with the relaybot.
- Commands in the relaybot management room will always affect the relaybot
instead of your own account, so simply use the normal
!wa logincommand to make the relaybot log into WhatsApp.
- Like with normal login, the relaybot will sync all WhatsApp chats. For newly
created portals, everyone in the
inviteslist (mentioned earlier) will be invited.
You can either invite more Matrix users to the automatically created portals or see below for instructions on bridging existing Matrix rooms.
There are currently a few bugs that affect this:
- You can only invite the bridge bot to an empty room (#208).
You can only create groups in encrypted rooms due to a bug in the bridge (#209).
- Invite the bridge bot to the Matrix room.
- Invite the ghosts of any WhatsApp users you want in the group right away.
- Make sure the room has a name.
!wa relaybot createto create it through the relaybot)
Bridging to existing groups is not currently implemented. However, you can fairly easily modify the database to point the bridge at a different room.
TODO: the bridge bot probably needs inviting at some point
- Find the JID of the WhatsApp group you want to bridge using
!wa relaybot list groups(or just
!wa list groupsin the relaybot management room). If you can not find it just search for it in the database (e.g.
SELECT * FROM portal WHERE name='WhatsApp_Group_Name';the first column is the jid).
- Find the internal ID of the target matrix room (Room settings → Advanced →
Internal room ID in Element Web) for example
- Stop the bridge. (make sure it is actually stopped, possible commands for
this using Docker or Ansible:
docker ps -aor with
systemctl status matrix-mautrix-whatsapp.service, possible commands to stop
docker stop containerID,
systemctl stop matrix-mautrix-whatsapp.service)
UPDATE portal SET mxid='<target room id>' WHERE email@example.com';in the database. (Possible command to enter the db
- Start the bridge. The bridge should automatically sync the group members from
WhatsApp and messages should be bridged in both directions. If not, add the
WhatsApp bridge bot to the room. (