Auth model
Installed plugin + Matrix homeserver credentials + room access policy
Federated messaging needs a federated mindset: rooms, homeservers, and identity scope all matter.
Matrix support for OpenClaw covers plugin installation, homeserver login, DM and room policy, E2EE device verification, and federated routing boundaries.
Auth model
Installed plugin + Matrix homeserver credentials + room access policy
Safety stance
Document which homeserver, rooms, and federation assumptions define trust for this rollout.
Verification ritual
Verify login, room joins, DM behavior, and one federated room path if that is part of the intended rollout.
Rollout mode
25–45 min setup
Federated room operations
The Matrix plugin supports DMs, rooms, threads, media, reactions, polls, location, and optional E2EE, with replies always routed back to Matrix and allowlists keyed to full Matrix IDs.
Watch identity and crypto
Room membership, federation assumptions, and homeserver policy can break behavior without changing your OpenClaw config.
Matrix is the right lane when the operator is entering an existing federated messaging estate, not inventing a new front door. OpenClaw logs in as a real Matrix user on a homeserver, so account credentials, room membership, and device trust are part of the deployment story.
The official Matrix plugin is one of the more capable OpenClaw lanes: it supports DMs, rooms, threads, media, reactions, polls, location, and E2EE. That breadth makes it attractive, but it also means the operator has to be explicit about which parts belong to Matrix itself and which parts belong to OpenClaw policy.
Use Matrix when you already operate in Element, Beeper, or another Matrix client footprint and you want the assistant to behave like a room participant instead of a webhook-only bot surface.
The clean way to run Matrix is to think in three separate gates:
That separation matters in practice. A room can be reachable in Matrix but still blocked by groupPolicy, or a DM can arrive but still wait in pairing. Likewise, an encrypted room can be visible but unusable until the device is verified. For guidance on how those knobs interact and which section of the config wins, keep /guides/openclaw-configuration in your notes.
Start with a configuration that proves login, DM policy, and one room allowlist before you enable anything more ambitious:
{
channels: {
matrix: {
enabled: true,
homeserver: 'https://matrix.example.org',
accessToken: 'syt_***',
dm: { policy: 'pairing' },
groupPolicy: 'allowlist',
groups: {
'#ops:example.org': { allow: true },
},
autoJoin: 'allowlist',
autoJoinAllowlist: ['#ops:example.org'],
},
},
}
That baseline matches the official docs in spirit:
encryption off until plain-text behavior is verified.If you need the pairing mental model or troubleshooting words, keep /guides/openclaw-pairing-explained and /troubleshooting/solutions/control-ui-pairing-required handy so you stay aligned on gate approvals.
If you need Beeper as a client, note the official caveat: Beeper requires E2EE, so encryption becomes part of first-run setup rather than an optional later improvement.
The Matrix plugin supports two credential paths:
homeserver, oruserId + password, where OpenClaw performs the login and stores the resulting token under ~/.openclaw/credentials/matrix/credentials.json.For operators, the practical rule is simple: use an access token when you already manage the bot account lifecycle outside OpenClaw; use userId + password only when you want OpenClaw to own the login exchange.
If userId is set in config, it should be the full Matrix ID such as @bot:example.org, not a display name or localpart.
Matrix is forgiving in the client UI and strict in policy matching. The docs are explicit about this, and it is worth following exactly.
For DMs:
channels.matrix.dm.policy = "pairing",openclaw pairing list matrix and openclaw pairing approve matrix <CODE>.For rooms:
channels.matrix.groupPolicy = "allowlist",channels.matrix.groups,groupAllowFrom or per-room users.Use full Matrix user IDs for allowlists. The official docs explicitly warn against display names and bare localparts because they are ambiguous and ignored for matching. The same operator instinct applies to rooms: prefer room IDs or aliases, and treat name-based resolution as a convenience only when the match is exact and unique.
Matrix E2EE is supported, but it is not a cosmetic checkbox. It changes the operator runbook.
Enable it with:
{
channels: {
matrix: {
encryption: true,
},
},
}
Once enabled, the official docs say to expect the following:
This is why Matrix should be rolled out in two passes: first prove plain-text DM and room behavior, then enable E2EE and verify the device from Element or another trusted client. If you skip that sequencing, you end up debugging trust-state issues as if they were routing issues.
Matrix defaults to auto-joining invites, which is convenient in a lab and sloppy in production. The safer pattern is:
groupPolicy: "allowlist",autoJoin to allowlist,autoJoinAllowlist for the exact room IDs or aliases you expect.That makes the boundary clear:
bindings decide which agent owns the resulting traffic.When this boundary-setting crosses into deployment strategy, pair the discussion with /blog/openclaw-deployment-form-factors-comparison so the reader can move from lane choice to whole-system posture. Per the local /guides/openclaw-multi-agent-routing guide, keep the ingress identity obvious and intentional and add explicit bindings whenever you change accounts.
That last point matters most in federated teams, so keep the ingress identity obvious and intentional. If you later add channels.matrix.accounts, route them deliberately with bindings[].match.accountId instead of relying on an implicit default.
Run the official troubleshooting ladder first:
openclaw status
openclaw gateway status
openclaw logs --follow
openclaw doctor
openclaw channels status --probe
Then verify Matrix in this order:
threadReplies behaves the way you intend.This sequence is deliberately narrow. It isolates login, policy, room membership, and encryption into separate checks so you know which gate failed. If any of the probes fail, the /guides/openclaw-deployment-troubleshooting resource lists the usual deployment traps for each stage, so you can match the symptom to a recommended fix.
A few Matrix capabilities are strong enough to influence architecture decisions:
The plugin supports channels.matrix.accounts, with each account inheriting top-level settings and overriding them per account. That is useful when you want a separate Matrix user for a specialized role, but it should be paired with explicit bindings so one account equals one intended agent route.
The docs expose both:
threadReplies: off | inbound | alwaysreplyToMode: off | first | allThat means Matrix can be tuned for teams that want strict threaded behavior versus lighter reply metadata. Do not leave that decision to accident if rooms are used for ongoing operational work.
Matrix can send polls and represent inbound poll starts as text. It can also handle location via geo URI. The important nuance is that not every higher-level interaction is symmetrical: inbound poll responses and ends are not treated the same way as sending a poll.
These are the early failures the official docs already point toward:
pairing.groupPolicy or missing from the allowlist.None of these are exotic. They are the normal cost of running a federated, user-authenticated lane.
For most operators, the calm starting posture is:
dm.policy: "pairing"groupPolicy: "allowlist"autoJoin: "allowlist"If you need multiple Matrix identities, use separate accounts for separate operational purposes and keep the routing contract visible in bindings, as the local guide recommends.
Matrix is strongest when the organization already thinks in rooms, federation, and user-owned clients. It is less about mass reach and more about operating inside a messaging environment that already has its own trust model.
Continue the Matrix path by referencing /guides/self-hosted-ai-api-compatibility-matrix for backend compatibility and /guides/openclaw-operability-and-observability for the evidence mindset that keeps long-lived rooms trustworthy.
The useful boundary to remember is this:
When those three layers are kept separate, Matrix becomes a dependable internal lane instead of a mysterious encrypted sidecar.
After the first rollout, keep these references close:
/tools/plugin/gateway/configuration/guides/openclaw-multi-agent-routingThere is no Matrix-specific CoClaw troubleshooting note in src/content/troubleshooting/solutions yet, so the safest operator move is to keep the upstream troubleshooting ladder in your runbook until one exists.
Verification & references
References