Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

308 Zeilen
17 KiB

  1. {#
  2. SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  3. SPDX-License-Identifier: AGPL-3.0-or-later
  4. #}
  5. #jinja2: lstrip_blocks: "True"
  6. # Homeserver details.
  7. homeserver:
  8. # The address that this appservice can use to connect to the homeserver.
  9. address: {{ matrix_mautrix_discord_homeserver_address | to_json }}
  10. # Publicly accessible base URL for media, used for avatars in relay mode.
  11. # If not set, the connection address above will be used.
  12. public_address: {{ matrix_mautrix_discord_homeserver_public_address | to_json }}
  13. # The domain of the homeserver (for MXIDs, etc).
  14. domain: {{ matrix_mautrix_discord_homeserver_domain | to_json }}
  15. # Is the homeserver actually mautrix-asmux?
  16. asmux: false
  17. # The URL to push real-time bridge status to.
  18. # If set, the bridge will make POST requests to this URL whenever a user's discord connection state changes.
  19. # The bridge will use the appservice as_token to authorize requests.
  20. status_endpoint: null
  21. # Endpoint for reporting per-message status.
  22. message_send_checkpoint_endpoint: null
  23. # Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
  24. async_media: false
  25. # Application service host/registration related details.
  26. # Changing these values requires regeneration of the registration.
  27. appservice:
  28. # The address that the homeserver can use to connect to this appservice.
  29. address: {{ matrix_mautrix_discord_appservice_address | to_json }}
  30. # The hostname and port where this appservice should listen.
  31. hostname: 0.0.0.0
  32. port: 8080
  33. # Database config.
  34. database:
  35. # The database type. "sqlite3" and "postgres" are supported.
  36. type: {{ matrix_mautrix_discord_appservice_database_type|to_json }}
  37. # The database URI.
  38. # SQLite: File name is enough. https://github.com/mattn/go-sqlite3#connection-string
  39. # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
  40. # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
  41. uri: {{ matrix_mautrix_discord_appservice_database_uri|to_json }}
  42. # Maximum number of connections. Mostly relevant for Postgres.
  43. max_open_conns: 20
  44. max_idle_conns: 2
  45. # Maximum connection idle time and lifetime before they're closed. Disabled if null.
  46. # Parsed with https://pkg.go.dev/time#ParseDuration
  47. max_conn_idle_time: null
  48. max_conn_lifetime: null
  49. # The unique ID of this appservice.
  50. id: discord
  51. # Appservice bot details.
  52. bot:
  53. # Username of the appservice bot.
  54. username: {{ matrix_mautrix_discord_appservice_bot_username|to_json }}
  55. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  56. # to leave display name/avatar as-is.
  57. displayname: Discord bridge bot
  58. avatar: mxc://maunium.net/nIdEykemnwdisvHbpxflpDlC
  59. # Whether or not to receive ephemeral events via appservice transactions.
  60. # Requires MSC2409 support (i.e. Synapse 1.22+).
  61. ephemeral_events: true
  62. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  63. as_token: {{ matrix_mautrix_discord_appservice_token | to_json }}
  64. hs_token: {{ matrix_mautrix_discord_homeserver_token | to_json }}
  65. # Bridge config
  66. bridge:
  67. # Localpart template of MXIDs for Discord users.
  68. # {{ '{{.}}' }} is replaced with the internal ID of the Discord user.
  69. username_template: "{{ 'discord_{{.}}' }}"
  70. # Displayname template for Discord users. This is also used as the room name in DMs if private_chat_portal_meta is enabled.
  71. # Available variables:
  72. # {{ '{{.ID}}' }} - Internal user ID
  73. # {{ '{{.Username}}' }} - Legacy display/username on Discord
  74. # {{ '{{.GlobalName}}' }} - New displayname on Discord
  75. # {{ '{{.Discriminator}}' }} - The 4 numbers after the name on Discord
  76. # {{ '{{.Bot}}' }} - Whether the user is a bot
  77. # {{ '{{.System}}' }} - Whether the user is an official system user
  78. # {{ '{{.Webhook}}' }} - Whether the user is a webhook and is not an application
  79. # {{ '{{.Application}}' }} - Whether the user is an application
  80. displayname_template: "{{ '{{or .GlobalName .Username}}{{if .Bot}} (bot){{end}}' }}"
  81. # Displayname template for Discord channels (bridged as rooms, or spaces when type=4).
  82. # Available variables:
  83. # {{ '{{.Name}}' }} - Channel name, or user displayname (pre-formatted with displayname_template) in DMs.
  84. # {{ '{{.ParentName}}' }} - Parent channel name (used for categories).
  85. # {{ '{{.GuildName}}' }} - Guild name.
  86. # {{ '{{.NSFW}}' }} - Whether the channel is marked as NSFW.
  87. # {{ '{{.Type}}' }} - Channel type (see values at https://github.com/bwmarrin/discordgo/blob/v0.25.0/structs.go#L251-L267)
  88. channel_name_template: "{{ '{{if or (eq .Type 3) (eq .Type 4)}}{{.Name}}{{else}}#{{.Name}}{{end}}' }}"
  89. # Displayname template for Discord guilds (bridged as spaces).
  90. # Available variables:
  91. # {{ '{{.Name}}' }} - Guild name
  92. guild_name_template: "{{ '{{.Name}}' }}"
  93. # Should the bridge explicitly set the avatar and room name for DM portal rooms?
  94. # This is implicitly enabled in encrypted rooms.
  95. # Whether to explicitly set the avatar and room name for private chat portal rooms.
  96. # If set to `default`, this will be enabled in encrypted rooms and disabled in unencrypted rooms.
  97. # If set to `always`, all DM rooms will have explicit names and avatars set.
  98. # If set to `never`, DM rooms will never have names and avatars set.
  99. private_chat_portal_meta: default
  100. portal_message_buffer: 128
  101. # Number of private channel portals to create on bridge startup.
  102. # Other portals will be created when receiving messages.
  103. startup_private_channel_create_limit: 5
  104. # Should the bridge send a read receipt from the bridge bot when a message has been sent to Discord?
  105. delivery_receipts: false
  106. # Whether the bridge should send the message status as a custom com.beeper.message_send_status event.
  107. message_status_events: true
  108. # Whether the bridge should send error notices via m.notice events when a message fails to bridge.
  109. message_error_notices: true
  110. # Should the bridge use space-restricted join rules instead of invite-only for guild rooms?
  111. # This can avoid unnecessary invite events in guild rooms when members are synced in.
  112. restricted_rooms: {{ matrix_mautrix_discord_bridge_restricted_rooms|to_json }}
  113. # Should the bridge update the m.direct account data event when double puppeting is enabled.
  114. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  115. # and is therefore prone to race conditions.
  116. sync_direct_chat_list: false
  117. # Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
  118. # This field will automatically be changed back to false after it, except if the config file is not writable.
  119. resend_bridge_info: false
  120. # Should incoming custom emoji reactions be bridged as mxc:// URIs?
  121. # If set to false, custom emoji reactions will be bridged as the shortcode instead, and the image wont be available.
  122. custom_emoji_reactions: true
  123. # Should the bridge attempt to completely delete portal rooms when a channel is deleted on Discord?
  124. # If true, the bridge will try to kick Matrix users from the room. Otherwise, the bridge only makes ghosts leave.
  125. delete_portal_on_channel_delete: false
  126. # Should the bridge delete all portal rooms when you leave a guild on Discord?
  127. # This only applies if the guild has no other Matrix users on this bridge instance.
  128. delete_guild_on_leave: true
  129. # Whether or not created rooms should have federation enabled.
  130. # If false, created portal rooms will never be federated.
  131. federate_rooms: {{ matrix_mautrix_discord_federate_rooms|to_json }}
  132. # Prefix messages from webhooks with the profile info? This can be used along with a custom displayname_template
  133. # to better handle webhooks that change their name all the time (like ones used by bridges).
  134. prefix_webhook_messages: false
  135. # Bridge webhook avatars?
  136. enable_webhook_avatars: true
  137. # Should the bridge upload media to the Discord CDN directly before sending the message when using a user token,
  138. # like the official client does? The other option is sending the media in the message send request as a form part
  139. # (which is always used by bots and webhooks).
  140. use_discord_cdn_upload: true
  141. # Should mxc uris copied from Discord be cached?
  142. # This can be `never` to never cache, `unencrypted` to only cache unencrypted mxc uris, or `always` to cache everything.
  143. # If you have a media repo that generates non-unique mxc uris, you should set this to never.
  144. cache_media: unencrypted
  145. # Patterns for converting Discord media to custom mxc:// URIs instead of reuploading.
  146. # Each of the patterns can be set to null to disable custom URIs for that type of media.
  147. # More details can be found at https://docs.mau.fi/bridges/go/discord/direct-media.html
  148. media_patterns:
  149. # Should custom mxc:// URIs be used instead of reuploading media?
  150. enabled: false
  151. # Pattern for normal message attachments.
  152. attachments: {% raw %}mxc://discord-media.mau.dev/attachments|{{.ChannelID}}|{{.AttachmentID}}|{{.FileName}}{% endraw %}
  153. # Pattern for custom emojis.
  154. emojis: {% raw %}mxc://discord-media.mau.dev/emojis|{{.ID}}.{{.Ext}}{% endraw %}
  155. # Pattern for stickers. Note that animated lottie stickers will not be converted if this is enabled.
  156. stickers: {% raw %}mxc://discord-media.mau.dev/stickers|{{.ID}}.{{.Ext}}{% endraw %}
  157. # Pattern for static user avatars.
  158. avatars: {% raw %}mxc://discord-media.mau.dev/avatars|{{.UserID}}|{{.AvatarID}}.{{.Ext}}{% endraw %}
  159. # Settings for converting animated stickers.
  160. animated_sticker:
  161. # Format to which animated stickers should be converted.
  162. # disable - No conversion, send as-is (lottie JSON)
  163. # png - converts to non-animated png (fastest)
  164. # gif - converts to animated gif
  165. # webm - converts to webm video, requires ffmpeg executable with vp9 codec and webm container support
  166. # webp - converts to animated webp, requires ffmpeg executable with webp codec/container support
  167. target: webp
  168. # Arguments for converter. All converters take width and height.
  169. args:
  170. width: 320
  171. height: 320
  172. fps: 25 # only for webm, webp and gif (2, 5, 10, 20 or 25 recommended)
  173. # Servers to always allow double puppeting from
  174. double_puppet_server_map: {{ matrix_mautrix_discord_bridge_double_puppet_server_map | to_json }}
  175. # Allow using double puppeting from any server with a valid client .well-known file.
  176. double_puppet_allow_discovery: false
  177. # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
  178. #
  179. # If set, double puppeting will be enabled automatically for local users
  180. # instead of users having to find an access token and run `login-matrix`
  181. # manually.
  182. login_shared_secret_map: {{ matrix_mautrix_discord_bridge_login_shared_secret_map|to_json }}
  183. # The prefix for commands. Only required in non-management rooms.
  184. command_prefix: "{{ matrix_mautrix_discord_command_prefix }}"
  185. # Messages sent upon joining a management room.
  186. # Markdown is supported. The defaults are listed below.
  187. management_room_text:
  188. # Sent when joining a room.
  189. welcome: "Hello, I'm a Discord bridge bot."
  190. # Sent when joining a management room and the user is already logged in.
  191. welcome_connected: "Use `help` for help."
  192. # Sent when joining a management room and the user is not logged in.
  193. welcome_unconnected: "Use `help` for help or `login` to log in."
  194. # Optional extra text sent when joining a management room.
  195. additional_help: ""
  196. # Settings for backfilling messages.
  197. backfill:
  198. # Limits for forward backfilling.
  199. forward_limits:
  200. # Initial backfill (when creating portal). 0 means backfill is disabled.
  201. # A special unlimited value is not supported, you must set a limit. Initial backfill will
  202. # fetch all messages first before backfilling anything, so high limits can take a lot of time.
  203. initial:
  204. dm: 0
  205. channel: 0
  206. thread: 0
  207. # Missed message backfill (on startup).
  208. # 0 means backfill is disabled, -1 means fetch all messages since last bridged message.
  209. # When using unlimited backfill (-1), messages are backfilled as they are fetched.
  210. # With limits, all messages up to the limit are fetched first and backfilled afterwards.
  211. missed:
  212. dm: 0
  213. channel: 0
  214. thread: 0
  215. # Maximum members in a guild to enable backfilling. Set to -1 to disable limit.
  216. # This can be used as a rough heuristic to disable backfilling in channels that are too active.
  217. # Currently only applies to missed message backfill.
  218. max_guild_members: -1
  219. # End-to-bridge encryption support options.
  220. #
  221. # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
  222. encryption:
  223. # Allow encryption, work in group chat rooms with e2ee enabled
  224. allow: {{ matrix_mautrix_discord_bridge_encryption_allow|to_json }}
  225. # Default to encryption, force-enable encryption in all portals the bridge creates
  226. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  227. default: {{ matrix_mautrix_discord_bridge_encryption_default|to_json }}
  228. # Require encryption, drop any unencrypted messages.
  229. require: false
  230. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  231. # You must use a client that supports requesting keys from other users to use this feature.
  232. allow_key_sharing: {{ matrix_mautrix_discord_bridge_encryption_key_sharing_allow|to_json }}
  233. # What level of device verification should be required from users?
  234. #
  235. # Valid levels:
  236. # unverified - Send keys to all device in the room.
  237. # cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
  238. # cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
  239. # cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
  240. # Note that creating user signatures from the bridge bot is not currently possible.
  241. # verified - Require manual per-device verification
  242. # (currently only possible by modifying the `trust` column in the `crypto_device` database table).
  243. verification_levels:
  244. # Minimum level for which the bridge should send keys to when bridging messages from WhatsApp to Matrix.
  245. receive: unverified
  246. # Minimum level that the bridge should accept for incoming Matrix messages.
  247. send: unverified
  248. # Minimum level that the bridge should require for accepting key requests.
  249. share: cross-signed-tofu
  250. # Options for Megolm room key rotation. These options allow you to
  251. # configure the m.room.encryption event content. See:
  252. # https://spec.matrix.org/v1.3/client-server-api/#mroomencryption for
  253. # more information about that event.
  254. rotation:
  255. # Enable custom Megolm room key rotation settings. Note that these
  256. # settings will only apply to rooms created after this option is
  257. # set.
  258. enable_custom: false
  259. # The maximum number of milliseconds a session should be used
  260. # before changing it. The Matrix spec recommends 604800000 (a week)
  261. # as the default.
  262. milliseconds: 604800000
  263. # The maximum number of messages that should be sent with a given a
  264. # session before changing it. The Matrix spec recommends 100 as the
  265. # default.
  266. messages: 100
  267. # Settings for provisioning API
  268. provisioning:
  269. # Prefix for the provisioning API paths.
  270. prefix: /_matrix/provision
  271. # Shared secret for authentication. If set to "generate", a random secret will be generated,
  272. # or if set to "disable", the provisioning API will be disabled.
  273. shared_secret: generate
  274. # Permissions for using the bridge.
  275. # Permitted values:
  276. # relay - Talk through the relaybot (if enabled), no access otherwise
  277. # user - Access to use the bridge to chat with a Discord account.
  278. # admin - User level and some additional administration tools
  279. # Permitted keys:
  280. # * - All Matrix users
  281. # domain - All users on that homeserver
  282. # mxid - Specific user
  283. permissions: {{ matrix_mautrix_discord_bridge_permissions|to_json }}
  284. logging:
  285. directory: ./logs
  286. file_name_format: ''
  287. file_date_format: "2006-01-02"
  288. file_mode: 384
  289. timestamp_format: Jan _2, 2006 15:04:05
  290. print_level: {{ matrix_mautrix_discord_logging_level | to_json }}
  291. print_json: false
  292. file_json: false