Connect Matrix to OpenClaw
Install the Matrix channel plugin, connect a bot account, restrict rooms and senders, and verify encrypted-room requirements.
Use a dedicated Matrix bot account and the official channel plugin. Keep its session, device identity, and access token separate from your personal Matrix account.
Install and configure
Confirm the plugin package and current configuration fields in the official guide, then check the effective installation:
openclaw plugins list
openclaw channels status --probe
openclaw logs --follow
Record the homeserver URL and the exact bot user. A login that succeeds against one homeserver does not prove that the room alias, room ID, or encryption state is usable.
Limit rooms and senders
Approve one direct chat or test room first. Require a mention in shared rooms unless the room is dedicated to the agent. Review whether end-to-end encryption is supported and fully configured before expecting encrypted events to be readable.
Test the route
Invite the bot to the test room, send one plain message, and inspect live Gateway logs. Confirm the event arrives once and routes to the intended agent. Send a reply and verify it stays in the same room or thread context.
Expected result
- The Matrix account remains logged in after Gateway restart.
- Channel probe is healthy.
- Allowed room messages reach the intended agent.
- Replies return to the correct room.
- Disallowed rooms or senders do not trigger an agent turn.
If the account is connected but encrypted events remain unreadable, return to the official Matrix encryption and migration requirements instead of weakening room policy.
Source notes
Technical facts on this page were checked against primary sources.