example-config.yaml 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. # Homeserver details
  2. homeserver:
  3. # The address that this appservice can use to connect to the homeserver.
  4. address: https://example.com
  5. # The domain of the homeserver (for MXIDs, etc).
  6. domain: example.com
  7. # Whether or not to verify the SSL certificate of the homeserver.
  8. # Only applies if address starts with https://
  9. verify_ssl: true
  10. asmux: false
  11. # Application service host/registration related details
  12. # Changing these values requires regeneration of the registration.
  13. appservice:
  14. # The address that the homeserver can use to connect to this appservice.
  15. address: http://localhost:29328
  16. # When using https:// the TLS certificate and key files for the address.
  17. tls_cert: false
  18. tls_key: false
  19. # The hostname and port where this appservice should listen.
  20. hostname: 0.0.0.0
  21. port: 29328
  22. # The maximum body size of appservice API requests (from the homeserver) in mebibytes
  23. # Usually 1 is enough, but on high-traffic bridges you might need to increase this to avoid 413s
  24. max_body_size: 1
  25. # The full URI to the database. Only Postgres is currently supported.
  26. database: postgres://username:password@hostname/db
  27. # The unique ID of this appservice.
  28. id: signal
  29. # Username of the appservice bot.
  30. bot_username: signalbot
  31. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  32. # to leave display name/avatar as-is.
  33. bot_displayname: Signal bridge bot
  34. bot_avatar: mxc://maunium.net/wPJgTQbZOtpBFmDNkiNEMDUp
  35. # Community ID for bridged users (changes registration file) and rooms.
  36. # Must be created manually.
  37. #
  38. # Example: "+signal:example.com". Set to false to disable.
  39. community_id: false
  40. # Whether or not to receive ephemeral events via appservice transactions.
  41. # Requires MSC2409 support (i.e. Synapse 1.22+).
  42. # You should disable bridge -> sync_with_custom_puppets when this is enabled.
  43. ephemeral_events: false
  44. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  45. as_token: "This value is generated when generating the registration"
  46. hs_token: "This value is generated when generating the registration"
  47. # Prometheus telemetry config. Requires prometheus-client to be installed.
  48. metrics:
  49. enabled: false
  50. listen_port: 8000
  51. signal:
  52. # Path to signald unix socket
  53. socket_path: /var/run/signald/signald.sock
  54. # Directory for temp files when sending files to Signal. This should be an
  55. # absolute path that signald can read. For attachments in the other direction,
  56. # make sure signald is configured to use an absolute path as the data directory.
  57. outgoing_attachment_dir: /tmp
  58. # Directory where signald stores avatars for groups.
  59. avatar_dir: ~/.config/signald/avatars
  60. # Whether or not message attachments should be removed from disk after they're bridged.
  61. remove_file_after_handling: true
  62. # Bridge config
  63. bridge:
  64. # Localpart template of MXIDs for Signal users.
  65. # {userid} is replaced with an identifier for the Signal user.
  66. username_template: "signal_{userid}"
  67. # Displayname template for Signal users.
  68. # {displayname} is replaced with the displayname of the Signal user, which is the first
  69. # available variable in displayname_preference. The variables in displayname_preference
  70. # can also be used here directly.
  71. displayname_template: "{displayname} (Signal)"
  72. # Whether or not contact list displaynames should be used.
  73. # Using this isn't recommended on multi-user instances.
  74. allow_contact_list_name_updates: false
  75. # Available variables: full_name, first_name, last_name, phone, uuid
  76. displayname_preference:
  77. - full_name
  78. - phone
  79. # Whether or not to create portals for all groups on login/connect.
  80. autocreate_group_portal: true
  81. # Whether or not to create portals for all contacts on login/connect.
  82. autocreate_contact_portal: false
  83. # Whether or not to use /sync to get read receipts and typing notifications
  84. # when double puppeting is enabled
  85. sync_with_custom_puppets: true
  86. # Whether or not to update the m.direct account data event when double puppeting is enabled.
  87. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  88. # and is therefore prone to race conditions.
  89. sync_direct_chat_list: false
  90. # Allow using double puppeting from any server with a valid client .well-known file.
  91. double_puppet_allow_discovery: false
  92. # Servers to allow double puppeting from, even if double_puppet_allow_discovery is false.
  93. double_puppet_server_map:
  94. example.com: https://example.com
  95. # Shared secret for https://github.com/devture/matrix-synapse-shared-secret-auth
  96. #
  97. # If set, custom puppets will be enabled automatically for local users
  98. # instead of users having to find an access token and run `login-matrix`
  99. # manually.
  100. # If using this for other servers than the bridge's server,
  101. # you must also set the URL in the double_puppet_server_map.
  102. login_shared_secret_map:
  103. example.com: foo
  104. # Whether or not created rooms should have federation enabled.
  105. # If false, created portal rooms will never be federated.
  106. federate_rooms: true
  107. # End-to-bridge encryption support options. These require matrix-nio to be installed with pip
  108. # and login_shared_secret to be configured in order to get a device for the bridge bot.
  109. #
  110. # Additionally, https://github.com/matrix-org/synapse/pull/5758 is required if using a normal
  111. # application service.
  112. encryption:
  113. # Allow encryption, work in group chat rooms with e2ee enabled
  114. allow: false
  115. # Default to encryption, force-enable encryption in all portals the bridge creates
  116. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  117. default: false
  118. # Options for automatic key sharing.
  119. key_sharing:
  120. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  121. # You must use a client that supports requesting keys from other users to use this feature.
  122. allow: false
  123. # Require the requesting device to have a valid cross-signing signature?
  124. # This doesn't require that the bridge has verified the device, only that the user has verified it.
  125. # Not yet implemented.
  126. require_cross_signing: false
  127. # Require devices to be verified by the bridge?
  128. # Verification by the bridge is not yet implemented.
  129. require_verification: true
  130. # Whether or not to explicitly set the avatar and room name for private
  131. # chat portal rooms. This will be implicitly enabled if encryption.default is true.
  132. private_chat_portal_meta: false
  133. # Whether or not the bridge should send a read receipt from the bridge bot when a message has
  134. # been sent to Signal. This let's you check manually whether the bridge is receiving your
  135. # messages.
  136. # Note that this is not related to Signal delivery receipts.
  137. delivery_receipts: false
  138. # Whether or not delivery errors should be reported as messages in the Matrix room. (not yet implemented)
  139. delivery_error_reports: false
  140. # Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
  141. # This field will automatically be changed back to false after it,
  142. # except if the config file is not writable.
  143. resend_bridge_info: false
  144. # Provisioning API part of the web server for automated portal creation and fetching information.
  145. # Used by things like mautrix-manager (https://github.com/tulir/mautrix-manager).
  146. provisioning:
  147. # Whether or not the provisioning API should be enabled.
  148. enabled: true
  149. # The prefix to use in the provisioning API endpoints.
  150. prefix: /_matrix/provision/v1
  151. # The shared secret to authorize users of the API.
  152. # Set to "generate" to generate and save a new token.
  153. shared_secret: generate
  154. # The prefix for commands. Only required in non-management rooms.
  155. command_prefix: "!signal"
  156. # Permissions for using the bridge.
  157. # Permitted values:
  158. # user - Use the bridge with puppeting.
  159. # admin - Use and administrate the bridge.
  160. # Permitted keys:
  161. # * - All Matrix users
  162. # domain - All users on that homeserver
  163. # mxid - Specific user
  164. permissions:
  165. "example.com": "user"
  166. "@admin:example.com": "admin"
  167. # Python logging configuration.
  168. #
  169. # See section 16.7.2 of the Python documentation for more info:
  170. # https://docs.python.org/3.6/library/logging.config.html#configuration-dictionary-schema
  171. logging:
  172. version: 1
  173. formatters:
  174. colored:
  175. (): mautrix_signal.util.ColorFormatter
  176. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  177. normal:
  178. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  179. handlers:
  180. file:
  181. class: logging.handlers.RotatingFileHandler
  182. formatter: normal
  183. filename: ./mautrix-signal.log
  184. maxBytes: 10485760
  185. backupCount: 10
  186. console:
  187. class: logging.StreamHandler
  188. formatter: colored
  189. loggers:
  190. mau:
  191. level: DEBUG
  192. aiohttp:
  193. level: INFO
  194. root:
  195. level: DEBUG
  196. handlers: [file, console]