Skip to content

Commit 8b49d87

Browse files
authored
docs(alerts): add Matrix alerts page (#121)
Documents the Matrix alert provider added in GameServerManagers/LinuxGSM#4901. Covers getting an access token, using the internal room ID (not a room alias or space ID), the requirement for an unencrypted room (no E2EE support), and a note on homeserver .well-known delegation.
1 parent 130769e commit 8b49d87

2 files changed

Lines changed: 57 additions & 0 deletions

File tree

‎SUMMARY.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
* [Discord](alerts/discord.md)
6363
* [Email](alerts/email.md)
6464
* [IFTTT](alerts/ifttt.md)
65+
* [Matrix](alerts/matrix.md)
6566
* [Pushbullet](alerts/pushbullet.md)
6667
* [Pushover](alerts/pushover.md)
6768
* [Rocket.Chat](alerts/rocket.chat.md)

‎alerts/matrix.md‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Matrix
2+
3+
[Matrix](https://matrix.org) is an open standard for decentralised, real-time communication. LinuxGSM uses the [Matrix Client-Server API](https://spec.matrix.org/latest/client-server-api/) to send alerts to a room on any Matrix homeserver (matrix.org or self-hosted).
4+
5+
## Create a room for alerts
6+
7+
Create a room for LinuxGSM to post alerts into using any Matrix client (e.g. [Element](https://element.io)).
8+
9+
{% hint style="warning" %}
10+
Create the room with **encryption disabled**. LinuxGSM sends alerts as plain messages over the Client-Server API and does not support end-to-end encryption. In an encrypted room, alerts will still arrive but show as unverified/unencrypted with a warning. Encryption cannot be turned off once a room has been created, so choose this when creating the room (in Element: _Add room > uncheck "Enable end-to-end encryption"_).
11+
{% endhint %}
12+
13+
## Get your access token
14+
15+
An access token authenticates LinuxGSM as your Matrix account.
16+
17+
In Element: _Settings > Help & About > Advanced > Access Token_ and click to reveal, then copy it.
18+
19+
{% hint style="info" %}
20+
An access token grants full access to your Matrix account. Consider creating a dedicated account for alerts rather than using your personal one, and treat the token like a password.
21+
{% endhint %}
22+
23+
## Get the room ID
24+
25+
LinuxGSM needs the room's **internal room ID**, which starts with `!` (e.g. `!wsxanjDijPztgZgrYL:matrix.org`).
26+
27+
{% hint style="warning" %}
28+
Use the internal **room** ID (`!...:server`), not a room **alias** (`#room:server`) and not a **space** ID. A space is a container for rooms, not a room you can post to — its ID will look like a room ID but sending to it will fail. In Element, find the internal room ID under _Room Settings > Advanced > Internal room ID_.
29+
{% endhint %}
30+
31+
## Enable Matrix alerts
32+
33+
Turn on Matrix alerts and enter your details in the [LinuxGSM config](../configuration/linuxgsm-config.md) (`~/lgsm/config-lgsm/<gameserver>/common.cfg`).
34+
35+
```bash
36+
# Matrix Alerts | https://docs.linuxgsm.com/alerts/matrix
37+
matrixalert="on"
38+
matrixhomeserver="matrix.org"
39+
matrixtoken="mat_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
40+
matrixroom="!wsxanjDijPztgZgrYL:matrix.org"
41+
```
42+
43+
| Setting | Description |
44+
|---|---|
45+
| `matrixalert` | Set to `on` to enable Matrix alerts. |
46+
| `matrixhomeserver` | Your homeserver. A bare hostname is assumed to be `https://`; `http://`/`https://` prefixes are respected. |
47+
| `matrixtoken` | Your account access token. |
48+
| `matrixroom` | The internal room ID (`!...:server`) to send alerts to. |
49+
50+
{% hint style="info" %}
51+
If your homeserver uses `.well-known` delegation (matrix.org delegates to `matrix-client.matrix.org`), the bare domain works in most cases. If alerts fail to send, try setting `matrixhomeserver` to the delegated client API host directly.
52+
{% endhint %}
53+
54+
## Testing the configuration
55+
56+
Execute a test alert with `./gameserver test-alert` to verify the setup. If the alert appears in your Matrix room, the configuration is correct.

0 commit comments

Comments
 (0)