example-config.yaml 9.4 KB

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