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.
 
 

407 lines
23 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. # Homeserver details.
  3. homeserver:
  4. # The address that this appservice can use to connect to the homeserver.
  5. address: {{ matrix_mautrix_whatsapp_homeserver_address }}
  6. # The domain of the homeserver (for MXIDs, etc).
  7. domain: {{ matrix_mautrix_whatsapp_homeserver_domain }}
  8. # The URL to push real-time bridge status to.
  9. # If set, the bridge will make POST requests to this URL whenever a user's whatsapp connection state changes.
  10. # The bridge will use the appservice as_token to authorize requests.
  11. status_endpoint: null
  12. # Endpoint for reporting per-message status.
  13. message_send_checkpoint_endpoint: null
  14. # Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
  15. async_media: false
  16. # Application service host/registration related details.
  17. # Changing these values requires regeneration of the registration.
  18. appservice:
  19. # The address that the homeserver can use to connect to this appservice.
  20. address: {{ matrix_mautrix_whatsapp_appservice_address }}
  21. # The hostname and port where this appservice should listen.
  22. hostname: 0.0.0.0
  23. port: 8080
  24. # Database config.
  25. database:
  26. # The database type. "sqlite3" and "postgres" are supported.
  27. type: {{ matrix_mautrix_whatsapp_appservice_database_type|to_json }}
  28. # The database URI.
  29. # SQLite: File name is enough. https://github.com/mattn/go-sqlite3#connection-string
  30. # Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
  31. # To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
  32. uri: {{ matrix_mautrix_whatsapp_appservice_database_uri|to_json }}
  33. # Maximum number of connections. Mostly relevant for Postgres.
  34. max_open_conns: 20
  35. max_idle_conns: 2
  36. # Maximum connection idle time and lifetime before they're closed. Disabled if null.
  37. # Parsed with https://pkg.go.dev/time#ParseDuration
  38. max_conn_idle_time: null
  39. max_conn_lifetime: null
  40. # The unique ID of this appservice.
  41. id: whatsapp
  42. # Appservice bot details.
  43. bot:
  44. # Username of the appservice bot.
  45. username: {{ matrix_mautrix_whatsapp_appservice_bot_username|to_json }}
  46. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  47. # to leave display name/avatar as-is.
  48. displayname: WhatsApp bridge bot
  49. avatar: mxc://maunium.net/NeXNQarUbrlYBiPCpprYsRqr
  50. # Whether or not to receive ephemeral events via appservice transactions.
  51. # Requires MSC2409 support (i.e. Synapse 1.22+).
  52. # You should disable bridge -> sync_with_custom_puppets when this is enabled.
  53. ephemeral_events: false
  54. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  55. as_token: "{{ matrix_mautrix_whatsapp_appservice_token }}"
  56. hs_token: "{{ matrix_mautrix_whatsapp_homeserver_token }}"
  57. # Segment API key to track some events, like provisioning API login and encryption errors.
  58. segment_key: null
  59. # Prometheus config.
  60. metrics:
  61. # Enable prometheus metrics?
  62. enabled: false
  63. # IP and port where the metrics listener should be. The path is always /metrics
  64. listen: 127.0.0.1:8001
  65. # Config for things that are directly sent to WhatsApp.
  66. whatsapp:
  67. # Device name that's shown in the "WhatsApp Web" section in the mobile app.
  68. os_name: Mautrix-WhatsApp bridge
  69. # Browser name that determines the logo shown in the mobile app.
  70. # Must be "unknown" for a generic icon or a valid browser name if you want a specific icon.
  71. # List of valid browser names: https://github.com/tulir/whatsmeow/blob/8b34d886d543b72e5f4699cf5b2797f68d598f78/binary/proto/def.proto#L38-L51
  72. browser_name: unknown
  73. # Bridge config
  74. bridge:
  75. # Localpart template of MXIDs for WhatsApp users.
  76. # {{ '{{.}}' }} is replaced with the phone number of the WhatsApp user.
  77. username_template: "{{ 'whatsapp_{{.}}' }}"
  78. # Displayname template for WhatsApp users.
  79. # {{ '{{.PushName}}' }} - nickname set by the WhatsApp user
  80. # {{ '{{.BusinessName}}' }} - validated WhatsApp business name
  81. # {{ '{{.Phone}}' }} - phone number (international format)
  82. # The following variables are also available, but will cause problems on multi-user instances:
  83. # {{ '{{.FullName}}' }} - full name from contact list
  84. # {{ '{{.FirstName}}' }} - first name from contact list
  85. displayname_template: "{{ '{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}} (WA)' }}"
  86. # Should the bridge create a space for each logged-in user and add bridged rooms to it?
  87. # Users who logged in before turning this on should run `!wa sync space` to create and fill the space for the first time.
  88. personal_filtering_spaces: {{ matrix_mautrix_whatsapp_bridge_personal_filtering_spaces | to_json }}
  89. # Should the bridge send a read receipt from the bridge bot when a message has been sent to WhatsApp?
  90. delivery_receipts: false
  91. # Whether the bridge should send the message status as a custom com.beeper.message_send_status event.
  92. message_status_events: false
  93. # Whether the bridge should send error notices via m.notice events when a message fails to bridge.
  94. message_error_notices: true
  95. # Should incoming calls send a message to the Matrix room?
  96. call_start_notices: true
  97. # Should another user's cryptographic identity changing send a message to Matrix?
  98. identity_change_notices: false
  99. portal_message_buffer: 128
  100. # Settings for handling history sync payloads.
  101. history_sync:
  102. # Should the bridge create portals for chats in the history sync payload?
  103. create_portals: true
  104. # Enable backfilling history sync payloads from WhatsApp using batch sending?
  105. # This requires a server with MSC2716 support, which is currently an experimental feature in synapse.
  106. # It can be enabled by setting experimental_features -> msc2716_enabled to true in homeserver.yaml.
  107. # Note that prior to Synapse 1.49, there were some bugs with the implementation, especially if using event persistence workers.
  108. # There are also still some issues in Synapse's federation implementation.
  109. backfill: false
  110. # Use double puppets for backfilling?
  111. # In order to use this, the double puppets must be in the appservice's user ID namespace
  112. # (because the bridge can't use the double puppet access token with batch sending).
  113. # This only affects double puppets on the local server, double puppets on other servers will never be used.
  114. # Doesn't work out of box with this playbook
  115. double_puppet_backfill: false
  116. # Should the bridge request a full sync from the phone when logging in?
  117. # This bumps the size of history syncs from 3 months to 1 year.
  118. request_full_sync: false
  119. # Settings for media requests. If the media expired, then it will not
  120. # be on the WA servers.
  121. # Media can always be requested by reacting with the ♻️ (recycle) emoji.
  122. # These settings determine if the media requests should be done
  123. # automatically during or after backfill.
  124. media_requests:
  125. # Should expired media be automatically requested from the server as
  126. # part of the backfill process?
  127. auto_request_media: true
  128. # Whether to request the media immediately after the media message
  129. # is backfilled ("immediate") or at a specific time of the day
  130. # ("local_time").
  131. request_method: immediate
  132. # If request_method is "local_time", what time should the requests
  133. # be sent (in minutes after midnight)?
  134. request_local_time: 120
  135. # The maximum number of initial conversations that should be synced.
  136. # Other conversations will be backfilled on demand when the start PM
  137. # provisioning endpoint is used or when a message comes in from that
  138. # chat.
  139. max_initial_conversations: -1
  140. # Settings for immediate backfills. These backfills should generally be
  141. # small and their main purpose is to populate each of the initial chats
  142. # (as configured by max_initial_conversations) with a few messages so
  143. # that you can continue conversations without loosing context.
  144. immediate:
  145. # The number of concurrent backfill workers to create for immediate
  146. # backfills. Note that using more than one worker could cause the
  147. # room list to jump around since there are no guarantees about the
  148. # order in which the backfills will complete.
  149. worker_count: 1
  150. # The maximum number of events to backfill initially.
  151. max_events: 10
  152. # Settings for deferred backfills. The purpose of these backfills are
  153. # to fill in the rest of the chat history that was not covered by the
  154. # immediate backfills. These backfills generally should happen at a
  155. # slower pace so as not to overload the homeserver.
  156. # Each deferred backfill config should define a "stage" of backfill
  157. # (i.e. the last week of messages). The fields are as follows:
  158. # - start_days_ago: the number of days ago to start backfilling from.
  159. # To indicate the start of time, use -1. For example, for a week ago, use 7.
  160. # - max_batch_events: the number of events to send per batch.
  161. # - batch_delay: the number of seconds to wait before backfilling each batch.
  162. deferred:
  163. # Last Week
  164. - start_days_ago: 7
  165. max_batch_events: 20
  166. batch_delay: 5
  167. # Last Month
  168. - start_days_ago: 30
  169. max_batch_events: 50
  170. batch_delay: 10
  171. # Last 3 months
  172. - start_days_ago: 90
  173. max_batch_events: 100
  174. batch_delay: 10
  175. # The start of time
  176. - start_days_ago: -1
  177. max_batch_events: 500
  178. batch_delay: 10
  179. # Should puppet avatars be fetched from the server even if an avatar is already set?
  180. user_avatar_sync: true
  181. # Should Matrix users leaving groups be bridged to WhatsApp?
  182. bridge_matrix_leave: true
  183. # Should the bridge sync with double puppeting to receive EDUs that aren't normally sent to appservices.
  184. sync_with_custom_puppets: true
  185. # Should the bridge update the m.direct account data event when double puppeting is enabled.
  186. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  187. # and is therefore prone to race conditions.
  188. sync_direct_chat_list: false
  189. # Should the bridge use MSC2867 to bridge manual "mark as unread"s from
  190. # WhatsApp and set the unread status on initial backfill?
  191. # This will only work on clients that support the m.marked_unread or
  192. # com.famedly.marked_unread room account data.
  193. sync_manual_marked_unread: true
  194. # When double puppeting is enabled, users can use `!wa toggle` to change whether
  195. # presence and read receipts are bridged. These settings set the default values.
  196. # Existing users won't be affected when these are changed.
  197. default_bridge_receipts: true
  198. default_bridge_presence: true
  199. # Send the presence as "available" to whatsapp when users start typing on a portal.
  200. # This works as a workaround for homeservers that do not support presence, and allows
  201. # users to see when the whatsapp user on the other side is typing during a conversation.
  202. send_presence_on_typing: false
  203. # Should the bridge always send "active" delivery receipts (two gray ticks on WhatsApp)
  204. # even if the user isn't marked as online (e.g. when presence bridging isn't enabled)?
  205. #
  206. # By default, the bridge acts like WhatsApp web, which only sends active delivery
  207. # receipts when it's in the foreground.
  208. force_active_delivery_receipts: false
  209. # Servers to always allow double puppeting from
  210. double_puppet_server_map:
  211. "{{ matrix_mautrix_whatsapp_homeserver_domain }}": {{ matrix_mautrix_whatsapp_homeserver_address }}
  212. # Allow using double puppeting from any server with a valid client .well-known file.
  213. double_puppet_allow_discovery: false
  214. # Shared secrets for https://github.com/devture/matrix-synapse-shared-secret-auth
  215. #
  216. # If set, double puppeting will be enabled automatically for local users
  217. # instead of users having to find an access token and run `login-matrix`
  218. # manually.
  219. login_shared_secret_map: {{ matrix_mautrix_whatsapp_bridge_login_shared_secret_map|to_json }}
  220. # Should the bridge explicitly set the avatar and room name for private chat portal rooms?
  221. private_chat_portal_meta: false
  222. # Should Matrix m.notice-type messages be bridged?
  223. bridge_notices: true
  224. # Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
  225. # This field will automatically be changed back to false after it, except if the config file is not writable.
  226. resend_bridge_info: false
  227. # When using double puppeting, should muted chats be muted in Matrix?
  228. mute_bridging: {{ matrix_mautrix_whatsapp_bridge_mute_bridging | to_json }}
  229. # When using double puppeting, should archived chats be moved to a specific tag in Matrix?
  230. # Note that WhatsApp unarchives chats when a message is received, which will also be mirrored to Matrix.
  231. # This can be set to a tag (e.g. m.lowpriority), or null to disable.
  232. archive_tag: null
  233. # Same as above, but for pinned chats. The favorite tag is called m.favourite
  234. pinned_tag: null
  235. # Should mute status and tags only be bridged when the portal room is created?
  236. tag_only_on_create: true
  237. # Should WhatsApp status messages be bridged into a Matrix room?
  238. # Disabling this won't affect already created status broadcast rooms.
  239. enable_status_broadcast: {{ matrix_mautrix_whatsapp_bridge_enable_status_broadcast | to_json }}
  240. # Should sending WhatsApp status messages be allowed?
  241. # This can cause issues if the user has lots of contacts, so it's disabled by default.
  242. disable_status_broadcast_send: true
  243. # Should the status broadcast room be muted and moved into low priority by default?
  244. # This is only applied when creating the room, the user can unmute it later.
  245. mute_status_broadcast: true
  246. # Tag to apply to the status broadcast room.
  247. status_broadcast_tag: m.lowpriority
  248. # Should the bridge use thumbnails from WhatsApp?
  249. # They're disabled by default due to very low resolution.
  250. whatsapp_thumbnail: false
  251. # Allow invite permission for user. User can invite any bots to room with whatsapp
  252. # users (private chat and groups)
  253. allow_user_invite: {{ matrix_mautrix_whatsapp_bridge_allow_user_invite | to_json }}
  254. # Whether or not created rooms should have federation enabled.
  255. # If false, created portal rooms will never be federated.
  256. federate_rooms: {{ matrix_mautrix_whatsapp_federate_rooms|to_json }}
  257. # Whether to enable disappearing messages in groups. If enabled, then the expiration time of
  258. # the messages will be determined by the first user to read the message, rather than individually.
  259. # If the bridge only has a single user, this can be turned on safely.
  260. disappearing_messages_in_groups: false
  261. # Should the bridge never send alerts to the bridge management room?
  262. # These are mostly things like the user being logged out.
  263. disable_bridge_alerts: false
  264. # Should the bridge detect URLs in outgoing messages, ask the homeserver to generate a preview,
  265. # and send it to WhatsApp? URL previews can always be sent using the `com.beeper.linkpreviews`
  266. # key in the event content even if this is disabled.
  267. url_previews: false
  268. # Send captions in the same message as images. This will send data compatible with both MSC2530 and MSC3552.
  269. # This is currently not supported in most clients.
  270. caption_in_message: false
  271. # Maximum time for handling Matrix events. Duration strings formatted for https://pkg.go.dev/time#ParseDuration
  272. # Null means there's no enforced timeout.
  273. message_handling_timeout:
  274. # Send an error message after this timeout, but keep waiting for the response until the deadline.
  275. # This is counted from the origin_server_ts, so the warning time is consistent regardless of the source of delay.
  276. # If the message is older than this when it reaches the bridge, the message won't be handled at all.
  277. error_after: null
  278. # Drop messages after this timeout. They may still go through if the message got sent to the servers.
  279. # This is counted from the time the bridge starts handling the message.
  280. deadline: 120s
  281. # The prefix for commands. Only required in non-management rooms.
  282. command_prefix: "{{ matrix_mautrix_whatsapp_command_prefix }}"
  283. # Messages sent upon joining a management room.
  284. # Markdown is supported. The defaults are listed below.
  285. management_room_text:
  286. # Sent when joining a room.
  287. welcome: "Hello, I'm a WhatsApp bridge bot."
  288. # Sent when joining a management room and the user is already logged in.
  289. welcome_connected: "Use `help` for help."
  290. # Sent when joining a management room and the user is not logged in.
  291. welcome_unconnected: "Use `help` for help or `login` to log in."
  292. # Optional extra text sent when joining a management room.
  293. additional_help: ""
  294. # End-to-bridge encryption support options.
  295. #
  296. # See https://docs.mau.fi/bridges/general/end-to-bridge-encryption.html for more info.
  297. encryption:
  298. # Allow encryption, work in group chat rooms with e2ee enabled
  299. allow: {{ matrix_mautrix_whatsapp_bridge_encryption_allow|to_json }}
  300. # Default to encryption, force-enable encryption in all portals the bridge creates
  301. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  302. # It is recommended to also set private_chat_portal_meta to true when using this.
  303. default: {{ matrix_mautrix_whatsapp_bridge_encryption_default|to_json }}
  304. # Require encryption, drop any unencrypted messages.
  305. require: false
  306. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  307. # You must use a client that supports requesting keys from other users to use this feature.
  308. allow_key_sharing: {{ matrix_mautrix_whatsapp_bridge_encryption_key_sharing_allow|to_json }}
  309. # What level of device verification should be required from users?
  310. #
  311. # Valid levels:
  312. # unverified - Send keys to all device in the room.
  313. # cross-signed-untrusted - Require valid cross-signing, but trust all cross-signing keys.
  314. # cross-signed-tofu - Require valid cross-signing, trust cross-signing keys on first use (and reject changes).
  315. # cross-signed-verified - Require valid cross-signing, plus a valid user signature from the bridge bot.
  316. # Note that creating user signatures from the bridge bot is not currently possible.
  317. # verified - Require manual per-device verification
  318. # (currently only possible by modifying the `trust` column in the `crypto_device` database table).
  319. verification_levels:
  320. # Minimum level for which the bridge should send keys to when bridging messages from WhatsApp to Matrix.
  321. receive: unverified
  322. # Minimum level that the bridge should accept for incoming Matrix messages.
  323. send: unverified
  324. # Minimum level that the bridge should require for accepting key requests.
  325. share: cross-signed-tofu
  326. # Options for Megolm room key rotation. These options allow you to
  327. # configure the m.room.encryption event content. See:
  328. # https://spec.matrix.org/v1.3/client-server-api/#mroomencryption for
  329. # more information about that event.
  330. rotation:
  331. # Enable custom Megolm room key rotation settings. Note that these
  332. # settings will only apply to rooms created after this option is
  333. # set.
  334. enable_custom: false
  335. # The maximum number of milliseconds a session should be used
  336. # before changing it. The Matrix spec recommends 604800000 (a week)
  337. # as the default.
  338. milliseconds: 604800000
  339. # The maximum number of messages that should be sent with a given a
  340. # session before changing it. The Matrix spec recommends 100 as the
  341. # default.
  342. messages: 100
  343. # Settings for provisioning API
  344. provisioning:
  345. # Prefix for the provisioning API paths.
  346. prefix: /_matrix/provision
  347. # Shared secret for authentication. If set to "generate", a random secret will be generated,
  348. # or if set to "disable", the provisioning API will be disabled.
  349. shared_secret: generate
  350. # Permissions for using the bridge.
  351. # Permitted values:
  352. # relay - Talk through the relaybot (if enabled), no access otherwise
  353. # user - Access to use the bridge to chat with a WhatsApp account.
  354. # admin - User level and some additional administration tools
  355. # Permitted keys:
  356. # * - All Matrix users
  357. # domain - All users on that homeserver
  358. # mxid - Specific user
  359. permissions: {{ matrix_mautrix_whatsapp_bridge_permissions|to_json }}
  360. # Settings for relay mode
  361. relay:
  362. # Whether relay mode should be allowed. If allowed, `!wa set-relay` can be used to turn any
  363. # authenticated user into a relaybot for that chat.
  364. enabled: false
  365. # Should only admins be allowed to set themselves as relay users?
  366. admin_only: true
  367. # The formats to use when sending messages to WhatsApp via the relaybot.
  368. message_formats:
  369. m.text: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: {{ '{{ .Message }}' }}"
  370. m.notice: "<b>{{ '{{ .Sender.Displayname }}' }}</b>:: {{ '{{ .Message }}' }}"
  371. m.emote: "* <b>{{ '{{ .Sender.Displayname }}' }}</b>: {{ '{{ .Message }}' }}"
  372. m.file: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a file"
  373. m.image: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent an image"
  374. m.audio: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent an audio file"
  375. m.video: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a video"
  376. m.location: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: sent a location"
  377. # Logging config.
  378. logging:
  379. # The directory for log files. Will be created if not found.
  380. directory: ./logs
  381. # Available variables: .Date for the file date and .Index for different log files on the same day.
  382. # Set this to null to disable logging to file.
  383. file_name_format: null
  384. # Date format for file names in the Go time format: https://golang.org/pkg/time/#pkg-constants
  385. file_date_format: "2006-01-02"
  386. # Log file permissions.
  387. file_mode: 0o600
  388. # Timestamp format for log entries in the Go time format.
  389. timestamp_format: "Jan _2, 2006 15:04:05"
  390. # Minimum severity for log messages printed to stdout/stderr. This doesn't affect the log file.
  391. # Options: debug, info, warn, error, fatal
  392. print_level: {{ matrix_mautrix_whatsapp_logging_level }}