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.
 
 

303 lines
17 KiB

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