Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

408 строки
24 KiB

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