Hosted Matrix + Local Backend
This guide covers the simplest production-like setup:
- Matrix homeserver is hosted at
https://mindroom.chat - Web chat runs at
https://chat.mindroom.chat - You run only
mindroom runlocally viauvx
What Runs Where
| Component | Runs on | Purpose |
|---|---|---|
chat.mindroom.chat |
Hosted web app | Login UI and pairing UI |
mindroom.chat |
Hosted Matrix + provisioning API | Matrix transport + local onboarding API |
uvx mindroom run |
Your machine/server | Agent orchestration, tools, model calls |
Prerequisites
- Python 3.12+
uvinstalled- A Matrix account that can sign in to
chat.mindroom.chat - At least one AI provider API key
1. Initialize Local Config
This creates ~/.mindroom/config.yaml and ~/.mindroom/.env with hosted defaults.
2. Add AI Provider Key
Edit ~/.mindroom/.env and set at least one provider key:
3. Pair This Install
- Open
https://chat.mindroom.chat. - Go to
Settings -> Local MindRoom. - Click
Generate Pair Code. - Run locally:
Pair code behavior:
- Valid for 600 seconds (10 minutes).
- Only used to bootstrap local pairing.
After successful pairing, local provisioning credentials are written to ~/.mindroom/.env by default unless you use --no-persist-env.
4. Start MindRoom
MindRoom then:
- Connects to
MATRIX_HOMESERVER - Creates/updates configured agent Matrix users
- Joins/creates configured rooms
- Starts processing messages
Credential Model (Important)
mindroom connect returns local provisioning credentials:
MINDROOM_LOCAL_CLIENT_IDMINDROOM_LOCAL_CLIENT_SECRETMINDROOM_NAMESPACE
MINDROOM_LOCAL_CLIENT_ID and MINDROOM_LOCAL_CLIENT_SECRET are not Matrix user access tokens.
MINDROOM_NAMESPACE is appended to managed agent usernames and room aliases to avoid collisions on shared homeservers.
They can only call provisioning-service endpoints that accept local client credentials (for example agent registration flows).
Revoke them from Settings -> Local MindRoom in the chat UI.
Trust Model (Hosted Server vs Message Privacy)
For message content, this setup can be effectively zero-trust toward the homeserver operator when rooms are end-to-end encrypted.
- In E2EE rooms, the homeserver stores ciphertext and cannot read message bodies.
- The local
mindroom runprocess holds your agent account keys and performs decryption locally.
Important limits:
- This does not hide metadata (room membership, timestamps, event IDs, sender IDs, traffic patterns).
- If a room is not encrypted, the homeserver can read plaintext.
- Any model/tool providers you send content to can still see the prompts/data you send to them.
So the precise claim is: encrypted Matrix message content is protected from the hosted homeserver, not that every part of the system is universally invisible.
If You Self-Host Later
You can keep the same local flow and switch endpoints:
MATRIX_HOMESERVER=https://your-matrix.example.comMINDROOM_PROVISIONING_URL=https://your-matrix.example.com(or your dedicated provisioning host)
Then run mindroom connect again with a fresh pair code from your own UI.