example-config.yaml 9.6 KB

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