example-config.yaml 8.5 KB

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