Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

Viewing file on branch master

1# Matrix
2
3- Status: ???
4- Maintainers: @poVoq
5- Features: ???
6
7> [!WARNING]
8> **Create a dedicated user first. It will not relay messages from yourself if you use your account**
9
10## Configuration
11
12> [!TIP]
13> For detailed information about matrix settings, see [settings.md](settings.md)
14
15**Basic configuration example:**
16
17```toml
18[matrix.mymatrix]
19RemoteNickFormat="[{PROTOCOL}] <{NICK}> "
20Server="https://matrix.org"
21Login="yourlogin"
22Password="yourpass"
23# Alternatively, you can use MXID + a session Token + a device id
24#MxID="@yourbot:example.net"
25#Token="tokenforthebotuser"
26#DeviceID="deviceidofmxidandtokenlogin"
27```
28
29## FAQ
30
31### How to encrypt matterbridge messages to Matrix?
32
33[matrix.test]
34RemoteNickFormat="{NICK} ({LABEL}) "
35Server="<https://domain.tld>"
36Login="yourlogin"
37Password="yourpass"
38SessionFile="matrix_crypto.db" # sqlite database file used to store the login session persistently
39PickleKey="yourreallylongandcomplicatedpickle" # a long password to use when accessing the session store
40RecoveryKey="this thing isss real long bubb" # your account recovery key from matrix for this account
41MxID="@yourusername:domain.tld" # your mxid from the logs
42Token="your token from log output" # your token from the logs
43DeviceID="yourdeviceid" # your deviceid from the logs
44
45#### Steps for getting an encrypted connection working
46
47MxID, Token and DeviceID are required for encryption even though they are optional normally
48
491. Generate a recovery key using your preferred Matrix client for your account and make sure to store it for later
502. Fill in the following
51
52 - RemoteNickFormat (Optional)
53 - Server
54 - Login
55 - Password
56 - SessionFile (make sure this is readable and writable by the bot's run account)
57 - PickleKey
58 - RecoveryKey
59
603. Start your bot and log in making sure to keep a log or watch output
614. Copy these from the logs in to your configuration file
62
63 - MxID
64 - Token
65 - DeviceID
66
675. Restart the bot and enjoy encrypted messaging
68
69##### Notes
70
71- If you enable encryption on a channel after enabling encryption on the bot, you may need to regenerate your RecoveryKey, Token and DeviceID before the bot can send encrypted messages
72- If Matterbridge was present before encryption was enabled on a channel, it will not initialize crypto correctly and will continue sending unencrypted messages.
73 1. Kick the bot from the room or leave the room with the bot's account (e.g in Element or some other client).
74 2. Re-invite the bot to the room.
75 3. The bot will get the encryption flag and start sending encrypted messages.
76