Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

305 regels
13 KiB

  1. {#
  2. SPDX-FileCopyrightText: 2023 - 2024 MDAD project contributors
  3. SPDX-FileCopyrightText: 2023 - 2025 Catalan Lover <catalanlover@protonmail.com>
  4. SPDX-FileCopyrightText: 2024 Slavi Pantaleev
  5. SPDX-FileCopyrightText: 2024 Suguru Hirahara
  6. SPDX-License-Identifier: AGPL-3.0-or-later
  7. #}
  8. # Endpoint URL that Draupnir uses to interact with the Matrix homeserver (client-server API),
  9. homeserverUrl: {{ matrix_bot_draupnir_config_homeserverUrl | to_json }}
  10. # Endpoint URL that Draupnir could use to fetch events related to reports (client-server API and /_synapse/),
  11. # only set this to the public-internet homeserver client API URL, do NOT set this to the pantalaimon URL.
  12. rawHomeserverUrl: {{ matrix_bot_draupnir_config_rawHomeserverUrl | to_json }}
  13. # Matrix Access Token to use, Draupnir will only use this if pantalaimon.use is false.
  14. # This option can be loaded from a file by passing "--access-token-path <path>" at the command line,
  15. # which would allow using secret management systems such as systemd's service credentials.
  16. accessToken: {{ matrix_bot_draupnir_config_accessToken | to_json }}
  17. {% if matrix_bot_draupnir_pantalaimon_use or matrix_bot_draupnir_login_native %}
  18. # Options related to Pantalaimon (https://github.com/matrix-org/pantalaimon)
  19. pantalaimon:
  20. # Set to `true` when the bot is to login and fetch the access token on its own.
  21. #
  22. # Draupnir will log in using the given username and password once,
  23. # then store the resulting access token in a file under dataPath.
  24. use: true
  25. # The username to login with.
  26. username: {{ matrix_bot_draupnir_login | to_json }}
  27. # The password Draupnir will login with.
  28. #
  29. # After successfully logging in once, this will be ignored, so this value can be blanked after first startup.
  30. # This option can be loaded from a file by passing "--password-path <path>" at the command line,
  31. # which would allow using secret management systems such as systemd's service credentials.
  32. password: {{ matrix_bot_draupnir_password | to_json }}
  33. {% endif %}
  34. # Experimental usage of the matrix-bot-sdk rust crypto. This can not be used with Pantalaimon.
  35. # Make sure Pantalaimon is disabled in Draupnir's configuration.
  36. #
  37. # Warning: At this time this is not considered production safe.
  38. experimentalRustCrypto: {{ matrix_bot_draupnir_config_experimentalRustCrypto | to_json }}
  39. # The path Draupnir will store its state/data in, leave default ("/data/storage") when using containers.
  40. dataPath: "/data"
  41. # If true (the default), Draupnir will only accept invites from users present in managementRoom.
  42. autojoinOnlyIfManager: true
  43. # If `autojoinOnlyIfManager` is false, only the members in this space can invite
  44. # the bot to new rooms.
  45. #acceptInvitesFromSpace: "!qporfwt:example.com"
  46. # Whether Draupnir should report ignored invites to the management room (if autojoinOnlyIfManager is true).
  47. recordIgnoredInvites: false
  48. # The room ID (or room alias) of the management room, anyone in this room can issue commands to Draupnir.
  49. #
  50. # Draupnir has no more granular access controls other than this, be sure you trust everyone in this room - secure it!
  51. #
  52. # This should be a room alias or room ID - not a matrix.to URL.
  53. #
  54. # Note: By default, Draupnir is fairly verbose - expect a lot of messages in this room.
  55. # (see verboseLogging to adjust this a bit.)
  56. managementRoom: {{ matrix_bot_draupnir_config_managementRoom | to_json }}
  57. # Deprecated and will be removed in a future version.
  58. # Running with verboseLogging is unsupported.
  59. # Whether Draupnir should log a lot more messages in the room,
  60. # mainly involves "all-OK" messages, and debugging messages for when Draupnir checks bans in a room.
  61. verboseLogging: false
  62. # The log level of terminal (or container) output,
  63. # can be one of DEBUG, INFO, WARN and ERROR, in increasing order of importance and severity.
  64. #
  65. # This should be at INFO or DEBUG in order to get support for Draupnir problems.
  66. logLevel: "INFO"
  67. # Whether or not Draupnir should synchronize policy lists immediately after startup.
  68. # Equivalent to running '!draupnir sync'.
  69. syncOnStartup: true
  70. # Whether or not Draupnir should check moderation permissions in all protected rooms on startup.
  71. # Equivalent to running `!draupnir verify`.
  72. verifyPermissionsOnStartup: true
  73. # Whether or not Draupnir should actually apply bans and policy lists,
  74. # turn on to trial some untrusted configuration or lists.
  75. noop: false
  76. # Whether or not Draupnir should apply `m.room.server_acl` events.
  77. # DO NOT change this to `true` unless you are very confident that you know what you are doing.
  78. disableServerACL: {{ matrix_bot_draupnir_config_disableServerACL | to_json }}
  79. # A case-insensitive list of ban reasons to have the bot also automatically redact the user's messages for.
  80. #
  81. # If the bot sees you ban a user with a reason that is an (exact case-insensitive) match to this list,
  82. # it will also remove the user's messages automatically.
  83. #
  84. # Typically this is useful to avoid having to give two commands to the bot.
  85. # Advanced: Use asterisks to have the reason match using "globs"
  86. # (f.e. "spam*testing" would match "spam for testing" as well as "spamtesting").
  87. #
  88. # See here for more info: https://www.digitalocean.com/community/tools/glob
  89. # Note: Keep in mind that glob is NOT regex!
  90. automaticallyRedactForReasons:
  91. - "spam"
  92. - "advertising"
  93. # Whether or not to add all joined rooms to the "protected rooms" list
  94. # (excluding the management room and watched policy list rooms, see below).
  95. #
  96. # Note that this effectively makes the protectedRooms and associated commands useless
  97. # for regular rooms.
  98. #
  99. # Note: the management room is *excluded* from this condition.
  100. # Explicitly add it as a protected room to protect it.
  101. #
  102. # Note: Ban list rooms the bot is watching but didn't create will not be protected.
  103. # Explicitly add these rooms as a protected room list if you want them protected.
  104. protectAllJoinedRooms: false
  105. # Increase this delay to have Draupnir wait longer between two consecutive backgrounded
  106. # operations. The total duration of operations will be longer, but the homeserver won't
  107. # be affected as much. Conversely, decrease this delay to have Draupnir chain operations
  108. # faster. The total duration of operations will generally be shorter, but the performance
  109. # of the homeserver may be more impacted.
  110. backgroundDelayMS: 500
  111. # FIXME: This configuration option is currently broken in the playbook as admin APIs cannot
  112. # be accessed from containers. See https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3389
  113. # and https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3308
  114. # Server administration commands, these commands will only work if Draupnir is
  115. # a global server administrator, and the bot's server is a Synapse instance.
  116. #admin:
  117. # # Whether or not Draupnir can temporarily take control of any eligible account from the local homeserver who's in the room
  118. # # (with enough permissions) to "make" a user an admin.
  119. # #
  120. # # This only works if a local user with enough admin permissions is present in the room.
  121. # enableMakeRoomAdminCommand: false
  122. #
  123. # Misc options for command handling and commands
  124. commands:
  125. # Whether or not the `!draupnir` prefix is necessary to submit commands.
  126. #
  127. # If `true`, will allow commands like `!ban`, `!help`, etc.
  128. #
  129. # Note: Draupnir can also be pinged by display name instead of having to use
  130. # the !draupnir prefix. For example, "my_moderator_bot: ban @spammer:example.org"
  131. # will address only my_moderator_bot.
  132. allowNoPrefix: false
  133. # Any additional bot prefixes that Draupnir will listen to. i.e. adding `mod` will allow `!mod help`.
  134. additionalPrefixes:
  135. - "draupnir-bot"
  136. - "draupnir_bot"
  137. - "draupnir"
  138. # The default reasons to be prompted with if the reason is missing from a ban command.
  139. ban:
  140. defaultReasons:
  141. - "spam"
  142. - "brigading"
  143. - "harassment"
  144. - "disagreement"
  145. # Configuration specific to certain toggle-able protections
  146. #protections:
  147. # # Configuration for the wordlist plugin, which can ban users based if they say certain
  148. # # blocked words shortly after joining.
  149. # wordlist:
  150. # # A list of case-insensitive keywords that the WordList protection will watch for from new users.
  151. # #
  152. # # WordList will ban users who use these words when first joining a room, so take caution when selecting them.
  153. # #
  154. # # The word list protection does not support regular expressions at this time.
  155. # # The configuration in the past stated support for Regex erroneously.
  156. # #
  157. # words:
  158. # - "LoReM"
  159. # - "IpSuM"
  160. # - "DoLoR"
  161. # - "aMeT"
  162. #
  163. # # For how long (in minutes) the user is "new" to the WordList plugin.
  164. # #
  165. # # After this time, the user will no longer be banned for using a word in the above wordlist.
  166. # #
  167. # # Set to zero to disable the timeout and make users *always* appear "new".
  168. # # (users will always be banned if they say a bad word)
  169. # minutesBeforeTrusting: 20
  170. # The room state backing store writes a copy of the room state for all protected
  171. # rooms to the data directory.
  172. # It is recommended to enable this option unless you deploy Draupnir close to the
  173. # homeserver and know that Draupnir is starting up quickly. If your homeserver can
  174. # respond quickly to Draupnir's requests for `/state` then you might not need this option.
  175. roomStateBackingStore:
  176. enabled: {{ matrix_bot_draupnir_config_roomStateBackingStore_enabled | to_json }}
  177. # Safe mode provides recovery options for some failure modes when Draupnir
  178. # fails to start. For example, if the bot fails to resolve a room alias in
  179. # a watched list, or if the server has parted from a protected room and can't
  180. # find a way back in. Safe mode will provide different options to recover from
  181. # these. Such as unprotecting the room or unwatching the policy list.
  182. # By default Draupnir will boot into safe mode only when the failure mode
  183. # is recoverable.
  184. # It may be desirable to prevent the bot from starting into safe mode if you have
  185. # a pager system when Draupnir is down, as Draupnir could prevent your monitoring
  186. # system from identifying a failure to start.
  187. #safeMode:
  188. # # The option for entering safe mode when Draupnir fails to start up.
  189. # # - "RecoveryOnly" will only start the bot in safe mode when there are recovery options available. This is the default.
  190. # # - "Never" will never start the bot in safe mode when Draupnir fails to start normally.
  191. # # - "Always" will always start the bot in safe mode when Draupnir fails to start normally.
  192. # bootOption: RecoveryOnly
  193. # Options for advanced monitoring of the health of the bot.
  194. health:
  195. # healthz options. These options are best for use in container environments
  196. # like Kubernetes to detect how healthy the service is. The bot will report
  197. # that it is unhealthy until it is able to process user requests. Typically
  198. # this means that it'll flag itself as unhealthy for a number of minutes
  199. # before saying "Now monitoring rooms" and flagging itself healthy.
  200. #
  201. # Health is flagged through HTTP status codes, defined below.
  202. healthz:
  203. # Whether the healthz integration should be enabled (default false)
  204. enabled: false
  205. # The port to expose the webserver on. Defaults to 8080.
  206. port: 8080
  207. # The address to listen for requests on. Defaults to all addresses.
  208. address: "0.0.0.0"
  209. # The path to expose the monitoring endpoint at. Defaults to `/healthz`
  210. endpoint: "/healthz"
  211. # The HTTP status code which reports that the bot is healthy/ready to
  212. # process requests. Typically this should not be changed. Defaults to
  213. # 200.
  214. healthyStatus: 200
  215. # The HTTP status code which reports that the bot is not healthy/ready.
  216. # Defaults to 418.
  217. unhealthyStatus: 418
  218. # Sentry options. Sentry is a tool used to receive/collate/triage runtime
  219. # errors and performance issues. Skip this section if you do not wish to use
  220. # Sentry.
  221. sentry:
  222. # The key used to upload Sentry data to the server.
  223. # dsn: "https://XXXXXXXXX@example.com/YYY
  224. # Frequency of performance monitoring.
  225. # A number in [0.0, 1.0], where 0.0 means "don't bother with tracing"
  226. # and 1.0 means "trace performance at every opportunity".
  227. # tracesSampleRate: 0.5
  228. {% if matrix_bot_draupnir_config_web_enabled %}
  229. # Options for exposing web APIs.
  230. web:
  231. # Whether to enable web APIs.
  232. enabled: true
  233. # The port to expose the webserver on. Defaults to 8080.
  234. port: 8080
  235. # The address to listen for requests on. Defaults to only the current
  236. # computer.
  237. address: "0.0.0.0"
  238. # Alternative setting to open to the entire web. Be careful,
  239. # as this will increase your security perimeter:
  240. #
  241. # address: "0.0.0.0"
  242. # A web API designed to intercept Matrix API
  243. # POST /_matrix/client/r0/rooms/{roomId}/report/{eventId}
  244. # and display readable abuse reports in the moderation room.
  245. #
  246. # If you wish to take advantage of this feature, you will need
  247. # to configure a reverse proxy, see e.g. test/nginx.conf
  248. abuseReporting:
  249. # Whether to enable this feature.
  250. enabled: {{ matrix_bot_draupnir_config_web_abuseReporting | to_json }}
  251. {% endif %}
  252. # FIXME: This configuration option is currently broken in the playbook as admin APIs cannot
  253. # be accessed from containers. See https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3389
  254. # and https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3308
  255. # Whether or not to actively poll synapse for abuse reports, to be used
  256. # instead of intercepting client calls to synapse's abuse endpoint, when that
  257. # isn't possible/practical.
  258. #pollReports: false
  259. # Whether or not new reports, received either by webapi or polling,
  260. # should be printed to our managementRoom.
  261. displayReports: {{ matrix_bot_draupnir_config_displayReports | to_json }}