Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

430 řádky
25 KiB

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