example-config.yaml 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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. # Directory where signald stores auth data. Used to delete data when logging out.
  61. data_dir: ~/.config/signald/data
  62. # Whether or not message attachments should be removed from disk after they're bridged.
  63. remove_file_after_handling: true
  64. # Bridge config
  65. bridge:
  66. # Localpart template of MXIDs for Signal users.
  67. # {userid} is replaced with an identifier for the Signal user.
  68. username_template: "signal_{userid}"
  69. # Displayname template for Signal users.
  70. # {displayname} is replaced with the displayname of the Signal user, which is the first
  71. # available variable in displayname_preference. The variables in displayname_preference
  72. # can also be used here directly.
  73. displayname_template: "{displayname} (Signal)"
  74. # Whether or not contact list displaynames should be used.
  75. # Using this isn't recommended on multi-user instances.
  76. allow_contact_list_name_updates: false
  77. # Available variables: full_name, first_name, last_name, phone, uuid
  78. displayname_preference:
  79. - full_name
  80. - phone
  81. # Whether or not to create portals for all groups on login/connect.
  82. autocreate_group_portal: true
  83. # Whether or not to create portals for all contacts on login/connect.
  84. autocreate_contact_portal: false
  85. # Whether or not to use /sync to get read receipts and typing notifications
  86. # when double puppeting is enabled
  87. sync_with_custom_puppets: true
  88. # Whether or not to update the m.direct account data event when double puppeting is enabled.
  89. # Note that updating the m.direct event is not atomic (except with mautrix-asmux)
  90. # and is therefore prone to race conditions.
  91. sync_direct_chat_list: false
  92. # Allow using double puppeting from any server with a valid client .well-known file.
  93. double_puppet_allow_discovery: false
  94. # Servers to allow double puppeting from, even if double_puppet_allow_discovery is false.
  95. double_puppet_server_map:
  96. example.com: https://example.com
  97. # Shared secret for https://github.com/devture/matrix-synapse-shared-secret-auth
  98. #
  99. # If set, custom puppets will be enabled automatically for local users
  100. # instead of users having to find an access token and run `login-matrix`
  101. # manually.
  102. # If using this for other servers than the bridge's server,
  103. # you must also set the URL in the double_puppet_server_map.
  104. login_shared_secret_map:
  105. example.com: foo
  106. # Whether or not created rooms should have federation enabled.
  107. # If false, created portal rooms will never be federated.
  108. federate_rooms: true
  109. # End-to-bridge encryption support options. You must install the e2be optional dependency for
  110. # this to work. See https://github.com/tulir/mautrix-telegram/wiki/End‐to‐bridge-encryption
  111. encryption:
  112. # Allow encryption, work in group chat rooms with e2ee enabled
  113. allow: false
  114. # Default to encryption, force-enable encryption in all portals the bridge creates
  115. # This will cause the bridge bot to be in private chats for the encryption to work properly.
  116. default: false
  117. # Options for automatic key sharing.
  118. key_sharing:
  119. # Enable key sharing? If enabled, key requests for rooms where users are in will be fulfilled.
  120. # You must use a client that supports requesting keys from other users to use this feature.
  121. allow: false
  122. # Require the requesting device to have a valid cross-signing signature?
  123. # This doesn't require that the bridge has verified the device, only that the user has verified it.
  124. # Not yet implemented.
  125. require_cross_signing: false
  126. # Require devices to be verified by the bridge?
  127. # Verification by the bridge is not yet implemented.
  128. require_verification: true
  129. # Whether or not to explicitly set the avatar and room name for private
  130. # chat portal rooms. This will be implicitly enabled if encryption.default is true.
  131. private_chat_portal_meta: false
  132. # Whether or not the bridge should send a read receipt from the bridge bot when a message has
  133. # been sent to Signal. This let's you check manually whether the bridge is receiving your
  134. # messages.
  135. # Note that this is not related to Signal delivery receipts.
  136. delivery_receipts: false
  137. # Whether or not delivery errors should be reported as messages in the Matrix room. (not yet implemented)
  138. delivery_error_reports: false
  139. # Set this to true to tell the bridge to re-send m.bridge events to all rooms on the next run.
  140. # This field will automatically be changed back to false after it,
  141. # except if the config file is not writable.
  142. resend_bridge_info: false
  143. # Provisioning API part of the web server for automated portal creation and fetching information.
  144. # Used by things like mautrix-manager (https://github.com/tulir/mautrix-manager).
  145. provisioning:
  146. # Whether or not the provisioning API should be enabled.
  147. enabled: true
  148. # The prefix to use in the provisioning API endpoints.
  149. prefix: /_matrix/provision/v1
  150. # The shared secret to authorize users of the API.
  151. # Set to "generate" to generate and save a new token.
  152. shared_secret: generate
  153. # The prefix for commands. Only required in non-management rooms.
  154. command_prefix: "!signal"
  155. # Permissions for using the bridge.
  156. # Permitted values:
  157. # user - Use the bridge with puppeting.
  158. # admin - Use and administrate the bridge.
  159. # Permitted keys:
  160. # * - All Matrix users
  161. # domain - All users on that homeserver
  162. # mxid - Specific user
  163. permissions:
  164. "example.com": "user"
  165. "@admin:example.com": "admin"
  166. # Python logging configuration.
  167. #
  168. # See section 16.7.2 of the Python documentation for more info:
  169. # https://docs.python.org/3.6/library/logging.config.html#configuration-dictionary-schema
  170. logging:
  171. version: 1
  172. formatters:
  173. colored:
  174. (): mautrix_signal.util.ColorFormatter
  175. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  176. normal:
  177. format: "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
  178. handlers:
  179. file:
  180. class: logging.handlers.RotatingFileHandler
  181. formatter: normal
  182. filename: ./mautrix-signal.log
  183. maxBytes: 10485760
  184. backupCount: 10
  185. console:
  186. class: logging.StreamHandler
  187. formatter: colored
  188. loggers:
  189. mau:
  190. level: DEBUG
  191. aiohttp:
  192. level: INFO
  193. root:
  194. level: DEBUG
  195. handlers: [file, console]