···
1
-
<chapter xmlns="http://docbook.org/ns/docbook"
2
-
xmlns:xlink="http://www.w3.org/1999/xlink"
3
-
xmlns:xi="http://www.w3.org/2001/XInclude"
5
-
xml:id="module-services-mjolnir">
6
-
<title>Mjolnir (Matrix Moderation Tool)</title>
8
-
This chapter will show you how to set up your own, self-hosted
9
-
<link xlink:href="https://github.com/matrix-org/mjolnir">Mjolnir</link>
13
-
As an all-in-one moderation tool, it can protect your server from
14
-
malicious invites, spam messages, and whatever else you don't want.
15
-
In addition to server-level protection, Mjolnir is great for communities
16
-
wanting to protect their rooms without having to use their personal
17
-
accounts for moderation.
20
-
The bot by default includes support for bans, redactions, anti-spam,
21
-
server ACLs, room directory changes, room alias transfers, account
22
-
deactivation, room shutdown, and more.
25
-
See the <link xlink:href="https://github.com/matrix-org/mjolnir#readme">README</link>
26
-
page and the <link xlink:href="https://github.com/matrix-org/mjolnir/blob/main/docs/moderators.md">Moderator's guide</link>
27
-
for additional instructions on how to setup and use Mjolnir.
30
-
For <link linkend="opt-services.mjolnir.settings">additional settings</link>
31
-
see <link xlink:href="https://github.com/matrix-org/mjolnir/blob/main/config/default.yaml">the default configuration</link>.
33
-
<section xml:id="module-services-mjolnir-setup">
34
-
<title>Mjolnir Setup</title>
1
+
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="module-services-mjolnir">
2
+
<title>Mjolnir (Matrix Moderation Tool)</title>
36
-
First create a new Room which will be used as a management room for Mjolnir. In
37
-
this room, Mjolnir will log possible errors and debugging information. You'll
38
-
need to set this Room-ID in <link linkend="opt-services.mjolnir.managementRoom">services.mjolnir.managementRoom</link>.
41
-
Next, create a new user for Mjolnir on your homeserver, if not present already.
44
-
The Mjolnir Matrix user expects to be free of any rate limiting.
45
-
See <link xlink:href="https://github.com/matrix-org/synapse/issues/6286">Synapse #6286</link>
46
-
for an example on how to achieve this.
4
+
This chapter will show you how to set up your own, self-hosted
5
+
<link xlink:href="https://github.com/matrix-org/mjolnir">Mjolnir</link>
49
-
If you want Mjolnir to be able to deactivate users, move room aliases, shutdown rooms, etc.
50
-
you'll need to make the Mjolnir user a Matrix server admin.
9
+
As an all-in-one moderation tool, it can protect your server from
10
+
malicious invites, spam messages, and whatever else you don't want.
11
+
In addition to server-level protection, Mjolnir is great for
12
+
communities wanting to protect their rooms without having to use
13
+
their personal accounts for moderation.
53
-
Now invite the Mjolnir user to the management room.
16
+
The bot by default includes support for bans, redactions, anti-spam,
17
+
server ACLs, room directory changes, room alias transfers, account
18
+
deactivation, room shutdown, and more.
56
-
It is recommended to use <link xlink:href="https://github.com/matrix-org/pantalaimon">Pantalaimon</link>,
57
-
so your management room can be encrypted. This also applies if you are looking to moderate an encrypted room.
22
+
<link xlink:href="https://github.com/matrix-org/mjolnir#readme">README</link>
24
+
<link xlink:href="https://github.com/matrix-org/mjolnir/blob/main/docs/moderators.md">Moderator's
25
+
guide</link> for additional instructions on how to setup and use
60
-
To enable the Pantalaimon E2E Proxy for mjolnir, enable
61
-
<link linkend="opt-services.mjolnir.pantalaimon.enable">services.mjolnir.pantalaimon</link>. This will
62
-
autoconfigure a new Pantalaimon instance, which will connect to the homeserver
63
-
set in <link linkend="opt-services.mjolnir.homeserverUrl">services.mjolnir.homeserverUrl</link> and Mjolnir itself
64
-
will be configured to connect to the new Pantalaimon instance.
29
+
For <link linkend="opt-services.mjolnir.settings">additional
31
+
<link xlink:href="https://github.com/matrix-org/mjolnir/blob/main/config/default.yaml">the
32
+
default configuration</link>.
34
+
<section xml:id="module-services-mjolnir-setup">
35
+
<title>Mjolnir Setup</title>
37
+
First create a new Room which will be used as a management room
38
+
for Mjolnir. In this room, Mjolnir will log possible errors and
39
+
debugging information. You'll need to set this Room-ID in
40
+
<link linkend="opt-services.mjolnir.managementRoom">services.mjolnir.managementRoom</link>.
43
+
Next, create a new user for Mjolnir on your homeserver, if not
47
+
The Mjolnir Matrix user expects to be free of any rate limiting.
49
+
<link xlink:href="https://github.com/matrix-org/synapse/issues/6286">Synapse
50
+
#6286</link> for an example on how to achieve this.
53
+
If you want Mjolnir to be able to deactivate users, move room
54
+
aliases, shutdown rooms, etc. you'll need to make the Mjolnir user
55
+
a Matrix server admin.
58
+
Now invite the Mjolnir user to the management room.
61
+
It is recommended to use
62
+
<link xlink:href="https://github.com/matrix-org/pantalaimon">Pantalaimon</link>,
63
+
so your management room can be encrypted. This also applies if you
64
+
are looking to moderate an encrypted room.
67
+
To enable the Pantalaimon E2E Proxy for mjolnir, enable
68
+
<link linkend="opt-services.mjolnir.pantalaimon.enable">services.mjolnir.pantalaimon</link>.
69
+
This will autoconfigure a new Pantalaimon instance, which will
70
+
connect to the homeserver set in
71
+
<link linkend="opt-services.mjolnir.homeserverUrl">services.mjolnir.homeserverUrl</link>
72
+
and Mjolnir itself will be configured to connect to the new
73
+
Pantalaimon instance.
70
-
homeserverUrl = "https://matrix.domain.tld";
79
+
homeserverUrl = "https://matrix.domain.tld";
73
-
username = "mjolnir";
74
-
passwordFile = "/run/secrets/mjolnir-password";
82
+
username = "mjolnir";
83
+
passwordFile = "/run/secrets/mjolnir-password";
77
-
"https://matrix.to/#/!xxx:domain.tld"
86
+
"https://matrix.to/#/!xxx:domain.tld"
79
-
managementRoom = "!yyy:domain.tld";
88
+
managementRoom = "!yyy:domain.tld";
83
-
<section xml:id="module-services-mjolnir-setup-ems">
84
-
<title>Element Matrix Services (EMS)</title>
86
-
If you are using a managed <link xlink:href="https://ems.element.io/">"Element Matrix Services (EMS)"</link>
87
-
server, you will need to consent to the terms and conditions. Upon startup, an error
88
-
log entry with a URL to the consent page will be generated.
93
-
<section xml:id="module-services-mjolnir-matrix-synapse-antispam">
94
-
<title>Synapse Antispam Module</title>
96
-
A Synapse module is also available to apply the same rulesets the bot
97
-
uses across an entire homeserver.
100
-
To use the Antispam Module, add <literal>matrix-synapse-plugins.matrix-synapse-mjolnir-antispam</literal>
101
-
to the Synapse plugin list and enable the <literal>mjolnir.Module</literal> module.
92
+
<section xml:id="module-services-mjolnir-setup-ems">
93
+
<title>Element Matrix Services (EMS)</title>
95
+
If you are using a managed
96
+
<link xlink:href="https://ems.element.io/">"Element Matrix
97
+
Services (EMS)"</link> server, you will need to consent to
98
+
the terms and conditions. Upon startup, an error log entry with
99
+
a URL to the consent page will be generated.
103
+
<section xml:id="module-services-mjolnir-matrix-synapse-antispam">
104
+
<title>Synapse Antispam Module</title>
106
+
A Synapse module is also available to apply the same rulesets the
107
+
bot uses across an entire homeserver.
110
+
To use the Antispam Module, add
111
+
<literal>matrix-synapse-plugins.matrix-synapse-mjolnir-antispam</literal>
112
+
to the Synapse plugin list and enable the
113
+
<literal>mjolnir.Module</literal> module.
services.matrix-synapse = {
···
# to already be joined to the room - Mjolnir will not automatically join
128
-
- "!roomid:example.org"
140
+
- "!roomid:example.org"