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.
 
 

323 lines
14 KiB

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