Matrix Docker Ansible eploy
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

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