Matrix Docker Ansible eploy
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

448 linhas
25 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. # Network-specific config options
  7. network:
  8. # Displayname template for Slack users. Available variables:
  9. # .Name - The username of the user
  10. # .Team.Name - The name of the team the channel is in
  11. # .Team.Domain - The Slack subdomain of the team the channel is in
  12. # .ID - The internal ID of the user
  13. # .IsBot - Whether the user is a bot
  14. # .Profile.DisplayName - The username or real name of the user (depending on settings)
  15. # Variables only available for users (not bots):
  16. # .TeamID - The internal ID of the workspace the user is in
  17. # .TZ - The timezone region of the user (e.g. Europe/London)
  18. # .TZLabel - The label of the timezone of the user (e.g. Greenwich Mean Time)
  19. # .TZOffset - The UTC offset of the timezone of the user (e.g. 0)
  20. # .Profile.RealName - The real name of the user
  21. # .Profile.FirstName - The first name of the user
  22. # .Profile.LastName - The last name of the user
  23. # .Profile.Title - The job title of the user
  24. # .Profile.Pronouns - The pronouns of the user
  25. # .Profile.Email - The email address of the user
  26. # .Profile.Phone - The formatted phone number of the user
  27. displayname_template: '{% raw %}{{or .Profile.DisplayName .Profile.RealName .Name}}{{if .IsBot}} (bot){{end}}{% endraw %}'
  28. # Channel name template for Slack channels (all types). Available variables:
  29. # .Name - The name of the channel
  30. # .Team.Name - The name of the team the channel is in
  31. # .Team.Domain - The Slack subdomain of the team the channel is in
  32. # .ID - The internal ID of the channel
  33. # .IsNoteToSelf - Whether the channel is a DM with yourself
  34. # .IsGeneral - Whether the channel is the #general channel
  35. # .IsChannel - Whether the channel is a channel (rather than a DM)
  36. # .IsPrivate - Whether the channel is private
  37. # .IsIM - Whether the channel is a one-to-one DM
  38. # .IsMpIM - Whether the channel is a group DM
  39. # .IsShared - Whether the channel is shared with another workspace.
  40. # .IsExtShared - Whether the channel is shared with an external organization.
  41. # .IsOrgShared - Whether the channel is shared with an organization in the same enterprise grid.
  42. channel_name_template: '{% raw %}{{if and .IsChannel (not .IsPrivate)}}#{{end}}{{.Name}}{{if .IsNoteToSelf}} (you){{end}}{% endraw %}'
  43. # Displayname template for Slack workspaces. Available variables:
  44. # .Name - The name of the team
  45. # .Domain - The Slack subdomain of the team
  46. # .ID - The internal ID of the team
  47. team_name_template: "{% raw %}{{ .Name }}{% endraw %}"
  48. # Should incoming custom emoji reactions be bridged as mxc:// URIs?
  49. # If set to false, custom emoji reactions will be bridged as the shortcode instead, and the image won't be available.
  50. custom_emoji_reactions: true
  51. # Should channels and group DMs have the workspace icon as the Matrix room avatar?
  52. workspace_avatar_in_rooms: false
  53. # Number of participants to sync in channels (doesn't affect group DMs)
  54. participant_sync_count: 5
  55. # Should channel participants only be synced when creating the room?
  56. # If you want participants to always be accurately synced, set participant_sync_count to a high value and this to false.
  57. participant_sync_only_on_create: true
  58. # Should channel portals be muted by default?
  59. mute_channels_by_default: false
  60. # Options for backfilling messages from Slack.
  61. backfill:
  62. # Number of conversations to fetch from Slack when syncing workspace.
  63. # This option applies even if message backfill is disabled below.
  64. # If set to -1, all chats in the client.boot response will be bridged, and nothing will be fetched separately.
  65. conversation_count: -1
  66. # Config options that affect the central bridge module.
  67. bridge:
  68. # The prefix for commands. Only required in non-management rooms.
  69. command_prefix: {{ matrix_mautrix_slack_command_prefix | to_json }}
  70. # Should the bridge create a space for each login containing the rooms that account is in?
  71. personal_filtering_spaces: true
  72. # Whether the bridge should set names and avatars explicitly for DM portals.
  73. # This is only necessary when using clients that don't support MSC4171.
  74. private_chat_portal_meta: false
  75. # Should leaving Matrix rooms be bridged as leaving groups on the remote network?
  76. bridge_matrix_leave: false
  77. # Should room tags only be synced when creating the portal? Tags mean things like favorite/pin and archive/low priority.
  78. # Tags currently can't be synced back to the remote network, so a continuous sync means tagging from Matrix will be undone.
  79. tag_only_on_create: true
  80. # Should room mute status only be synced when creating the portal?
  81. # Like tags, mutes can't currently be synced back to the remote network.
  82. mute_only_on_create: true
  83. # What should be done to portal rooms when a user logs out or is logged out?
  84. # Permitted values:
  85. # nothing - Do nothing, let the user stay in the portals
  86. # kick - Remove the user from the portal rooms, but don't delete them
  87. # unbridge - Remove all ghosts in the room and disassociate it from the remote chat
  88. # delete - Remove all ghosts and users from the room (i.e. delete it)
  89. cleanup_on_logout:
  90. # Should cleanup on logout be enabled at all?
  91. enabled: false
  92. # Settings for manual logouts (explicitly initiated by the Matrix user)
  93. manual:
  94. # Action for private portals which will never be shared with other Matrix users.
  95. private: nothing
  96. # Action for portals with a relay user configured.
  97. relayed: nothing
  98. # Action for portals which may be shared, but don't currently have any other Matrix users.
  99. shared_no_users: nothing
  100. # Action for portals which have other logged-in Matrix users.
  101. shared_has_users: nothing
  102. # Settings for credentials being invalidated (initiated by the remote network, possibly through user action).
  103. # Keys have the same meanings as in the manual section.
  104. bad_credentials:
  105. private: nothing
  106. relayed: nothing
  107. shared_no_users: nothing
  108. shared_has_users: nothing
  109. # Settings for relay mode
  110. relay:
  111. # Whether relay mode should be allowed. If allowed, the set-relay command can be used to turn any
  112. # authenticated user into a relaybot for that chat.
  113. enabled: false
  114. # Should only admins be allowed to set themselves as relay users?
  115. # If true, non-admins can only set users listed in default_relays as relays in a room.
  116. admin_only: true
  117. # List of user login IDs which anyone can set as a relay, as long as the relay user is in the room.
  118. default_relays: []
  119. # The formats to use when sending messages via the relaybot.
  120. # Available variables:
  121. # .Sender.UserID - The Matrix user ID of the sender.
  122. # .Sender.Displayname - The display name of the sender (if set).
  123. # .Sender.RequiresDisambiguation - Whether the sender's name may be confused with the name of another user in the room.
  124. # .Sender.DisambiguatedName - The disambiguated name of the sender. This will be the displayname if set,
  125. # plus the user ID in parentheses if the displayname is not unique.
  126. # If the displayname is not set, this is just the user ID.
  127. # .Message - The `formatted_body` field of the message.
  128. # .Caption - The `formatted_body` field of the message, if it's a caption. Otherwise an empty string.
  129. # .FileName - The name of the file being sent.
  130. message_formats:
  131. m.text: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b>: {{ .Message }}{% endraw %}"
  132. m.notice: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b>: {{ .Message }}{% endraw %}"
  133. m.emote: "{% raw %}* <b>{{ .Sender.DisambiguatedName }}</b> {{ .Message }}{% endraw %}"
  134. m.file: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent a file{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
  135. m.image: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent an image{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
  136. m.audio: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent an audio file{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
  137. m.video: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent a video{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
  138. m.location: "{% raw %}<b>{{ .Sender.DisambiguatedName }}</b> sent a location{{ if .Caption }}: {{ .Caption }}{{ end }}{% endraw %}"
  139. # For networks that support per-message displaynames (i.e. Slack and Discord), the template for those names.
  140. # This has all the Sender variables available under message_formats (but without the .Sender prefix).
  141. # Note that you need to manually remove the displayname from message_formats above.
  142. displayname_format: "{% raw %}{{ .DisambiguatedName }}{% endraw %}"
  143. # Permissions for using the bridge.
  144. # Permitted values:
  145. # relay - Talk through the relaybot (if enabled), no access otherwise
  146. # commands - Access to use commands in the bridge, but not login.
  147. # user - Access to use the bridge with puppeting.
  148. # admin - Full access, user level with some additional administration tools.
  149. # Permitted keys:
  150. # * - All Matrix users
  151. # domain - All users on that homeserver
  152. # mxid - Specific user
  153. permissions: {{ matrix_mautrix_slack_bridge_permissions | to_json }}
  154. # Config for the bridge's database.
  155. database:
  156. # The database type. "sqlite3-fk-wal" and "postgres" are supported.
  157. type: {{ matrix_mautrix_slack_appservice_database_type | to_json }}
  158. # The database URI.
  159. # SQLite: A raw file path is supported, but `file:<path>?_txlock=immediate` is recommended.
  160. # https://github.com/mattn/go-sqlite3#connection-string
  161. # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
  162. # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
  163. uri: {{ matrix_mautrix_slack_appservice_database_uri | to_json }}
  164. # Maximum number of connections.
  165. max_open_conns: 5
  166. max_idle_conns: 1
  167. # Maximum connection idle time and lifetime before they're closed. Disabled if null.
  168. # Parsed with https://pkg.go.dev/time#ParseDuration
  169. max_conn_idle_time: null
  170. max_conn_lifetime: null
  171. # Homeserver details.
  172. homeserver:
  173. # The address that this appservice can use to connect to the homeserver.
  174. # Local addresses without HTTPS are generally recommended when the bridge is running on the same machine,
  175. # but https also works if they run on different machines.
  176. address: {{ matrix_mautrix_slack_homeserver_address | to_json }}
  177. # The domain of the homeserver (also known as server_name, used for MXIDs, etc).
  178. domain: {{ matrix_mautrix_slack_homeserver_domain | to_json }}
  179. # What software is the homeserver running?
  180. # Standard Matrix homeservers like Synapse, Dendrite and Conduit should just use "standard" here.
  181. software: standard
  182. # The URL to push real-time bridge status to.
  183. # If set, the bridge will make POST requests to this URL whenever a user's remote network connection state changes.
  184. # The bridge will use the appservice as_token to authorize requests.
  185. status_endpoint:
  186. # Endpoint for reporting per-message status.
  187. # If set, the bridge will make POST requests to this URL when processing a message from Matrix.
  188. # It will make one request when receiving the message (step BRIDGE), one after decrypting if applicable
  189. # (step DECRYPTED) and one after sending to the remote network (step REMOTE). Errors will also be reported.
  190. # The bridge will use the appservice as_token to authorize requests.
  191. message_send_checkpoint_endpoint:
  192. # Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
  193. async_media: false
  194. # Should the bridge use a websocket for connecting to the homeserver?
  195. # The server side is currently not documented anywhere and is only implemented by mautrix-wsproxy,
  196. # mautrix-asmux (deprecated), and hungryserv (proprietary).
  197. websocket: false
  198. # How often should the websocket be pinged? Pinging will be disabled if this is zero.
  199. ping_interval_seconds: 0
  200. # Application service host/registration related details.
  201. # Changing these values requires regeneration of the registration (except when noted otherwise)
  202. appservice:
  203. # The address that the homeserver can use to connect to this appservice.
  204. address: {{ matrix_mautrix_slack_appservice_address | to_json }}
  205. # A public address that external services can use to reach this appservice.
  206. # This value doesn't affect the registration file.
  207. public_address: https://bridge.example.com
  208. # The hostname and port where this appservice should listen.
  209. # For Docker, you generally have to change the hostname to 0.0.0.0.
  210. hostname: 0.0.0.0
  211. port: 8080
  212. # The unique ID of this appservice.
  213. id: slack
  214. # Appservice bot details.
  215. bot:
  216. # Username of the appservice bot.
  217. username: {{ matrix_mautrix_slack_appservice_bot_username | to_json }}
  218. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  219. # to leave display name/avatar as-is.
  220. displayname: Slack bridge bot
  221. avatar: mxc://maunium.net/pVtzLmChZejGxLqmXtQjFxem
  222. # Whether to receive ephemeral events via appservice transactions.
  223. ephemeral_events: true
  224. # Should incoming events be handled asynchronously?
  225. # This may be necessary for large public instances with lots of messages going through.
  226. # However, messages will not be guaranteed to be bridged in the same order they were sent in.
  227. # This value doesn't affect the registration file.
  228. async_transactions: false
  229. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  230. as_token: {{ matrix_mautrix_slack_appservice_token | to_json }}
  231. hs_token: {{ matrix_mautrix_slack_homeserver_token | to_json }}
  232. # Localpart template of MXIDs for remote users.
  233. # {% raw %}{{.}}{% endraw %} is replaced with the internal ID of the user.
  234. username_template: "{% raw %}slack_{{.}}{% endraw %}"
  235. # Config options that affect the Matrix connector of the bridge.
  236. matrix:
  237. # Whether the bridge should send the message status as a custom com.beeper.message_send_status event.
  238. message_status_events: false
  239. # Whether the bridge should send a read receipt after successfully bridging a message.
  240. delivery_receipts: false
  241. # Whether the bridge should send error notices via m.notice events when a message fails to bridge.
  242. message_error_notices: true
  243. # Whether the bridge should update the m.direct account data event when double puppeting is enabled.
  244. sync_direct_chat_list: false
  245. # Whether created rooms should have federation enabled. If false, created portal rooms
  246. # will never be federated. Changing this option requires recreating rooms.
  247. federate_rooms: true
  248. # Settings for provisioning API
  249. provisioning:
  250. # Prefix for the provisioning API paths.
  251. prefix: /_matrix/provision
  252. # Shared secret for authentication. If set to "generate" or null, a random secret will be generated,
  253. # or if set to "disable", the provisioning API will be disabled.
  254. shared_secret: {{ matrix_mautrix_slack_provisioning_shared_secret | to_json }}
  255. # Whether to allow provisioning API requests to be authed using Matrix access tokens.
  256. # This follows the same rules as double puppeting to determine which server to contact to check the token,
  257. # which means that by default, it only works for users on the same server as the bridge.
  258. allow_matrix_auth: true
  259. # Enable debug API at /debug with provisioning authentication.
  260. debug_endpoints: false
  261. # Some networks require publicly accessible media download links (e.g. for user avatars when using Discord webhooks).
  262. # These settings control whether the bridge will provide such public media access.
  263. public_media:
  264. # Should public media be enabled at all?
  265. # The public_address field under the appservice section MUST be set when enabling public media.
  266. enabled: false
  267. # A key for signing public media URLs.
  268. # If set to "generate", a random key will be generated.
  269. signing_key: {{ matrix_mautrix_slack_public_media_signing_key | to_json }}
  270. # Number of seconds that public media URLs are valid for.
  271. # If set to 0, URLs will never expire.
  272. expiry: 0
  273. # Length of hash to use for public media URLs. Must be between 0 and 32.
  274. hash_length: 32
  275. # Settings for converting remote media to custom mxc:// URIs instead of reuploading.
  276. # More details can be found at https://docs.mau.fi/bridges/go/discord/direct-media.html
  277. direct_media:
  278. # Should custom mxc:// URIs be used instead of reuploading media?
  279. enabled: false
  280. # The server name to use for the custom mxc:// URIs.
  281. # This server name will effectively be a real Matrix server, it just won't implement anything other than media.
  282. # You must either set up .well-known delegation from this domain to the bridge, or proxy the domain directly to the bridge.
  283. server_name: media.example.com
  284. # Optionally a custom .well-known response. This defaults to `server_name:443`
  285. well_known_response:
  286. # Optionally specify a custom prefix for the media ID part of the MXC URI.
  287. media_id_prefix:
  288. # If the remote network supports media downloads over HTTP, then the bridge will use MSC3860/MSC3916
  289. # media download redirects if the requester supports it. Optionally, you can force redirects
  290. # and not allow proxying at all by setting this to false.
  291. # This option does nothing if the remote network does not support media downloads over HTTP.
  292. allow_proxy: true
  293. # Matrix server signing key to make the federation tester pass, same format as synapse's .signing.key file.
  294. # This key is also used to sign the mxc:// URIs to ensure only the bridge can generate them.
  295. server_key: ""
  296. # Settings for backfilling messages.
  297. # Note that the exact way settings are applied depends on the network connector.
  298. # See https://docs.mau.fi/bridges/general/backfill.html for more details.
  299. backfill:
  300. # Whether to do backfilling at all.
  301. enabled: {{ matrix_mautrix_slack_backfill_enabled | to_json }}
  302. # Maximum number of messages to backfill in empty rooms.
  303. max_initial_messages: {{ matrix_mautrix_slack_backfill_max_initial_messages | to_json }}
  304. # Maximum number of missed messages to backfill after bridge restarts.
  305. max_catchup_messages: {{ matrix_mautrix_slack_backfill_max_catchup_messages | to_json }}
  306. # If a backfilled chat is older than this number of hours,
  307. # mark it as read even if it's unread on the remote network.
  308. unread_hours_threshold: {{ matrix_mautrix_slack_backfill_unread_hours_threshold| to_json }}
  309. # Settings for backfilling threads within other backfills.
  310. threads:
  311. # Maximum number of messages to backfill in a new thread.
  312. max_initial_messages: {{ matrix_mautrix_slack_backfill_threads_max_initial_messages | to_json }}
  313. # Settings for the backwards backfill queue. This only applies when connecting to
  314. # Beeper as standard Matrix servers don't support inserting messages into history.
  315. queue:
  316. # Should the backfill queue be enabled?
  317. enabled: false
  318. # Number of messages to backfill in one batch.
  319. batch_size: 100
  320. # Delay between batches in seconds.
  321. batch_delay: 20
  322. # Maximum number of batches to backfill per portal.
  323. # If set to -1, all available messages will be backfilled.
  324. max_batches: -1
  325. # Optional network-specific overrides for max batches.
  326. # Interpretation of this field depends on the network connector.
  327. max_batches_override: {}
  328. # Settings for enabling double puppeting
  329. double_puppet:
  330. # Servers to always allow double puppeting from.
  331. # This is only for other servers and should NOT contain the server the bridge is on.
  332. servers: {}
  333. # Whether to allow client API URL discovery for other servers. When using this option,
  334. # users on other servers can use double puppeting even if their server URLs aren't
  335. # explicitly added to the servers map above.
  336. allow_discovery: false
  337. # Shared secrets for automatic double puppeting.
  338. # See https://docs.mau.fi/bridges/general/double-puppeting.html for instructions.
  339. secrets: {{ matrix_mautrix_slack_double_puppet_secrets | to_json }}
  340. # End-to-bridge encryption support options.
  341. #
  342. # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
  343. encryption:
  344. # Whether to enable encryption at all. If false, the bridge will not function in encrypted rooms.
  345. allow: {{ matrix_mautrix_slack_bridge_encryption_allow | to_json }}
  346. # Whether to force-enable encryption in all bridged rooms.
  347. default: {{ matrix_mautrix_slack_bridge_encryption_default | to_json }}
  348. # Whether to require all messages to be encrypted and drop any unencrypted messages.
  349. require: false
  350. # Whether to use MSC2409/MSC3202 instead of /sync long polling for receiving encryption-related data.
  351. # This option is not yet compatible with standard Matrix servers like Synapse and should not be used.
  352. appservice: false
  353. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  354. # You must use a client that supports requesting keys from other users to use this feature.
  355. allow_key_sharing: {{ matrix_mautrix_slack_bridge_encryption_key_sharing_allow | to_json }}
  356. # Pickle key for encrypting encryption keys in the bridge database.
  357. # If set to generate, a random key will be generated.
  358. pickle_key: {{ matrix_mautrix_slack_bridge_encryption_pickle_key | to_json }}
  359. # Options for deleting megolm sessions from the bridge.
  360. delete_keys:
  361. # Beeper-specific: delete outbound sessions when hungryserv confirms
  362. # that the user has uploaded the key to key backup.
  363. delete_outbound_on_ack: false
  364. # Don't store outbound sessions in the inbound table.
  365. dont_store_outbound: false
  366. # Ratchet megolm sessions forward after decrypting messages.
  367. ratchet_on_decrypt: false
  368. # Delete fully used keys (index >= max_messages) after decrypting messages.
  369. delete_fully_used_on_decrypt: false
  370. # Delete previous megolm sessions from same device when receiving a new one.
  371. delete_prev_on_new_session: false
  372. # Delete megolm sessions received from a device when the device is deleted.
  373. delete_on_device_delete: false
  374. # Periodically delete megolm sessions when 2x max_age has passed since receiving the session.
  375. periodically_delete_expired: false
  376. # Delete inbound megolm sessions that don't have the received_at field used for
  377. # automatic ratcheting and expired session deletion. This is meant as a migration
  378. # to delete old keys prior to the bridge update.
  379. delete_outdated_inbound: false
  380. # What level of device verification should be required from users?
  381. #
  382. # Valid levels:
  383. # unverified - Send keys to all device in the room.
  384. # cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
  385. # cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
  386. # cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
  387. # Note that creating user signatures from the bridge bot is not currently possible.
  388. # verified - Require manual per-device verification
  389. # (currently only possible by modifying the `trust` column in the `crypto_device` database table).
  390. verification_levels:
  391. # Minimum level for which the bridge should send keys to when bridging messages from the remote network to Matrix.
  392. receive: unverified
  393. # Minimum level that the bridge should accept for incoming Matrix messages.
  394. send: unverified
  395. # Minimum level that the bridge should require for accepting key requests.
  396. share: cross-signed-tofu
  397. # Options for Megolm room key rotation. These options allow you to configure the m.room.encryption event content.
  398. # See https://spec.matrix.org/v1.10/client-server-api/#mroomencryption for more information about that event.
  399. rotation:
  400. # Enable custom Megolm room key rotation settings. Note that these
  401. # settings will only apply to rooms created after this option is set.
  402. enable_custom: false
  403. # The maximum number of milliseconds a session should be used
  404. # before changing it. The Matrix spec recommends 604800000 (a week)
  405. # as the default.
  406. milliseconds: 604800000
  407. # The maximum number of messages that should be sent with a given a
  408. # session before changing it. The Matrix spec recommends 100 as the
  409. # default.
  410. messages: 100
  411. # Disable rotating keys when a user's devices change?
  412. # You should not enable this option unless you understand all the implications.
  413. disable_device_change_key_rotation: false
  414. # Logging config. See https://github.com/tulir/zeroconfig for details.
  415. logging:
  416. min_level: {{ matrix_mautrix_slack_logging_level | to_json }}
  417. writers:
  418. - type: stdout
  419. format: pretty-colored