2022-05-20 07:19:26 -04:00
|
|
|
# Endpoint URL that Mjolnir uses to interact with the matrix homeserver (client-server API),
|
|
|
|
# set this to the pantalaimon URL if you're using that.
|
2019-09-25 22:13:20 -04:00
|
|
|
homeserverUrl: "https://matrix.org"
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# Endpoint URL that Mjolnir could use to fetch events related to reports (client-server API and /_synapse/),
|
|
|
|
# only set this to the public-internet homeserver client API URL, do NOT set this to the pantalaimon URL.
|
2021-10-07 08:42:08 -04:00
|
|
|
rawHomeserverUrl: "https://matrix.org"
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# Matrix Access Token to use, Mjolnir will only use this if pantalaimon.use is false.
|
2019-09-25 22:13:20 -04:00
|
|
|
accessToken: "YOUR_TOKEN_HERE"
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# Options related to Pantalaimon (https://github.com/matrix-org/pantalaimon)
|
2019-10-03 00:20:37 -04:00
|
|
|
pantalaimon:
|
2022-05-20 07:19:26 -04:00
|
|
|
# Whether or not Mjolnir will use pantalaimon to access the matrix homeserver,
|
|
|
|
# set to `true` if you're using pantalaimon.
|
|
|
|
#
|
|
|
|
# Be sure to point homeserverUrl to the pantalaimon instance.
|
|
|
|
#
|
|
|
|
# Mjolnir will log in using the given username and password once,
|
|
|
|
# then store the resulting access token in a file under dataPath.
|
2019-10-03 00:20:37 -04:00
|
|
|
use: false
|
|
|
|
|
|
|
|
# The username to login with.
|
|
|
|
username: mjolnir
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# The password Mjolnir will login with.
|
|
|
|
#
|
|
|
|
# After successfully logging in once, this will be ignored, so this value can be blanked after first startup.
|
2019-10-03 00:20:37 -04:00
|
|
|
password: your_password
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# The path Mjolnir will store its state/data in, leave default ("/data/storage") when using containers.
|
2019-09-25 22:13:20 -04:00
|
|
|
dataPath: "/data/storage"
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# If true (the default), Mjolnir will only accept invites from users present in managementRoom.
|
2020-03-05 17:29:30 -05:00
|
|
|
autojoinOnlyIfManager: true
|
|
|
|
|
2022-08-17 05:05:23 -04:00
|
|
|
# If `autojoinOnlyIfManager` is false, only the members in this space can invite
|
2020-03-05 17:29:30 -05:00
|
|
|
# the bot to new rooms.
|
2022-08-17 05:05:23 -04:00
|
|
|
acceptInvitesFromSpace: "!example:example.org"
|
2020-01-21 15:53:02 -05:00
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# Whether Mjolnir should report ignored invites to the management room (if autojoinOnlyIfManager is true).
|
2020-03-05 17:38:09 -05:00
|
|
|
recordIgnoredInvites: false
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# The room ID (or room alias) of the management room, anyone in this room can issue commands to Mjolnir.
|
|
|
|
#
|
|
|
|
# Mjolnir has no more granular access controls other than this, be sure you trust everyone in this room - secure it!
|
|
|
|
#
|
2019-09-27 16:36:23 -04:00
|
|
|
# This should be a room alias or room ID - not a matrix.to URL.
|
2022-05-20 07:19:26 -04:00
|
|
|
#
|
|
|
|
# Note: By default, Mjolnir is fairly verbose - expect a lot of messages in this room.
|
|
|
|
# (see verboseLogging to adjust this a bit.)
|
2019-09-27 15:57:36 -04:00
|
|
|
managementRoom: "#moderators:example.org"
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# Whether Mjolnir should log a lot more messages in the room,
|
|
|
|
# mainly involves "all-OK" messages, and debugging messages for when mjolnir checks bans in a room.
|
2019-10-04 22:59:30 -04:00
|
|
|
verboseLogging: true
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# The log level of terminal (or container) output,
|
|
|
|
# can be one of DEBUG, INFO, WARN and ERROR, in increasing order of importance and severity.
|
|
|
|
#
|
2019-10-31 11:55:34 -04:00
|
|
|
# This should be at INFO or DEBUG in order to get support for Mjolnir problems.
|
|
|
|
logLevel: "INFO"
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# Whether or not Mjolnir should synchronize policy lists immediately after startup.
|
|
|
|
# Equivalent to running '!mjolnir sync'.
|
2019-10-04 23:02:37 -04:00
|
|
|
syncOnStartup: true
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# Whether or not Mjolnir should check moderation permissions in all protected rooms on startup.
|
|
|
|
# Equivalent to running `!mjolnir verify`.
|
2019-10-04 23:22:34 -04:00
|
|
|
verifyPermissionsOnStartup: true
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# Whether or not Mjolnir should actually apply bans and policy lists,
|
|
|
|
# turn on to trial some untrusted configuration or lists.
|
2019-10-09 09:51:30 -04:00
|
|
|
noop: false
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# Whether Mjolnir should check member lists quicker (by using a different endpoint),
|
|
|
|
# keep in mind that enabling this will miss invited (but not joined) users.
|
|
|
|
#
|
|
|
|
# Turn on if your bot is in (very) large rooms, or in large amounts of rooms.
|
2019-11-06 20:54:59 -05:00
|
|
|
fasterMembershipChecks: false
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# A case-insensitive list of ban reasons to have the bot also automatically redact the user's messages for.
|
|
|
|
#
|
|
|
|
# If the bot sees you ban a user with a reason that is an (exact case-insensitive) match to this list,
|
|
|
|
# it will also remove the user's messages automatically.
|
|
|
|
#
|
|
|
|
# Typically this is useful to avoid having to give two commands to the bot.
|
|
|
|
# Advanced: Use asterisks to have the reason match using "globs"
|
|
|
|
# (f.e. "spam*testing" would match "spam for testing" as well as "spamtesting").
|
|
|
|
#
|
|
|
|
# See here for more info: https://www.digitalocean.com/community/tools/glob
|
|
|
|
# Note: Keep in mind that glob is NOT regex!
|
2019-12-09 21:56:12 -05:00
|
|
|
automaticallyRedactForReasons:
|
|
|
|
- "spam"
|
|
|
|
- "advertising"
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# A list of rooms to protect. Mjolnir will add this to the list it knows from its account data.
|
|
|
|
#
|
|
|
|
# It won't, however, add it to the account data.
|
|
|
|
# Manually add the room via '!mjolnir rooms add' to have it stay protected regardless if this config value changes.
|
|
|
|
#
|
|
|
|
# Note: These must be matrix.to URLs
|
2019-09-27 16:36:23 -04:00
|
|
|
protectedRooms:
|
|
|
|
- "https://matrix.to/#/#yourroom:example.org"
|
2020-01-21 17:19:03 -05:00
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# Whether or not to add all joined rooms to the "protected rooms" list
|
|
|
|
# (excluding the management room and watched policy list rooms, see below).
|
2020-01-21 17:19:03 -05:00
|
|
|
#
|
2022-05-20 07:19:26 -04:00
|
|
|
# Note that this effectively makes the protectedRooms and associated commands useless
|
|
|
|
# for regular rooms.
|
2020-02-18 19:06:27 -05:00
|
|
|
#
|
2022-05-20 07:19:26 -04:00
|
|
|
# Note: the management room is *excluded* from this condition.
|
|
|
|
# Explicitly add it as a protected room to protect it.
|
|
|
|
#
|
|
|
|
# Note: Ban list rooms the bot is watching but didn't create will not be protected.
|
|
|
|
# Explicitly add these rooms as a protected room list if you want them protected.
|
2020-01-21 17:19:03 -05:00
|
|
|
protectAllJoinedRooms: false
|
2020-01-25 22:34:15 -05:00
|
|
|
|
2022-06-08 05:49:43 -04:00
|
|
|
# Increase this delay to have Mjölnir wait longer between two consecutive backgrounded
|
|
|
|
# operations. The total duration of operations will be longer, but the homeserver won't
|
|
|
|
# be affected as much. Conversely, decrease this delay to have Mjölnir chain operations
|
|
|
|
# faster. The total duration of operations will generally be shorter, but the performance
|
|
|
|
# of the homeserver may be more impacted.
|
|
|
|
backgroundDelayMS: 500
|
|
|
|
|
2022-03-07 04:14:06 -05:00
|
|
|
# Server administration commands, these commands will only work if Mjolnir is
|
2022-05-20 07:19:26 -04:00
|
|
|
# a global server administrator, and the bot's server is a Synapse instance.
|
2022-03-07 04:14:06 -05:00
|
|
|
admin:
|
2022-05-20 07:19:26 -04:00
|
|
|
# Whether or not Mjolnir can temporarily take control of any eligible account from the local homeserver who's in the room
|
|
|
|
# (with enough permissions) to "make" a user an admin.
|
2022-03-07 04:14:06 -05:00
|
|
|
#
|
2022-05-20 07:19:26 -04:00
|
|
|
# This only works if a local user with enough admin permissions is present in the room.
|
2022-03-07 04:14:06 -05:00
|
|
|
enableMakeRoomAdminCommand: false
|
|
|
|
|
2020-02-12 17:27:27 -05:00
|
|
|
# Misc options for command handling and commands
|
|
|
|
commands:
|
2022-05-20 07:19:26 -04:00
|
|
|
# Whether or not the `!mjolnir` prefix is necessary to submit commands.
|
|
|
|
#
|
|
|
|
# If `true`, will allow commands like `!ban`, `!help`, etc.
|
2020-02-12 17:27:27 -05:00
|
|
|
#
|
2022-05-20 07:19:26 -04:00
|
|
|
# Note: Mjolnir can also be pinged by display name instead of having to use
|
2020-02-12 17:27:27 -05:00
|
|
|
# the !mjolnir prefix. For example, "my_moderator_bot: ban @spammer:example.org"
|
2022-05-20 07:19:26 -04:00
|
|
|
# will address only my_moderator_bot.
|
2020-02-12 17:27:27 -05:00
|
|
|
allowNoPrefix: false
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# Any additional bot prefixes that Mjolnir will listen to. i.e. adding `mod` will allow `!mod help`.
|
2020-02-12 17:27:27 -05:00
|
|
|
additionalPrefixes:
|
|
|
|
- "mjolnir_bot"
|
2020-06-12 10:03:08 -04:00
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# Whether or not commands with a wildcard (*) will require an additional `--force` argument
|
|
|
|
# in the command to be able to be submitted.
|
2021-02-05 11:04:06 -05:00
|
|
|
confirmWildcardBan: true
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# Configuration specific to certain toggle-able protections
|
2020-06-21 15:18:34 -04:00
|
|
|
protections:
|
|
|
|
# Configuration for the wordlist plugin, which can ban users based if they say certain
|
|
|
|
# blocked words shortly after joining.
|
|
|
|
wordlist:
|
2022-05-20 07:19:26 -04:00
|
|
|
# A list of case-insensitive keywords that the WordList protection will watch for from new users.
|
|
|
|
#
|
|
|
|
# WordList will ban users who use these words when first joining a room, so take caution when selecting them.
|
|
|
|
#
|
|
|
|
# For advanced usage, regex can also be used, see the following links for more information;
|
|
|
|
# - https://www.digitalocean.com/community/tutorials/an-introduction-to-regular-expressions
|
|
|
|
# - https://regexr.com/
|
|
|
|
# - https://regexone.com/
|
2020-06-21 15:18:34 -04:00
|
|
|
words:
|
2022-05-20 07:19:26 -04:00
|
|
|
- "LoReM"
|
|
|
|
- "IpSuM"
|
|
|
|
- "DoLoR"
|
|
|
|
- "aMeT"
|
|
|
|
|
|
|
|
# For how long (in minutes) the user is "new" to the WordList plugin.
|
|
|
|
#
|
|
|
|
# After this time, the user will no longer be banned for using a word in the above wordlist.
|
|
|
|
#
|
|
|
|
# Set to zero to disable the timeout and make users *always* appear "new".
|
|
|
|
# (users will always be banned if they say a bad word)
|
2020-06-21 15:18:34 -04:00
|
|
|
minutesBeforeTrusting: 20
|
|
|
|
|
2022-05-20 07:19:26 -04:00
|
|
|
# Options for advanced monitoring of the health of the bot.
|
2020-06-12 10:03:08 -04:00
|
|
|
health:
|
|
|
|
# healthz options. These options are best for use in container environments
|
|
|
|
# like Kubernetes to detect how healthy the service is. The bot will report
|
|
|
|
# that it is unhealthy until it is able to process user requests. Typically
|
|
|
|
# this means that it'll flag itself as unhealthy for a number of minutes
|
|
|
|
# before saying "Now monitoring rooms" and flagging itself healthy.
|
|
|
|
#
|
|
|
|
# Health is flagged through HTTP status codes, defined below.
|
|
|
|
healthz:
|
|
|
|
# Whether the healthz integration should be enabled (default false)
|
|
|
|
enabled: false
|
|
|
|
|
|
|
|
# The port to expose the webserver on. Defaults to 8080.
|
|
|
|
port: 8080
|
|
|
|
|
|
|
|
# The address to listen for requests on. Defaults to all addresses.
|
|
|
|
address: "0.0.0.0"
|
|
|
|
|
|
|
|
# The path to expose the monitoring endpoint at. Defaults to `/healthz`
|
|
|
|
endpoint: "/healthz"
|
|
|
|
|
|
|
|
# The HTTP status code which reports that the bot is healthy/ready to
|
|
|
|
# process requests. Typically this should not be changed. Defaults to
|
|
|
|
# 200.
|
|
|
|
healthyStatus: 200
|
|
|
|
|
|
|
|
# The HTTP status code which reports that the bot is not healthy/ready.
|
|
|
|
# Defaults to 418.
|
|
|
|
unhealthyStatus: 418
|
2021-10-07 08:42:08 -04:00
|
|
|
|
2022-11-30 10:06:02 -05:00
|
|
|
# Sentry options. Sentry is a tool used to receive/collate/triage runtime
|
|
|
|
# errors and performance issues. Skip this section if you do not wish to use
|
|
|
|
# Sentry.
|
|
|
|
sentry:
|
|
|
|
# The key used to upload Sentry data to the server.
|
|
|
|
# dsn: "https://XXXXXXXXX@example.com/YYY
|
|
|
|
|
|
|
|
# Frequency of performance monitoring.
|
|
|
|
# A number in [0.0, 1.0], where 0.0 means "don't bother with tracing"
|
|
|
|
# and 1.0 means "trace performance at every opportunity".
|
|
|
|
# tracesSampleRate: 0.5
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-10-07 08:42:08 -04:00
|
|
|
# Options for exposing web APIs.
|
|
|
|
web:
|
|
|
|
# Whether to enable web APIs.
|
|
|
|
enabled: false
|
|
|
|
|
|
|
|
# The port to expose the webserver on. Defaults to 8080.
|
|
|
|
port: 8080
|
|
|
|
|
|
|
|
# The address to listen for requests on. Defaults to only the current
|
|
|
|
# computer.
|
|
|
|
address: localhost
|
|
|
|
|
|
|
|
# Alternative setting to open to the entire web. Be careful,
|
|
|
|
# as this will increase your security perimeter:
|
|
|
|
#
|
|
|
|
# address: "0.0.0.0"
|
|
|
|
|
|
|
|
# A web API designed to intercept Matrix API
|
|
|
|
# POST /_matrix/client/r0/rooms/{roomId}/report/{eventId}
|
|
|
|
# and display readable abuse reports in the moderation room.
|
|
|
|
#
|
|
|
|
# If you wish to take advantage of this feature, you will need
|
|
|
|
# to configure a reverse proxy, see e.g. test/nginx.conf
|
|
|
|
abuseReporting:
|
|
|
|
# Whether to enable this feature.
|
|
|
|
enabled: false
|
2022-07-04 10:06:36 -04:00
|
|
|
|
|
|
|
# Whether or not to actively poll synapse for abuse reports, to be used
|
|
|
|
# instead of intercepting client calls to synapse's abuse endpoint, when that
|
|
|
|
# isn't possible/practical.
|
|
|
|
pollReports: false
|
2022-07-07 07:55:03 -04:00
|
|
|
|
|
|
|
# Whether or not new reports, received either by webapi or polling,
|
|
|
|
# should be printed to our managementRoom.
|
|
|
|
displayReports: true
|
2024-09-10 19:46:17 -04:00
|
|
|
|
|
|
|
# How sensitive the NsfwProtection should be, which determines if an image should be redacted. A number between 0 - .99,
|
|
|
|
# with a lower number indicating greater sensitivity, possibly resulting in images being more aggressively flagged
|
|
|
|
# and redacted as NSFW
|
|
|
|
nsfwSensitivity: .6
|