Status: account connection (the redirect login below), destinations, invitations, test messages, disconnecting and the encryption recovery-key import are implemented. Without the recovery key, Botrix can send to unencrypted rooms but not to end-to-end-encrypted ones.
Botrix connects to Matrix using the OAuth 2.0 Authorization Code (redirect) flow. Authentication is done through the web UI — you never need to put passwords or tokens in configuration files.
Botrix uses the OAuth 2.0 Authorization Code (redirect) flow:
For the redirect to return to the right place, Botrix must know its own public
URL. Set server.public_url (or BOTRIX_PUBLIC_URL) to where Botrix is
reachable, e.g. https://botrix.example.com; the redirect target is
{public_url}/api/v1/matrix/callback.
Your homeserver must support Matrix Authentication Service (MAS) — the redirect login is an OAuth flow, so password-only homeservers are not supported.
public_urlMAS validates the URL Botrix registers, and most deployments enforce:
http:// is rejected. Put Botrix behind a TLS-terminating
reverse proxy (Caddy, nginx, Traefik).localhost and 127.0.0.1 are
rejected even over HTTPS. Use a routable hostname (https://botrix.example.com),
a LAN IP (https://10.0.0.5), or a local name you map in /etc/hosts
(https://botrix.local). Botrix warns at startup if public_url is loopback.You must reach the Botrix UI at the same URL as public_url, so your admin
login cookie is valid when the homeserver redirects back to the callback.
Minimal local setup with Caddy and an /etc/hosts entry:
# /etc/hosts
127.0.0.1 botrix.local
# Caddyfile — Caddy issues a trusted local certificate automatically
botrix.local {
reverse_proxy localhost:8080
}
# config.yaml
server:
public_url: "https://botrix.local"
Then open https://botrix.local and connect. (With HTTPS in place you do not
need BOTRIX_INSECURE_COOKIES.)
After connecting, Botrix needs to bootstrap end-to-end encryption. If prompted:
The recovery key is used once and never stored. On subsequent restarts, Botrix restores E2EE state from its local crypto store.
Rooms are configured in config.yaml, not through the UI. After adding destinations to the config and restarting, they appear in the Matrix page.
For each destination, the UI shows:
joined, invited, not joined)Botrix does not automatically join rooms. If the bot receives an invitation, it appears in the web UI with an Accept invitation button. Click it to join.
To invite the bot to a room, use your regular Matrix client and invite @botrix:your-server.
To verify a destination is working:
The result (delivered or error) is shown immediately.
To disconnect the current Matrix account:
This removes the Matrix session and all cryptographic state. Webhook history and tokens are not affected. You can connect a new account immediately after.