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.
 
 

430 lines
25 KiB

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