Twissel

Matrix Synapse

Dec 11th, 2020
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 92.02 KB | None | 0 0
  1. # Configuration file for Synapse.
  2. #
  3. # This is a YAML file: see [1] for a quick introduction. Note in particular
  4. # that *indentation is important*: all the elements of a list or dictionary
  5. # should have the same indentation.
  6. #
  7. # [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
  8.  
  9. ## Server ##
  10.  
  11. # The public-facing domain of the server
  12. #
  13. # The server_name name will appear at the end of usernames and room addresses
  14. # created on this server. For example if the server_name was example.com,
  15. # usernames on this server would be in the format @user:example.com
  16. #
  17. # In most cases you should avoid using a matrix specific subdomain such as
  18. # matrix.example.com or synapse.example.com as the server_name for the same
  19. # reasons you wouldn't use user@email.example.com as your email address.
  20. # See https://github.com/matrix-org/synapse/blob/master/docs/delegate.md
  21. # for information on how to host Synapse on a subdomain while preserving
  22. # a clean server_name.
  23. #
  24. # The server_name cannot be changed later so it is important to
  25. # configure this correctly before you start Synapse. It should be all
  26. # lowercase and may contain an explicit port.
  27. # Examples: matrix.org, localhost:8080
  28. #
  29. #
  30. # This is set in /etc/matrix-synapse/conf.d/server_name.yaml for Debian installations.
  31. # server_name: "SERVERNAME"
  32.  
  33. # When running as a daemon, the file to store the pid in
  34. #
  35. pid_file: "/var/run/matrix-synapse.pid"
  36.  
  37. # The absolute URL to the web client which /_matrix/client will redirect
  38. # to if 'webclient' is configured under the 'listeners' configuration.
  39. #
  40. # This option can be also set to the filesystem path to the web client
  41. # which will be served at /_matrix/client/ if 'webclient' is configured
  42. # under the 'listeners' configuration, however this is a security risk:
  43. # https://github.com/matrix-org/synapse#security-note
  44. #
  45. #web_client_location: https://riot.example.com/
  46.  
  47. # The public-facing base URL that clients use to access this HS
  48. # (not including _matrix/...). This is the same URL a user would
  49. # enter into the 'custom HS URL' field on their client. If you
  50. # use synapse with a reverse proxy, this should be the URL to reach
  51. # synapse via the proxy.
  52. #
  53. #public_baseurl: https://example.com/
  54.  
  55. # Set the soft limit on the number of file descriptors synapse can use
  56. # Zero is used to indicate synapse should set the soft limit to the
  57. # hard limit.
  58. #
  59. #soft_file_limit: 0
  60.  
  61. # Set to false to disable presence tracking on this homeserver.
  62. #
  63. #use_presence: false
  64.  
  65. # Whether to require authentication to retrieve profile data (avatars,
  66. # display names) of other users through the client API. Defaults to
  67. # 'false'. Note that profile data is also available via the federation
  68. # API, so this setting is of limited value if federation is enabled on
  69. # the server.
  70. #
  71. #require_auth_for_profile_requests: true
  72.  
  73. # Uncomment to require a user to share a room with another user in order
  74. # to retrieve their profile information. Only checked on Client-Server
  75. # requests. Profile requests from other servers should be checked by the
  76. # requesting server. Defaults to 'false'.
  77. #
  78. #limit_profile_requests_to_users_who_share_rooms: true
  79.  
  80. # If set to 'true', removes the need for authentication to access the server's
  81. # public rooms directory through the client API, meaning that anyone can
  82. # query the room directory. Defaults to 'false'.
  83. #
  84. #allow_public_rooms_without_auth: true
  85.  
  86. # If set to 'true', allows any other homeserver to fetch the server's public
  87. # rooms directory via federation. Defaults to 'false'.
  88. #
  89. #allow_public_rooms_over_federation: true
  90.  
  91. # The default room version for newly created rooms.
  92. #
  93. # Known room versions are listed here:
  94. # https://matrix.org/docs/spec/#complete-list-of-room-versions
  95. #
  96. # For example, for room version 1, default_room_version should be set
  97. # to "1".
  98. #
  99. #default_room_version: "6"
  100.  
  101. # The GC threshold parameters to pass to `gc.set_threshold`, if defined
  102. #
  103. #gc_thresholds: [700, 10, 10]
  104.  
  105. # Set the limit on the returned events in the timeline in the get
  106. # and sync operations. The default value is 100. -1 means no upper limit.
  107. #
  108. # Uncomment the following to increase the limit to 5000.
  109. #
  110. #filter_timeline_limit: 5000
  111.  
  112. # Whether room invites to users on this server should be blocked
  113. # (except those sent by local server admins). The default is False.
  114. #
  115. #block_non_admin_invites: true
  116.  
  117. # Room searching
  118. #
  119. # If disabled, new messages will not be indexed for searching and users
  120. # will receive errors when searching for messages. Defaults to enabled.
  121. #
  122. #enable_search: false
  123.  
  124. # List of ports that Synapse should listen on, their purpose and their
  125. # configuration.
  126. #
  127. # Options for each listener include:
  128. #
  129. # port: the TCP port to bind to
  130. #
  131. # bind_addresses: a list of local addresses to listen on. The default is
  132. # 'all local interfaces'.
  133. #
  134. # type: the type of listener. Normally 'http', but other valid options are:
  135. # 'manhole' (see docs/manhole.md),
  136. # 'metrics' (see docs/metrics-howto.md),
  137. # 'replication' (see docs/workers.md).
  138. #
  139. # tls: set to true to enable TLS for this listener. Will use the TLS
  140. # key/cert specified in tls_private_key_path / tls_certificate_path.
  141. #
  142. # x_forwarded: Only valid for an 'http' listener. Set to true to use the
  143. # X-Forwarded-For header as the client IP. Useful when Synapse is
  144. # behind a reverse-proxy.
  145. #
  146. # resources: Only valid for an 'http' listener. A list of resources to host
  147. # on this port. Options for each resource are:
  148. #
  149. # names: a list of names of HTTP resources. See below for a list of
  150. # valid resource names.
  151. #
  152. # compress: set to true to enable HTTP compression for this resource.
  153. #
  154. # additional_resources: Only valid for an 'http' listener. A map of
  155. # additional endpoints which should be loaded via dynamic modules.
  156. #
  157. # Valid resource names are:
  158. #
  159. # client: the client-server API (/_matrix/client), and the synapse admin
  160. # API (/_synapse/admin). Also implies 'media' and 'static'.
  161. #
  162. # consent: user consent forms (/_matrix/consent). See
  163. # docs/consent_tracking.md.
  164. #
  165. # federation: the server-server API (/_matrix/federation). Also implies
  166. # 'media', 'keys', 'openid'
  167. #
  168. # keys: the key discovery API (/_matrix/keys).
  169. #
  170. # media: the media API (/_matrix/media).
  171. #
  172. # metrics: the metrics interface. See docs/metrics-howto.md.
  173. #
  174. # openid: OpenID authentication.
  175. #
  176. # replication: the HTTP replication API (/_synapse/replication). See
  177. # docs/workers.md.
  178. #
  179. # static: static resources under synapse/static (/_matrix/static). (Mostly
  180. # useful for 'fallback authentication'.)
  181. #
  182. # webclient: A web client. Requires web_client_location to be set.
  183. #
  184. listeners:
  185. # TLS-enabled listener: for when matrix traffic is sent directly to synapse.
  186. #
  187. # Disabled by default. To enable it, uncomment the following. (Note that you
  188. # will also need to give Synapse a TLS key and certificate: see the TLS section
  189. # below.)
  190. #
  191. #- port: 8448
  192. # type: http
  193. # tls: true
  194. # resources:
  195. # - names: [client, federation]
  196.  
  197. # Unsecure HTTP listener: for when matrix traffic passes through a reverse proxy
  198. # that unwraps TLS.
  199. #
  200. # If you plan to use a reverse proxy, please see
  201. # https://github.com/matrix-org/synapse/blob/master/docs/reverse_proxy.md.
  202. #
  203. - port: 8008
  204. tls: false
  205. type: http
  206. x_forwarded: true
  207. bind_addresses: ['127.0.0.1']
  208.  
  209. resources:
  210. - names: [client, federation]
  211. compress: false
  212.  
  213. # example additional_resources:
  214. #
  215. #additional_resources:
  216. # "/_matrix/my/custom/endpoint":
  217. # module: my_module.CustomRequestHandler
  218. # config: {}
  219.  
  220. # Turn on the twisted ssh manhole service on localhost on the given
  221. # port.
  222. #
  223. #- port: 9000
  224. # bind_addresses: ['::1', '127.0.0.1']
  225. # type: manhole
  226.  
  227. # Forward extremities can build up in a room due to networking delays between
  228. # homeservers. Once this happens in a large room, calculation of the state of
  229. # that room can become quite expensive. To mitigate this, once the number of
  230. # forward extremities reaches a given threshold, Synapse will send an
  231. # org.matrix.dummy_event event, which will reduce the forward extremities
  232. # in the room.
  233. #
  234. # This setting defines the threshold (i.e. number of forward extremities in the
  235. # room) at which dummy events are sent. The default value is 10.
  236. #
  237. #dummy_events_threshold: 5
  238.  
  239.  
  240. ## Homeserver blocking ##
  241.  
  242. # How to reach the server admin, used in ResourceLimitError
  243. #
  244. #admin_contact: 'mailto:admin@server.com'
  245.  
  246. # Global blocking
  247. #
  248. #hs_disabled: false
  249. #hs_disabled_message: 'Human readable reason for why the HS is blocked'
  250.  
  251. # Monthly Active User Blocking
  252. #
  253. # Used in cases where the admin or server owner wants to limit to the
  254. # number of monthly active users.
  255. #
  256. # 'limit_usage_by_mau' disables/enables monthly active user blocking. When
  257. # enabled and a limit is reached the server returns a 'ResourceLimitError'
  258. # with error type Codes.RESOURCE_LIMIT_EXCEEDED
  259. #
  260. # 'max_mau_value' is the hard limit of monthly active users above which
  261. # the server will start blocking user actions.
  262. #
  263. # 'mau_trial_days' is a means to add a grace period for active users. It
  264. # means that users must be active for this number of days before they
  265. # can be considered active and guards against the case where lots of users
  266. # sign up in a short space of time never to return after their initial
  267. # session.
  268. #
  269. # 'mau_limit_alerting' is a means of limiting client side alerting
  270. # should the mau limit be reached. This is useful for small instances
  271. # where the admin has 5 mau seats (say) for 5 specific people and no
  272. # interest increasing the mau limit further. Defaults to True, which
  273. # means that alerting is enabled
  274. #
  275. #limit_usage_by_mau: false
  276. #max_mau_value: 50
  277. #mau_trial_days: 2
  278. #mau_limit_alerting: false
  279.  
  280. # If enabled, the metrics for the number of monthly active users will
  281. # be populated, however no one will be limited. If limit_usage_by_mau
  282. # is true, this is implied to be true.
  283. #
  284. #mau_stats_only: false
  285.  
  286. # Sometimes the server admin will want to ensure certain accounts are
  287. # never blocked by mau checking. These accounts are specified here.
  288. #
  289. #mau_limit_reserved_threepids:
  290. # - medium: 'email'
  291. # address: 'reserved_user@example.com'
  292.  
  293. # Used by phonehome stats to group together related servers.
  294. #server_context: context
  295.  
  296. # Resource-constrained homeserver settings
  297. #
  298. # When this is enabled, the room "complexity" will be checked before a user
  299. # joins a new remote room. If it is above the complexity limit, the server will
  300. # disallow joining, or will instantly leave.
  301. #
  302. # Room complexity is an arbitrary measure based on factors such as the number of
  303. # users in the room.
  304. #
  305. limit_remote_rooms:
  306. # Uncomment to enable room complexity checking.
  307. #
  308. #enabled: true
  309.  
  310. # the limit above which rooms cannot be joined. The default is 1.0.
  311. #
  312. #complexity: 0.5
  313.  
  314. # override the error which is returned when the room is too complex.
  315. #
  316. #complexity_error: "This room is too complex."
  317.  
  318. # allow server admins to join complex rooms. Default is false.
  319. #
  320. #admins_can_join: true
  321.  
  322. # Whether to require a user to be in the room to add an alias to it.
  323. # Defaults to 'true'.
  324. #
  325. #require_membership_for_aliases: false
  326.  
  327. # Whether to allow per-room membership profiles through the send of membership
  328. # events with profile information that differ from the target's global profile.
  329. # Defaults to 'true'.
  330. #
  331. #allow_per_room_profiles: false
  332.  
  333. # How long to keep redacted events in unredacted form in the database. After
  334. # this period redacted events get replaced with their redacted form in the DB.
  335. #
  336. # Defaults to `7d`. Set to `null` to disable.
  337. #
  338. #redaction_retention_period: 28d
  339.  
  340. # How long to track users' last seen time and IPs in the database.
  341. #
  342. # Defaults to `28d`. Set to `null` to disable clearing out of old rows.
  343. #
  344. #user_ips_max_age: 14d
  345.  
  346. # Message retention policy at the server level.
  347. #
  348. # Room admins and mods can define a retention period for their rooms using the
  349. # 'm.room.retention' state event, and server admins can cap this period by setting
  350. # the 'allowed_lifetime_min' and 'allowed_lifetime_max' config options.
  351. #
  352. # If this feature is enabled, Synapse will regularly look for and purge events
  353. # which are older than the room's maximum retention period. Synapse will also
  354. # filter events received over federation so that events that should have been
  355. # purged are ignored and not stored again.
  356. #
  357. retention:
  358. # The message retention policies feature is disabled by default. Uncomment the
  359. # following line to enable it.
  360. #
  361. #enabled: true
  362.  
  363. # Default retention policy. If set, Synapse will apply it to rooms that lack the
  364. # 'm.room.retention' state event. Currently, the value of 'min_lifetime' doesn't
  365. # matter much because Synapse doesn't take it into account yet.
  366. #
  367. #default_policy:
  368. # min_lifetime: 1d
  369. # max_lifetime: 1y
  370.  
  371. # Retention policy limits. If set, and the state of a room contains a
  372. # 'm.room.retention' event in its state which contains a 'min_lifetime' or a
  373. # 'max_lifetime' that's out of these bounds, Synapse will cap the room's policy
  374. # to these limits when running purge jobs.
  375. #
  376. #allowed_lifetime_min: 1d
  377. #allowed_lifetime_max: 1y
  378.  
  379. # Server admins can define the settings of the background jobs purging the
  380. # events which lifetime has expired under the 'purge_jobs' section.
  381. #
  382. # If no configuration is provided, a single job will be set up to delete expired
  383. # events in every room daily.
  384. #
  385. # Each job's configuration defines which range of message lifetimes the job
  386. # takes care of. For example, if 'shortest_max_lifetime' is '2d' and
  387. # 'longest_max_lifetime' is '3d', the job will handle purging expired events in
  388. # rooms whose state defines a 'max_lifetime' that's both higher than 2 days, and
  389. # lower than or equal to 3 days. Both the minimum and the maximum value of a
  390. # range are optional, e.g. a job with no 'shortest_max_lifetime' and a
  391. # 'longest_max_lifetime' of '3d' will handle every room with a retention policy
  392. # which 'max_lifetime' is lower than or equal to three days.
  393. #
  394. # The rationale for this per-job configuration is that some rooms might have a
  395. # retention policy with a low 'max_lifetime', where history needs to be purged
  396. # of outdated messages on a more frequent basis than for the rest of the rooms
  397. # (e.g. every 12h), but not want that purge to be performed by a job that's
  398. # iterating over every room it knows, which could be heavy on the server.
  399. #
  400. # If any purge job is configured, it is strongly recommended to have at least
  401. # a single job with neither 'shortest_max_lifetime' nor 'longest_max_lifetime'
  402. # set, or one job without 'shortest_max_lifetime' and one job without
  403. # 'longest_max_lifetime' set. Otherwise some rooms might be ignored, even if
  404. # 'allowed_lifetime_min' and 'allowed_lifetime_max' are set, because capping a
  405. # room's policy to these values is done after the policies are retrieved from
  406. # Synapse's database (which is done using the range specified in a purge job's
  407. # configuration).
  408. #
  409. #purge_jobs:
  410. # - longest_max_lifetime: 3d
  411. # interval: 12h
  412. # - shortest_max_lifetime: 3d
  413. # interval: 1d
  414.  
  415. # Inhibits the /requestToken endpoints from returning an error that might leak
  416. # information about whether an e-mail address is in use or not on this
  417. # homeserver.
  418. # Note that for some endpoints the error situation is the e-mail already being
  419. # used, and for others the error is entering the e-mail being unused.
  420. # If this option is enabled, instead of returning an error, these endpoints will
  421. # act as if no error happened and return a fake session ID ('sid') to clients.
  422. #
  423. #request_token_inhibit_3pid_errors: true
  424.  
  425. # A list of domains that the domain portion of 'next_link' parameters
  426. # must match.
  427. #
  428. # This parameter is optionally provided by clients while requesting
  429. # validation of an email or phone number, and maps to a link that
  430. # users will be automatically redirected to after validation
  431. # succeeds. Clients can make use this parameter to aid the validation
  432. # process.
  433. #
  434. # The whitelist is applied whether the homeserver or an
  435. # identity server is handling validation.
  436. #
  437. # The default value is no whitelist functionality; all domains are
  438. # allowed. Setting this value to an empty list will instead disallow
  439. # all domains.
  440. #
  441. #next_link_domain_whitelist: ["matrix.org"]
  442.  
  443.  
  444. ## TLS ##
  445.  
  446. # PEM-encoded X509 certificate for TLS.
  447. # This certificate, as of Synapse 1.0, will need to be a valid and verifiable
  448. # certificate, signed by a recognised Certificate Authority.
  449. #
  450. # See 'ACME support' below to enable auto-provisioning this certificate via
  451. # Let's Encrypt.
  452. #
  453. # If supplying your own, be sure to use a `.pem` file that includes the
  454. # full certificate chain including any intermediate certificates (for
  455. # instance, if using certbot, use `fullchain.pem` as your certificate,
  456. # not `cert.pem`).
  457. #
  458. #tls_certificate_path: "/etc/matrix-synapse/SERVERNAME.tls.crt"
  459.  
  460. # PEM-encoded private key for TLS
  461. #
  462. #tls_private_key_path: "/etc/matrix-synapse/SERVERNAME.tls.key"
  463.  
  464. # Whether to verify TLS server certificates for outbound federation requests.
  465. #
  466. # Defaults to `true`. To disable certificate verification, uncomment the
  467. # following line.
  468. #
  469. #federation_verify_certificates: false
  470.  
  471. # The minimum TLS version that will be used for outbound federation requests.
  472. #
  473. # Defaults to `1`. Configurable to `1`, `1.1`, `1.2`, or `1.3`. Note
  474. # that setting this value higher than `1.2` will prevent federation to most
  475. # of the public Matrix network: only configure it to `1.3` if you have an
  476. # entirely private federation setup and you can ensure TLS 1.3 support.
  477. #
  478. #federation_client_minimum_tls_version: 1.2
  479.  
  480. # Skip federation certificate verification on the following whitelist
  481. # of domains.
  482. #
  483. # This setting should only be used in very specific cases, such as
  484. # federation over Tor hidden services and similar. For private networks
  485. # of homeservers, you likely want to use a private CA instead.
  486. #
  487. # Only effective if federation_verify_certicates is `true`.
  488. #
  489. #federation_certificate_verification_whitelist:
  490. # - lon.example.com
  491. # - *.domain.com
  492. # - *.onion
  493.  
  494. # List of custom certificate authorities for federation traffic.
  495. #
  496. # This setting should only normally be used within a private network of
  497. # homeservers.
  498. #
  499. # Note that this list will replace those that are provided by your
  500. # operating environment. Certificates must be in PEM format.
  501. #
  502. #federation_custom_ca_list:
  503. # - myCA1.pem
  504. # - myCA2.pem
  505. # - myCA3.pem
  506.  
  507. # ACME support: This will configure Synapse to request a valid TLS certificate
  508. # for your configured `server_name` via Let's Encrypt.
  509. #
  510. # Note that ACME v1 is now deprecated, and Synapse currently doesn't support
  511. # ACME v2. This means that this feature currently won't work with installs set
  512. # up after November 2019. For more info, and alternative solutions, see
  513. # https://github.com/matrix-org/synapse/blob/master/docs/ACME.md#deprecation-of-acme-v1
  514. #
  515. # Note that provisioning a certificate in this way requires port 80 to be
  516. # routed to Synapse so that it can complete the http-01 ACME challenge.
  517. # By default, if you enable ACME support, Synapse will attempt to listen on
  518. # port 80 for incoming http-01 challenges - however, this will likely fail
  519. # with 'Permission denied' or a similar error.
  520. #
  521. # There are a couple of potential solutions to this:
  522. #
  523. # * If you already have an Apache, Nginx, or similar listening on port 80,
  524. # you can configure Synapse to use an alternate port, and have your web
  525. # server forward the requests. For example, assuming you set 'port: 8009'
  526. # below, on Apache, you would write:
  527. #
  528. # ProxyPass /.well-known/acme-challenge http://localhost:8009/.well-known/acme-challenge
  529. #
  530. # * Alternatively, you can use something like `authbind` to give Synapse
  531. # permission to listen on port 80.
  532. #
  533. acme:
  534. # ACME support is disabled by default. Set this to `true` and uncomment
  535. # tls_certificate_path and tls_private_key_path above to enable it.
  536. #
  537. enabled: false
  538.  
  539. # Endpoint to use to request certificates. If you only want to test,
  540. # use Let's Encrypt's staging url:
  541. # https://acme-staging.api.letsencrypt.org/directory
  542. #
  543. #url: https://acme-v01.api.letsencrypt.org/directory
  544.  
  545. # Port number to listen on for the HTTP-01 challenge. Change this if
  546. # you are forwarding connections through Apache/Nginx/etc.
  547. #
  548. port: 80
  549.  
  550. # Local addresses to listen on for incoming connections.
  551. # Again, you may want to change this if you are forwarding connections
  552. # through Apache/Nginx/etc.
  553. #
  554. bind_addresses: ['::', '0.0.0.0']
  555.  
  556. # How many days remaining on a certificate before it is renewed.
  557. #
  558. reprovision_threshold: 30
  559.  
  560. # The domain that the certificate should be for. Normally this
  561. # should be the same as your Matrix domain (i.e., 'server_name'), but,
  562. # by putting a file at 'https://<server_name>/.well-known/matrix/server',
  563. # you can delegate incoming traffic to another server. If you do that,
  564. # you should give the target of the delegation here.
  565. #
  566. # For example: if your 'server_name' is 'example.com', but
  567. # 'https://example.com/.well-known/matrix/server' delegates to
  568. # 'matrix.example.com', you should put 'matrix.example.com' here.
  569. #
  570. # If not set, defaults to your 'server_name'.
  571. #
  572. domain: matrix.example.com
  573.  
  574. # file to use for the account key. This will be generated if it doesn't
  575. # exist.
  576. #
  577. # If unspecified, we will use CONFDIR/client.key.
  578. #
  579. account_key_file: /var/lib/matrix-synapse/acme_account.key
  580.  
  581. # List of allowed TLS fingerprints for this server to publish along
  582. # with the signing keys for this server. Other matrix servers that
  583. # make HTTPS requests to this server will check that the TLS
  584. # certificates returned by this server match one of the fingerprints.
  585. #
  586. # Synapse automatically adds the fingerprint of its own certificate
  587. # to the list. So if federation traffic is handled directly by synapse
  588. # then no modification to the list is required.
  589. #
  590. # If synapse is run behind a load balancer that handles the TLS then it
  591. # will be necessary to add the fingerprints of the certificates used by
  592. # the loadbalancers to this list if they are different to the one
  593. # synapse is using.
  594. #
  595. # Homeservers are permitted to cache the list of TLS fingerprints
  596. # returned in the key responses up to the "valid_until_ts" returned in
  597. # key. It may be necessary to publish the fingerprints of a new
  598. # certificate and wait until the "valid_until_ts" of the previous key
  599. # responses have passed before deploying it.
  600. #
  601. # You can calculate a fingerprint from a given TLS listener via:
  602. # openssl s_client -connect $host:$port < /dev/null 2> /dev/null |
  603. # openssl x509 -outform DER | openssl sha256 -binary | base64 | tr -d '='
  604. # or by checking matrix.org/federationtester/api/report?server_name=$host
  605. #
  606. #tls_fingerprints: [{"sha256": "<base64_encoded_sha256_fingerprint>"}]
  607.  
  608.  
  609. ## Federation ##
  610.  
  611. # Restrict federation to the following whitelist of domains.
  612. # N.B. we recommend also firewalling your federation listener to limit
  613. # inbound federation traffic as early as possible, rather than relying
  614. # purely on this application-layer restriction. If not specified, the
  615. # default is to whitelist everything.
  616. #
  617. #federation_domain_whitelist:
  618. # - lon.example.com
  619. # - nyc.example.com
  620. # - syd.example.com
  621.  
  622. # Prevent federation requests from being sent to the following
  623. # blacklist IP address CIDR ranges. If this option is not specified, or
  624. # specified with an empty list, no ip range blacklist will be enforced.
  625. #
  626. # As of Synapse v1.4.0 this option also affects any outbound requests to identity
  627. # servers provided by user input.
  628. #
  629. # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly
  630. # listed here, since they correspond to unroutable addresses.)
  631. #
  632. federation_ip_range_blacklist:
  633. - '127.0.0.0/8'
  634. - '10.0.0.0/8'
  635. - '172.16.0.0/12'
  636. - '192.168.0.0/16'
  637. - '100.64.0.0/10'
  638. - '169.254.0.0/16'
  639. - '::1/128'
  640. - 'fe80::/64'
  641. - 'fc00::/7'
  642.  
  643. # Report prometheus metrics on the age of PDUs being sent to and received from
  644. # the following domains. This can be used to give an idea of "delay" on inbound
  645. # and outbound federation, though be aware that any delay can be due to problems
  646. # at either end or with the intermediate network.
  647. #
  648. # By default, no domains are monitored in this way.
  649. #
  650. #federation_metrics_domains:
  651. # - matrix.org
  652. # - example.com
  653.  
  654.  
  655. ## Caching ##
  656.  
  657. # Caching can be configured through the following options.
  658. #
  659. # A cache 'factor' is a multiplier that can be applied to each of
  660. # Synapse's caches in order to increase or decrease the maximum
  661. # number of entries that can be stored.
  662.  
  663. # The number of events to cache in memory. Not affected by
  664. # caches.global_factor.
  665. #
  666. #event_cache_size: 10K
  667.  
  668. caches:
  669. # Controls the global cache factor, which is the default cache factor
  670. # for all caches if a specific factor for that cache is not otherwise
  671. # set.
  672. #
  673. # This can also be set by the "SYNAPSE_CACHE_FACTOR" environment
  674. # variable. Setting by environment variable takes priority over
  675. # setting through the config file.
  676. #
  677. # Defaults to 0.5, which will half the size of all caches.
  678. #
  679. #global_factor: 1.0
  680.  
  681. # A dictionary of cache name to cache factor for that individual
  682. # cache. Overrides the global cache factor for a given cache.
  683. #
  684. # These can also be set through environment variables comprised
  685. # of "SYNAPSE_CACHE_FACTOR_" + the name of the cache in capital
  686. # letters and underscores. Setting by environment variable
  687. # takes priority over setting through the config file.
  688. # Ex. SYNAPSE_CACHE_FACTOR_GET_USERS_WHO_SHARE_ROOM_WITH_USER=2.0
  689. #
  690. # Some caches have '*' and other characters that are not
  691. # alphanumeric or underscores. These caches can be named with or
  692. # without the special characters stripped. For example, to specify
  693. # the cache factor for `*stateGroupCache*` via an environment
  694. # variable would be `SYNAPSE_CACHE_FACTOR_STATEGROUPCACHE=2.0`.
  695. #
  696. per_cache_factors:
  697. #get_users_who_share_room_with_user: 2.0
  698.  
  699.  
  700. ## Database ##
  701.  
  702. # The 'database' setting defines the database that synapse uses to store all of
  703. # its data.
  704. #
  705. # 'name' gives the database engine to use: either 'sqlite3' (for SQLite) or
  706. # 'psycopg2' (for PostgreSQL).
  707. #
  708. # 'args' gives options which are passed through to the database engine,
  709. # except for options starting 'cp_', which are used to configure the Twisted
  710. # connection pool. For a reference to valid arguments, see:
  711. # * for sqlite: https://docs.python.org/3/library/sqlite3.html#sqlite3.connect
  712. # * for postgres: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
  713. # * for the connection pool: https://twistedmatrix.com/documents/current/api/twisted.enterprise.adbapi.ConnectionPool.html#__init__
  714. #
  715. #
  716. # Example SQLite configuration:
  717. #
  718. #database:
  719. # name: sqlite3
  720. # args:
  721. # database: /path/to/homeserver.db
  722. #
  723. #
  724. # Example Postgres configuration:
  725. #
  726. #database:
  727. # name: psycopg2
  728. # args:
  729. # user: synapse_user
  730. # password: secretpassword
  731. # database: synapse
  732. # host: localhost
  733. # cp_min: 5
  734. # cp_max: 10
  735. #
  736. # For more information on using Synapse with Postgres, see `docs/postgres.md`.
  737. #
  738. database:
  739. name: sqlite3
  740. args:
  741. database: /var/lib/matrix-synapse/homeserver.db
  742.  
  743.  
  744. ## Logging ##
  745.  
  746. # A yaml python logging config file as described by
  747. # https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema
  748. #
  749. log_config: "/etc/matrix-synapse/log.yaml"
  750.  
  751.  
  752. ## Ratelimiting ##
  753.  
  754. # Ratelimiting settings for client actions (registration, login, messaging).
  755. #
  756. # Each ratelimiting configuration is made of two parameters:
  757. # - per_second: number of requests a client can send per second.
  758. # - burst_count: number of requests a client can send before being throttled.
  759. #
  760. # Synapse currently uses the following configurations:
  761. # - one for messages that ratelimits sending based on the account the client
  762. # is using
  763. # - one for registration that ratelimits registration requests based on the
  764. # client's IP address.
  765. # - one for login that ratelimits login requests based on the client's IP
  766. # address.
  767. # - one for login that ratelimits login requests based on the account the
  768. # client is attempting to log into.
  769. # - one for login that ratelimits login requests based on the account the
  770. # client is attempting to log into, based on the amount of failed login
  771. # attempts for this account.
  772. # - one for ratelimiting redactions by room admins. If this is not explicitly
  773. # set then it uses the same ratelimiting as per rc_message. This is useful
  774. # to allow room admins to deal with abuse quickly.
  775. # - two for ratelimiting number of rooms a user can join, "local" for when
  776. # users are joining rooms the server is already in (this is cheap) vs
  777. # "remote" for when users are trying to join rooms not on the server (which
  778. # can be more expensive)
  779. #
  780. # The defaults are as shown below.
  781. #
  782. #rc_message:
  783. # per_second: 0.2
  784. # burst_count: 10
  785. #
  786. #rc_registration:
  787. # per_second: 0.17
  788. # burst_count: 3
  789. #
  790. #rc_login:
  791. # address:
  792. # per_second: 0.17
  793. # burst_count: 3
  794. # account:
  795. # per_second: 0.17
  796. # burst_count: 3
  797. # failed_attempts:
  798. # per_second: 0.17
  799. # burst_count: 3
  800. #
  801. #rc_admin_redaction:
  802. # per_second: 1
  803. # burst_count: 50
  804. #
  805. #rc_joins:
  806. # local:
  807. # per_second: 0.1
  808. # burst_count: 3
  809. # remote:
  810. # per_second: 0.01
  811. # burst_count: 3
  812.  
  813.  
  814. # Ratelimiting settings for incoming federation
  815. #
  816. # The rc_federation configuration is made up of the following settings:
  817. # - window_size: window size in milliseconds
  818. # - sleep_limit: number of federation requests from a single server in
  819. # a window before the server will delay processing the request.
  820. # - sleep_delay: duration in milliseconds to delay processing events
  821. # from remote servers by if they go over the sleep limit.
  822. # - reject_limit: maximum number of concurrent federation requests
  823. # allowed from a single server
  824. # - concurrent: number of federation requests to concurrently process
  825. # from a single server
  826. #
  827. # The defaults are as shown below.
  828. #
  829. #rc_federation:
  830. # window_size: 1000
  831. # sleep_limit: 10
  832. # sleep_delay: 500
  833. # reject_limit: 50
  834. # concurrent: 3
  835.  
  836. # Target outgoing federation transaction frequency for sending read-receipts,
  837. # per-room.
  838. #
  839. # If we end up trying to send out more read-receipts, they will get buffered up
  840. # into fewer transactions.
  841. #
  842. #federation_rr_transactions_per_room_per_second: 50
  843.  
  844.  
  845.  
  846. ## Media Store ##
  847.  
  848. # Enable the media store service in the Synapse master. Uncomment the
  849. # following if you are using a separate media store worker.
  850. #
  851. #enable_media_repo: false
  852.  
  853. # Directory where uploaded images and attachments are stored.
  854. #
  855. media_store_path: "/var/lib/matrix-synapse/media"
  856.  
  857. # Media storage providers allow media to be stored in different
  858. # locations.
  859. #
  860. #media_storage_providers:
  861. # - module: file_system
  862. # # Whether to store newly uploaded local files
  863. # store_local: false
  864. # # Whether to store newly downloaded remote files
  865. # store_remote: false
  866. # # Whether to wait for successful storage for local uploads
  867. # store_synchronous: false
  868. # config:
  869. # directory: /mnt/some/other/directory
  870.  
  871. # The largest allowed upload size in bytes
  872. #
  873. #max_upload_size: 50M
  874.  
  875. # Maximum number of pixels that will be thumbnailed
  876. #
  877. #max_image_pixels: 32M
  878.  
  879. # Whether to generate new thumbnails on the fly to precisely match
  880. # the resolution requested by the client. If true then whenever
  881. # a new resolution is requested by the client the server will
  882. # generate a new thumbnail. If false the server will pick a thumbnail
  883. # from a precalculated list.
  884. #
  885. #dynamic_thumbnails: false
  886.  
  887. # List of thumbnails to precalculate when an image is uploaded.
  888. #
  889. #thumbnail_sizes:
  890. # - width: 32
  891. # height: 32
  892. # method: crop
  893. # - width: 96
  894. # height: 96
  895. # method: crop
  896. # - width: 320
  897. # height: 240
  898. # method: scale
  899. # - width: 640
  900. # height: 480
  901. # method: scale
  902. # - width: 800
  903. # height: 600
  904. # method: scale
  905.  
  906. # Is the preview URL API enabled?
  907. #
  908. # 'false' by default: uncomment the following to enable it (and specify a
  909. # url_preview_ip_range_blacklist blacklist).
  910. #
  911. #url_preview_enabled: true
  912.  
  913. # List of IP address CIDR ranges that the URL preview spider is denied
  914. # from accessing. There are no defaults: you must explicitly
  915. # specify a list for URL previewing to work. You should specify any
  916. # internal services in your network that you do not want synapse to try
  917. # to connect to, otherwise anyone in any Matrix room could cause your
  918. # synapse to issue arbitrary GET requests to your internal services,
  919. # causing serious security issues.
  920. #
  921. # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly
  922. # listed here, since they correspond to unroutable addresses.)
  923. #
  924. # This must be specified if url_preview_enabled is set. It is recommended that
  925. # you uncomment the following list as a starting point.
  926. #
  927. #url_preview_ip_range_blacklist:
  928. # - '127.0.0.0/8'
  929. # - '10.0.0.0/8'
  930. # - '172.16.0.0/12'
  931. # - '192.168.0.0/16'
  932. # - '100.64.0.0/10'
  933. # - '169.254.0.0/16'
  934. # - '::1/128'
  935. # - 'fe80::/64'
  936. # - 'fc00::/7'
  937.  
  938. # List of IP address CIDR ranges that the URL preview spider is allowed
  939. # to access even if they are specified in url_preview_ip_range_blacklist.
  940. # This is useful for specifying exceptions to wide-ranging blacklisted
  941. # target IP ranges - e.g. for enabling URL previews for a specific private
  942. # website only visible in your network.
  943. #
  944. #url_preview_ip_range_whitelist:
  945. # - '192.168.1.1'
  946.  
  947. # Optional list of URL matches that the URL preview spider is
  948. # denied from accessing. You should use url_preview_ip_range_blacklist
  949. # in preference to this, otherwise someone could define a public DNS
  950. # entry that points to a private IP address and circumvent the blacklist.
  951. # This is more useful if you know there is an entire shape of URL that
  952. # you know that will never want synapse to try to spider.
  953. #
  954. # Each list entry is a dictionary of url component attributes as returned
  955. # by urlparse.urlsplit as applied to the absolute form of the URL. See
  956. # https://docs.python.org/2/library/urlparse.html#urlparse.urlsplit
  957. # The values of the dictionary are treated as an filename match pattern
  958. # applied to that component of URLs, unless they start with a ^ in which
  959. # case they are treated as a regular expression match. If all the
  960. # specified component matches for a given list item succeed, the URL is
  961. # blacklisted.
  962. #
  963. #url_preview_url_blacklist:
  964. # # blacklist any URL with a username in its URI
  965. # - username: '*'
  966. #
  967. # # blacklist all *.google.com URLs
  968. # - netloc: 'google.com'
  969. # - netloc: '*.google.com'
  970. #
  971. # # blacklist all plain HTTP URLs
  972. # - scheme: 'http'
  973. #
  974. # # blacklist http(s)://www.acme.com/foo
  975. # - netloc: 'www.acme.com'
  976. # path: '/foo'
  977. #
  978. # # blacklist any URL with a literal IPv4 address
  979. # - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
  980.  
  981. # The largest allowed URL preview spidering size in bytes
  982. #
  983. #max_spider_size: 10M
  984.  
  985. # A list of values for the Accept-Language HTTP header used when
  986. # downloading webpages during URL preview generation. This allows
  987. # Synapse to specify the preferred languages that URL previews should
  988. # be in when communicating with remote servers.
  989. #
  990. # Each value is a IETF language tag; a 2-3 letter identifier for a
  991. # language, optionally followed by subtags separated by '-', specifying
  992. # a country or region variant.
  993. #
  994. # Multiple values can be provided, and a weight can be added to each by
  995. # using quality value syntax (;q=). '*' translates to any language.
  996. #
  997. # Defaults to "en".
  998. #
  999. # Example:
  1000. #
  1001. # url_preview_accept_language:
  1002. # - en-UK
  1003. # - en-US;q=0.9
  1004. # - fr;q=0.8
  1005. # - *;q=0.7
  1006. #
  1007. url_preview_accept_language:
  1008. - en
  1009. - ru
  1010.  
  1011. ## Captcha ##
  1012. # See docs/CAPTCHA_SETUP.md for full details of configuring this.
  1013.  
  1014. # This homeserver's ReCAPTCHA public key. Must be specified if
  1015. # enable_registration_captcha is enabled.
  1016. #
  1017. recaptcha_public_key: "6Lfp"
  1018.  
  1019. # This homeserver's ReCAPTCHA private key. Must be specified if
  1020. # enable_registration_captcha is enabled.
  1021. #
  1022. recaptcha_private_key: "6Lfpb"
  1023.  
  1024. # Uncomment to enable ReCaptcha checks when registering, preventing signup
  1025. # unless a captcha is answered. Requires a valid ReCaptcha
  1026. # public/private key. Defaults to 'false'.
  1027. #
  1028. enable_registration_captcha: true
  1029.  
  1030. # The API endpoint to use for verifying m.login.recaptcha responses.
  1031. # Defaults to "https://www.recaptcha.net/recaptcha/api/siteverify".
  1032. #
  1033. #recaptcha_siteverify_api: "https://my.recaptcha.site"
  1034.  
  1035.  
  1036. ## TURN ##
  1037.  
  1038. # The public URIs of the TURN server to give to clients
  1039. #
  1040. #turn_uris: []
  1041.  
  1042. # The shared secret used to compute passwords for the TURN server
  1043. #
  1044. #turn_shared_secret: "YOUR_SHARED_SECRET"
  1045.  
  1046. # The Username and password if the TURN server needs them and
  1047. # does not use a token
  1048. #
  1049. #turn_username: "TURNSERVER_USERNAME"
  1050. #turn_password: "TURNSERVER_PASSWORD"
  1051.  
  1052. # How long generated TURN credentials last
  1053. #
  1054. #turn_user_lifetime: 1h
  1055.  
  1056. # Whether guests should be allowed to use the TURN server.
  1057. # This defaults to True, otherwise VoIP will be unreliable for guests.
  1058. # However, it does introduce a slight security risk as it allows users to
  1059. # connect to arbitrary endpoints without having first signed up for a
  1060. # valid account (e.g. by passing a CAPTCHA).
  1061. #
  1062. #turn_allow_guests: true
  1063.  
  1064.  
  1065. ## Registration ##
  1066. #
  1067. # Registration can be rate-limited using the parameters in the "Ratelimiting"
  1068. # section of this file.
  1069.  
  1070. # Enable registration for new users.
  1071. #
  1072. enable_registration: true
  1073.  
  1074. # Optional account validity configuration. This allows for accounts to be denied
  1075. # any request after a given period.
  1076. #
  1077. # Once this feature is enabled, Synapse will look for registered users without an
  1078. # expiration date at startup and will add one to every account it found using the
  1079. # current settings at that time.
  1080. # This means that, if a validity period is set, and Synapse is restarted (it will
  1081. # then derive an expiration date from the current validity period), and some time
  1082. # after that the validity period changes and Synapse is restarted, the users'
  1083. # expiration dates won't be updated unless their account is manually renewed. This
  1084. # date will be randomly selected within a range [now + period - d ; now + period],
  1085. # where d is equal to 10% of the validity period.
  1086. #
  1087. account_validity:
  1088. # The account validity feature is disabled by default. Uncomment the
  1089. # following line to enable it.
  1090. #
  1091. #enabled: true
  1092.  
  1093. # The period after which an account is valid after its registration. When
  1094. # renewing the account, its validity period will be extended by this amount
  1095. # of time. This parameter is required when using the account validity
  1096. # feature.
  1097. #
  1098. #period: 6w
  1099.  
  1100. # The amount of time before an account's expiry date at which Synapse will
  1101. # send an email to the account's email address with a renewal link. By
  1102. # default, no such emails are sent.
  1103. #
  1104. # If you enable this setting, you will also need to fill out the 'email' and
  1105. # 'public_baseurl' configuration sections.
  1106. #
  1107. #renew_at: 1w
  1108.  
  1109. # The subject of the email sent out with the renewal link. '%(app)s' can be
  1110. # used as a placeholder for the 'app_name' parameter from the 'email'
  1111. # section.
  1112. #
  1113. # Note that the placeholder must be written '%(app)s', including the
  1114. # trailing 's'.
  1115. #
  1116. # If this is not set, a default value is used.
  1117. #
  1118. #renew_email_subject: "Renew your %(app)s account"
  1119.  
  1120. # Directory in which Synapse will try to find templates for the HTML files to
  1121. # serve to the user when trying to renew an account. If not set, default
  1122. # templates from within the Synapse package will be used.
  1123. #
  1124. #template_dir: "res/templates"
  1125.  
  1126. # File within 'template_dir' giving the HTML to be displayed to the user after
  1127. # they successfully renewed their account. If not set, default text is used.
  1128. #
  1129. #account_renewed_html_path: "account_renewed.html"
  1130.  
  1131. # File within 'template_dir' giving the HTML to be displayed when the user
  1132. # tries to renew an account with an invalid renewal token. If not set,
  1133. # default text is used.
  1134. #
  1135. #invalid_token_html_path: "invalid_token.html"
  1136.  
  1137. # Time that a user's session remains valid for, after they log in.
  1138. #
  1139. # Note that this is not currently compatible with guest logins.
  1140. #
  1141. # Note also that this is calculated at login time: changes are not applied
  1142. # retrospectively to users who have already logged in.
  1143. #
  1144. # By default, this is infinite.
  1145. #
  1146. #session_lifetime: 24h
  1147.  
  1148. # The user must provide all of the below types of 3PID when registering.
  1149. #
  1150. #registrations_require_3pid:
  1151. # - email
  1152. # - msisdn
  1153.  
  1154. # Explicitly disable asking for MSISDNs from the registration
  1155. # flow (overrides registrations_require_3pid if MSISDNs are set as required)
  1156. #
  1157. #disable_msisdn_registration: true
  1158.  
  1159. # Mandate that users are only allowed to associate certain formats of
  1160. # 3PIDs with accounts on this server.
  1161. #
  1162. #allowed_local_3pids:
  1163. # - medium: email
  1164. # pattern: '.*@matrix\.org'
  1165. # - medium: email
  1166. # pattern: '.*@vector\.im'
  1167. # - medium: msisdn
  1168. # pattern: '\+44'
  1169.  
  1170. # Enable 3PIDs lookup requests to identity servers from this server.
  1171. #
  1172. #enable_3pid_lookup: true
  1173.  
  1174. # If set, allows registration of standard or admin accounts by anyone who
  1175. # has the shared secret, even if registration is otherwise disabled.
  1176. #
  1177. registration_shared_secret: "Some_Long_String_Here"
  1178.  
  1179. # Set the number of bcrypt rounds used to generate password hash.
  1180. # Larger numbers increase the work factor needed to generate the hash.
  1181. # The default number is 12 (which equates to 2^12 rounds).
  1182. # N.B. that increasing this will exponentially increase the time required
  1183. # to register or login - e.g. 24 => 2^24 rounds which will take >20 mins.
  1184. #
  1185. #bcrypt_rounds: 12
  1186.  
  1187. # Allows users to register as guests without a password/email/etc, and
  1188. # participate in rooms hosted on this server which have been made
  1189. # accessible to anonymous users.
  1190. #
  1191. #allow_guest_access: false
  1192.  
  1193. # The identity server which we suggest that clients should use when users log
  1194. # in on this server.
  1195. #
  1196. # (By default, no suggestion is made, so it is left up to the client.
  1197. # This setting is ignored unless public_baseurl is also set.)
  1198. #
  1199. #default_identity_server: https://matrix.org
  1200.  
  1201. # Handle threepid (email/phone etc) registration and password resets through a set of
  1202. # *trusted* identity servers. Note that this allows the configured identity server to
  1203. # reset passwords for accounts!
  1204. #
  1205. # Be aware that if `email` is not set, and SMTP options have not been
  1206. # configured in the email config block, registration and user password resets via
  1207. # email will be globally disabled.
  1208. #
  1209. # Additionally, if `msisdn` is not set, registration and password resets via msisdn
  1210. # will be disabled regardless, and users will not be able to associate an msisdn
  1211. # identifier to their account. This is due to Synapse currently not supporting
  1212. # any method of sending SMS messages on its own.
  1213. #
  1214. # To enable using an identity server for operations regarding a particular third-party
  1215. # identifier type, set the value to the URL of that identity server as shown in the
  1216. # examples below.
  1217. #
  1218. # Servers handling the these requests must answer the `/requestToken` endpoints defined
  1219. # by the Matrix Identity Service API specification:
  1220. # https://matrix.org/docs/spec/identity_service/latest
  1221. #
  1222. # If a delegate is specified, the config option public_baseurl must also be filled out.
  1223. #
  1224. account_threepid_delegates:
  1225. #email: https://example.com # Delegate email sending to example.com
  1226. #msisdn: http://localhost:8090 # Delegate SMS sending to this local process
  1227.  
  1228. # Whether users are allowed to change their displayname after it has
  1229. # been initially set. Useful when provisioning users based on the
  1230. # contents of a third-party directory.
  1231. #
  1232. # Does not apply to server administrators. Defaults to 'true'
  1233. #
  1234. #enable_set_displayname: false
  1235.  
  1236. # Whether users are allowed to change their avatar after it has been
  1237. # initially set. Useful when provisioning users based on the contents
  1238. # of a third-party directory.
  1239. #
  1240. # Does not apply to server administrators. Defaults to 'true'
  1241. #
  1242. #enable_set_avatar_url: false
  1243.  
  1244. # Whether users can change the 3PIDs associated with their accounts
  1245. # (email address and msisdn).
  1246. #
  1247. # Defaults to 'true'
  1248. #
  1249. #enable_3pid_changes: false
  1250.  
  1251. # Users who register on this homeserver will automatically be joined
  1252. # to these rooms.
  1253. #
  1254. # By default, any room aliases included in this list will be created
  1255. # as a publicly joinable room when the first user registers for the
  1256. # homeserver. This behaviour can be customised with the settings below.
  1257. #
  1258. #auto_join_rooms:
  1259. # - "#example:example.com"
  1260.  
  1261. # Where auto_join_rooms are specified, setting this flag ensures that the
  1262. # the rooms exist by creating them when the first user on the
  1263. # homeserver registers.
  1264. #
  1265. # By default the auto-created rooms are publicly joinable from any federated
  1266. # server. Use the autocreate_auto_join_rooms_federated and
  1267. # autocreate_auto_join_room_preset settings below to customise this behaviour.
  1268. #
  1269. # Setting to false means that if the rooms are not manually created,
  1270. # users cannot be auto-joined since they do not exist.
  1271. #
  1272. # Defaults to true. Uncomment the following line to disable automatically
  1273. # creating auto-join rooms.
  1274. #
  1275. #autocreate_auto_join_rooms: false
  1276.  
  1277. # Whether the auto_join_rooms that are auto-created are available via
  1278. # federation. Only has an effect if autocreate_auto_join_rooms is true.
  1279. #
  1280. # Note that whether a room is federated cannot be modified after
  1281. # creation.
  1282. #
  1283. # Defaults to true: the room will be joinable from other servers.
  1284. # Uncomment the following to prevent users from other homeservers from
  1285. # joining these rooms.
  1286. #
  1287. #autocreate_auto_join_rooms_federated: false
  1288.  
  1289. # The room preset to use when auto-creating one of auto_join_rooms. Only has an
  1290. # effect if autocreate_auto_join_rooms is true.
  1291. #
  1292. # This can be one of "public_chat", "private_chat", or "trusted_private_chat".
  1293. # If a value of "private_chat" or "trusted_private_chat" is used then
  1294. # auto_join_mxid_localpart must also be configured.
  1295. #
  1296. # Defaults to "public_chat", meaning that the room is joinable by anyone, including
  1297. # federated servers if autocreate_auto_join_rooms_federated is true (the default).
  1298. # Uncomment the following to require an invitation to join these rooms.
  1299. #
  1300. #autocreate_auto_join_room_preset: private_chat
  1301.  
  1302. # The local part of the user id which is used to create auto_join_rooms if
  1303. # autocreate_auto_join_rooms is true. If this is not provided then the
  1304. # initial user account that registers will be used to create the rooms.
  1305. #
  1306. # The user id is also used to invite new users to any auto-join rooms which
  1307. # are set to invite-only.
  1308. #
  1309. # It *must* be configured if autocreate_auto_join_room_preset is set to
  1310. # "private_chat" or "trusted_private_chat".
  1311. #
  1312. # Note that this must be specified in order for new users to be correctly
  1313. # invited to any auto-join rooms which have been set to invite-only (either
  1314. # at the time of creation or subsequently).
  1315. #
  1316. # Note that, if the room already exists, this user must be joined and
  1317. # have the appropriate permissions to invite new members.
  1318. #
  1319. #auto_join_mxid_localpart: system
  1320.  
  1321. # When auto_join_rooms is specified, setting this flag to false prevents
  1322. # guest accounts from being automatically joined to the rooms.
  1323. #
  1324. # Defaults to true.
  1325. #
  1326. #auto_join_rooms_for_guests: false
  1327.  
  1328.  
  1329. ## Metrics ###
  1330.  
  1331. # Enable collection and rendering of performance metrics
  1332. #
  1333. #enable_metrics: false
  1334.  
  1335. # Enable sentry integration
  1336. # NOTE: While attempts are made to ensure that the logs don't contain
  1337. # any sensitive information, this cannot be guaranteed. By enabling
  1338. # this option the sentry server may therefore receive sensitive
  1339. # information, and it in turn may then diseminate sensitive information
  1340. # through insecure notification channels if so configured.
  1341. #
  1342. #sentry:
  1343. # dsn: "..."
  1344.  
  1345. # Flags to enable Prometheus metrics which are not suitable to be
  1346. # enabled by default, either for performance reasons or limited use.
  1347. #
  1348. metrics_flags:
  1349. # Publish synapse_federation_known_servers, a gauge of the number of
  1350. # servers this homeserver knows about, including itself. May cause
  1351. # performance problems on large homeservers.
  1352. #
  1353. #known_servers: true
  1354.  
  1355. # Whether or not to report anonymized homeserver usage statistics.
  1356. #
  1357. #report_stats: true|false
  1358.  
  1359. # The endpoint to report the anonymized homeserver usage statistics to.
  1360. # Defaults to https://matrix.org/report-usage-stats/push
  1361. #
  1362. #report_stats_endpoint: https://example.com/report-usage-stats/push
  1363.  
  1364.  
  1365. ## API Configuration ##
  1366.  
  1367. # A list of event types that will be included in the room_invite_state
  1368. #
  1369. #room_invite_state_types:
  1370. # - "m.room.join_rules"
  1371. # - "m.room.canonical_alias"
  1372. # - "m.room.avatar"
  1373. # - "m.room.encryption"
  1374. # - "m.room.name"
  1375.  
  1376.  
  1377. # A list of application service config files to use
  1378. #
  1379. #app_service_config_files:
  1380. # - app_service_1.yaml
  1381. # - app_service_2.yaml
  1382.  
  1383. # Uncomment to enable tracking of application service IP addresses. Implicitly
  1384. # enables MAU tracking for application service users.
  1385. #
  1386. #track_appservice_user_ips: true
  1387.  
  1388.  
  1389. # a secret which is used to sign access tokens. If none is specified,
  1390. # the registration_shared_secret is used, if one is given; otherwise,
  1391. # a secret key is derived from the signing key.
  1392. #
  1393. #macaroon_secret_key: <PRIVATE STRING>
  1394.  
  1395. # a secret which is used to calculate HMACs for form values, to stop
  1396. # falsification of values. Must be specified for the User Consent
  1397. # forms to work.
  1398. #
  1399. #form_secret: <PRIVATE STRING>
  1400.  
  1401. ## Signing Keys ##
  1402.  
  1403. # Path to the signing key to sign messages with
  1404. #
  1405. signing_key_path: "/etc/matrix-synapse/homeserver.signing.key"
  1406.  
  1407. # The keys that the server used to sign messages with but won't use
  1408. # to sign new messages.
  1409. #
  1410. old_signing_keys:
  1411. # For each key, `key` should be the base64-encoded public key, and
  1412. # `expired_ts`should be the time (in milliseconds since the unix epoch) that
  1413. # it was last used.
  1414. #
  1415. # It is possible to build an entry from an old signing.key file using the
  1416. # `export_signing_key` script which is provided with synapse.
  1417. #
  1418. # For example:
  1419. #
  1420. #"ed25519:id": { key: "base64string", expired_ts: 123456789123 }
  1421.  
  1422. # How long key response published by this server is valid for.
  1423. # Used to set the valid_until_ts in /key/v2 APIs.
  1424. # Determines how quickly servers will query to check which keys
  1425. # are still valid.
  1426. #
  1427. #key_refresh_interval: 1d
  1428.  
  1429. # The trusted servers to download signing keys from.
  1430. #
  1431. # When we need to fetch a signing key, each server is tried in parallel.
  1432. #
  1433. # Normally, the connection to the key server is validated via TLS certificates.
  1434. # Additional security can be provided by configuring a `verify key`, which
  1435. # will make synapse check that the response is signed by that key.
  1436. #
  1437. # This setting supercedes an older setting named `perspectives`. The old format
  1438. # is still supported for backwards-compatibility, but it is deprecated.
  1439. #
  1440. # 'trusted_key_servers' defaults to matrix.org, but using it will generate a
  1441. # warning on start-up. To suppress this warning, set
  1442. # 'suppress_key_server_warning' to true.
  1443. #
  1444. # Options for each entry in the list include:
  1445. #
  1446. # server_name: the name of the server. required.
  1447. #
  1448. # verify_keys: an optional map from key id to base64-encoded public key.
  1449. # If specified, we will check that the response is signed by at least
  1450. # one of the given keys.
  1451. #
  1452. # accept_keys_insecurely: a boolean. Normally, if `verify_keys` is unset,
  1453. # and federation_verify_certificates is not `true`, synapse will refuse
  1454. # to start, because this would allow anyone who can spoof DNS responses
  1455. # to masquerade as the trusted key server. If you know what you are doing
  1456. # and are sure that your network environment provides a secure connection
  1457. # to the key server, you can set this to `true` to override this
  1458. # behaviour.
  1459. #
  1460. # An example configuration might look like:
  1461. #
  1462. #trusted_key_servers:
  1463. # - server_name: "my_trusted_server.example.com"
  1464. # verify_keys:
  1465. # "ed25519:auto": "abcdefghijklmnopqrstuvwxyzabcdefghijklmopqr"
  1466. # - server_name: "my_other_trusted_server.example.com"
  1467. #
  1468. trusted_key_servers:
  1469. - server_name: "matrix.org"
  1470.  
  1471. # Uncomment the following to disable the warning that is emitted when the
  1472. # trusted_key_servers include 'matrix.org'. See above.
  1473. #
  1474. #suppress_key_server_warning: true
  1475.  
  1476. # The signing keys to use when acting as a trusted key server. If not specified
  1477. # defaults to the server signing key.
  1478. #
  1479. # Can contain multiple keys, one per line.
  1480. #
  1481. #key_server_signing_keys_path: "key_server_signing_keys.key"
  1482.  
  1483.  
  1484. ## Single sign-on integration ##
  1485.  
  1486. # The following settings can be used to make Synapse use a single sign-on
  1487. # provider for authentication, instead of its internal password database.
  1488. #
  1489. # You will probably also want to set the following options to `false` to
  1490. # disable the regular login/registration flows:
  1491. # * enable_registration
  1492. # * password_config.enabled
  1493. #
  1494. # You will also want to investigate the settings under the "sso" configuration
  1495. # section below.
  1496.  
  1497. # Enable SAML2 for registration and login. Uses pysaml2.
  1498. #
  1499. # At least one of `sp_config` or `config_path` must be set in this section to
  1500. # enable SAML login.
  1501. #
  1502. # Once SAML support is enabled, a metadata file will be exposed at
  1503. # https://<server>:<port>/_matrix/saml2/metadata.xml, which you may be able to
  1504. # use to configure your SAML IdP with. Alternatively, you can manually configure
  1505. # the IdP to use an ACS location of
  1506. # https://<server>:<port>/_matrix/saml2/authn_response.
  1507. #
  1508. saml2_config:
  1509. # `sp_config` is the configuration for the pysaml2 Service Provider.
  1510. # See pysaml2 docs for format of config.
  1511. #
  1512. # Default values will be used for the 'entityid' and 'service' settings,
  1513. # so it is not normally necessary to specify them unless you need to
  1514. # override them.
  1515. #
  1516. sp_config:
  1517. # Point this to the IdP's metadata. You must provide either a local
  1518. # file via the `local` attribute or (preferably) a URL via the
  1519. # `remote` attribute.
  1520. #
  1521. #metadata:
  1522. # local: ["saml2/idp.xml"]
  1523. # remote:
  1524. # - url: https://our_idp/metadata.xml
  1525.  
  1526. # Allowed clock difference in seconds between the homeserver and IdP.
  1527. #
  1528. # Uncomment the below to increase the accepted time difference from 0 to 3 seconds.
  1529. #
  1530. #accepted_time_diff: 3
  1531.  
  1532. # By default, the user has to go to our login page first. If you'd like
  1533. # to allow IdP-initiated login, set 'allow_unsolicited: true' in a
  1534. # 'service.sp' section:
  1535. #
  1536. #service:
  1537. # sp:
  1538. # allow_unsolicited: true
  1539.  
  1540. # The examples below are just used to generate our metadata xml, and you
  1541. # may well not need them, depending on your setup. Alternatively you
  1542. # may need a whole lot more detail - see the pysaml2 docs!
  1543.  
  1544. #description: ["My awesome SP", "en"]
  1545. #name: ["Test SP", "en"]
  1546.  
  1547. #ui_info:
  1548. # display_name:
  1549. # - lang: en
  1550. # text: "Display Name is the descriptive name of your service."
  1551. # description:
  1552. # - lang: en
  1553. # text: "Description should be a short paragraph explaining the purpose of the service."
  1554. # information_url:
  1555. # - lang: en
  1556. # text: "https://example.com/terms-of-service"
  1557. # privacy_statement_url:
  1558. # - lang: en
  1559. # text: "https://example.com/privacy-policy"
  1560. # keywords:
  1561. # - lang: en
  1562. # text: ["Matrix", "Element"]
  1563. # logo:
  1564. # - lang: en
  1565. # text: "https://example.com/logo.svg"
  1566. # width: "200"
  1567. # height: "80"
  1568.  
  1569. #organization:
  1570. # name: Example com
  1571. # display_name:
  1572. # - ["Example co", "en"]
  1573. # url: "http://example.com"
  1574.  
  1575. #contact_person:
  1576. # - given_name: Bob
  1577. # sur_name: "the Sysadmin"
  1578. # email_address": ["admin@example.com"]
  1579. # contact_type": technical
  1580.  
  1581. # Instead of putting the config inline as above, you can specify a
  1582. # separate pysaml2 configuration file:
  1583. #
  1584. #config_path: "/etc/matrix-synapse/sp_conf.py"
  1585.  
  1586. # The lifetime of a SAML session. This defines how long a user has to
  1587. # complete the authentication process, if allow_unsolicited is unset.
  1588. # The default is 15 minutes.
  1589. #
  1590. #saml_session_lifetime: 5m
  1591.  
  1592. # An external module can be provided here as a custom solution to
  1593. # mapping attributes returned from a saml provider onto a matrix user.
  1594. #
  1595. user_mapping_provider:
  1596. # The custom module's class. Uncomment to use a custom module.
  1597. #
  1598. #module: mapping_provider.SamlMappingProvider
  1599.  
  1600. # Custom configuration values for the module. Below options are
  1601. # intended for the built-in provider, they should be changed if
  1602. # using a custom module. This section will be passed as a Python
  1603. # dictionary to the module's `parse_config` method.
  1604. #
  1605. config:
  1606. # The SAML attribute (after mapping via the attribute maps) to use
  1607. # to derive the Matrix ID from. 'uid' by default.
  1608. #
  1609. # Note: This used to be configured by the
  1610. # saml2_config.mxid_source_attribute option. If that is still
  1611. # defined, its value will be used instead.
  1612. #
  1613. #mxid_source_attribute: displayName
  1614.  
  1615. # The mapping system to use for mapping the saml attribute onto a
  1616. # matrix ID.
  1617. #
  1618. # Options include:
  1619. # * 'hexencode' (which maps unpermitted characters to '=xx')
  1620. # * 'dotreplace' (which replaces unpermitted characters with
  1621. # '.').
  1622. # The default is 'hexencode'.
  1623. #
  1624. # Note: This used to be configured by the
  1625. # saml2_config.mxid_mapping option. If that is still defined, its
  1626. # value will be used instead.
  1627. #
  1628. #mxid_mapping: dotreplace
  1629.  
  1630. # In previous versions of synapse, the mapping from SAML attribute to
  1631. # MXID was always calculated dynamically rather than stored in a
  1632. # table. For backwards- compatibility, we will look for user_ids
  1633. # matching such a pattern before creating a new account.
  1634. #
  1635. # This setting controls the SAML attribute which will be used for this
  1636. # backwards-compatibility lookup. Typically it should be 'uid', but if
  1637. # the attribute maps are changed, it may be necessary to change it.
  1638. #
  1639. # The default is 'uid'.
  1640. #
  1641. #grandfathered_mxid_source_attribute: upn
  1642.  
  1643. # It is possible to configure Synapse to only allow logins if SAML attributes
  1644. # match particular values. The requirements can be listed under
  1645. # `attribute_requirements` as shown below. All of the listed attributes must
  1646. # match for the login to be permitted.
  1647. #
  1648. #attribute_requirements:
  1649. # - attribute: userGroup
  1650. # value: "staff"
  1651. # - attribute: department
  1652. # value: "sales"
  1653.  
  1654. # If the metadata XML contains multiple IdP entities then the `idp_entityid`
  1655. # option must be set to the entity to redirect users to.
  1656. #
  1657. # Most deployments only have a single IdP entity and so should omit this
  1658. # option.
  1659. #
  1660. #idp_entityid: 'https://our_idp/entityid'
  1661.  
  1662.  
  1663. # Enable OpenID Connect (OIDC) / OAuth 2.0 for registration and login.
  1664. #
  1665. # See https://github.com/matrix-org/synapse/blob/master/docs/openid.md
  1666. # for some example configurations.
  1667. #
  1668. oidc_config:
  1669. # Uncomment the following to enable authorization against an OpenID Connect
  1670. # server. Defaults to false.
  1671. #
  1672. #enabled: true
  1673.  
  1674. # Uncomment the following to disable use of the OIDC discovery mechanism to
  1675. # discover endpoints. Defaults to true.
  1676. #
  1677. #discover: false
  1678.  
  1679. # the OIDC issuer. Used to validate tokens and (if discovery is enabled) to
  1680. # discover the provider's endpoints.
  1681. #
  1682. # Required if 'enabled' is true.
  1683. #
  1684. #issuer: "https://accounts.example.com/"
  1685.  
  1686. # oauth2 client id to use.
  1687. #
  1688. # Required if 'enabled' is true.
  1689. #
  1690. #client_id: "provided-by-your-issuer"
  1691.  
  1692. # oauth2 client secret to use.
  1693. #
  1694. # Required if 'enabled' is true.
  1695. #
  1696. #client_secret: "provided-by-your-issuer"
  1697.  
  1698. # auth method to use when exchanging the token.
  1699. # Valid values are 'client_secret_basic' (default), 'client_secret_post' and
  1700. # 'none'.
  1701. #
  1702. #client_auth_method: client_secret_post
  1703.  
  1704. # list of scopes to request. This should normally include the "openid" scope.
  1705. # Defaults to ["openid"].
  1706. #
  1707. #scopes: ["openid", "profile"]
  1708.  
  1709. # the oauth2 authorization endpoint. Required if provider discovery is disabled.
  1710. #
  1711. #authorization_endpoint: "https://accounts.example.com/oauth2/auth"
  1712.  
  1713. # the oauth2 token endpoint. Required if provider discovery is disabled.
  1714. #
  1715. #token_endpoint: "https://accounts.example.com/oauth2/token"
  1716.  
  1717. # the OIDC userinfo endpoint. Required if discovery is disabled and the
  1718. # "openid" scope is not requested.
  1719. #
  1720. #userinfo_endpoint: "https://accounts.example.com/userinfo"
  1721.  
  1722. # URI where to fetch the JWKS. Required if discovery is disabled and the
  1723. # "openid" scope is used.
  1724. #
  1725. #jwks_uri: "https://accounts.example.com/.well-known/jwks.json"
  1726.  
  1727. # Uncomment to skip metadata verification. Defaults to false.
  1728. #
  1729. # Use this if you are connecting to a provider that is not OpenID Connect
  1730. # compliant.
  1731. # Avoid this in production.
  1732. #
  1733. #skip_verification: true
  1734.  
  1735. # Whether to fetch the user profile from the userinfo endpoint. Valid
  1736. # values are: "auto" or "userinfo_endpoint".
  1737. #
  1738. # Defaults to "auto", which fetches the userinfo endpoint if "openid" is included
  1739. # in `scopes`. Uncomment the following to always fetch the userinfo endpoint.
  1740. #
  1741. #user_profile_method: "userinfo_endpoint"
  1742.  
  1743. # Uncomment to allow a user logging in via OIDC to match a pre-existing account instead
  1744. # of failing. This could be used if switching from password logins to OIDC. Defaults to false.
  1745. #
  1746. #allow_existing_users: true
  1747.  
  1748. # An external module can be provided here as a custom solution to mapping
  1749. # attributes returned from a OIDC provider onto a matrix user.
  1750. #
  1751. user_mapping_provider:
  1752. # The custom module's class. Uncomment to use a custom module.
  1753. # Default is 'synapse.handlers.oidc_handler.JinjaOidcMappingProvider'.
  1754. #
  1755. # See https://github.com/matrix-org/synapse/blob/master/docs/sso_mapping_providers.md#openid-mapping-providers
  1756. # for information on implementing a custom mapping provider.
  1757. #
  1758. #module: mapping_provider.OidcMappingProvider
  1759.  
  1760. # Custom configuration values for the module. This section will be passed as
  1761. # a Python dictionary to the user mapping provider module's `parse_config`
  1762. # method.
  1763. #
  1764. # The examples below are intended for the default provider: they should be
  1765. # changed if using a custom provider.
  1766. #
  1767. config:
  1768. # name of the claim containing a unique identifier for the user.
  1769. # Defaults to `sub`, which OpenID Connect compliant providers should provide.
  1770. #
  1771. #subject_claim: "sub"
  1772.  
  1773. # Jinja2 template for the localpart of the MXID.
  1774. #
  1775. # When rendering, this template is given the following variables:
  1776. # * user: The claims returned by the UserInfo Endpoint and/or in the ID
  1777. # Token
  1778. #
  1779. # This must be configured if using the default mapping provider.
  1780. #
  1781. localpart_template: "{{ user.preferred_username }}"
  1782.  
  1783. # Jinja2 template for the display name to set on first login.
  1784. #
  1785. # If unset, no displayname will be set.
  1786. #
  1787. #display_name_template: "{{ user.given_name }} {{ user.last_name }}"
  1788.  
  1789. # Jinja2 templates for extra attributes to send back to the client during
  1790. # login.
  1791. #
  1792. # Note that these are non-standard and clients will ignore them without modifications.
  1793. #
  1794. #extra_attributes:
  1795. #birthdate: "{{ user.birthdate }}"
  1796.  
  1797.  
  1798.  
  1799. # Enable Central Authentication Service (CAS) for registration and login.
  1800. #
  1801. cas_config:
  1802. # Uncomment the following to enable authorization against a CAS server.
  1803. # Defaults to false.
  1804. #
  1805. #enabled: true
  1806.  
  1807. # The URL of the CAS authorization endpoint.
  1808. #
  1809. #server_url: "https://cas-server.com"
  1810.  
  1811. # The public URL of the homeserver.
  1812. #
  1813. #service_url: "https://homeserver.domain.com:8448"
  1814.  
  1815. # The attribute of the CAS response to use as the display name.
  1816. #
  1817. # If unset, no displayname will be set.
  1818. #
  1819. #displayname_attribute: name
  1820.  
  1821. # It is possible to configure Synapse to only allow logins if CAS attributes
  1822. # match particular values. All of the keys in the mapping below must exist
  1823. # and the values must match the given value. Alternately if the given value
  1824. # is None then any value is allowed (the attribute just must exist).
  1825. # All of the listed attributes must match for the login to be permitted.
  1826. #
  1827. #required_attributes:
  1828. # userGroup: "staff"
  1829. # department: None
  1830.  
  1831.  
  1832. # Additional settings to use with single-sign on systems such as OpenID Connect,
  1833. # SAML2 and CAS.
  1834. #
  1835. sso:
  1836. # A list of client URLs which are whitelisted so that the user does not
  1837. # have to confirm giving access to their account to the URL. Any client
  1838. # whose URL starts with an entry in the following list will not be subject
  1839. # to an additional confirmation step after the SSO login is completed.
  1840. #
  1841. # WARNING: An entry such as "https://my.client" is insecure, because it
  1842. # will also match "https://my.client.evil.site", exposing your users to
  1843. # phishing attacks from evil.site. To avoid this, include a slash after the
  1844. # hostname: "https://my.client/".
  1845. #
  1846. # If public_baseurl is set, then the login fallback page (used by clients
  1847. # that don't natively support the required login flows) is whitelisted in
  1848. # addition to any URLs in this list.
  1849. #
  1850. # By default, this list is empty.
  1851. #
  1852. #client_whitelist:
  1853. # - https://riot.im/develop
  1854. # - https://my.custom.client/
  1855.  
  1856. # Directory in which Synapse will try to find the template files below.
  1857. # If not set, default templates from within the Synapse package will be used.
  1858. #
  1859. # DO NOT UNCOMMENT THIS SETTING unless you want to customise the templates.
  1860. # If you *do* uncomment it, you will need to make sure that all the templates
  1861. # below are in the directory.
  1862. #
  1863. # Synapse will look for the following templates in this directory:
  1864. #
  1865. # * HTML page for a confirmation step before redirecting back to the client
  1866. # with the login token: 'sso_redirect_confirm.html'.
  1867. #
  1868. # When rendering, this template is given three variables:
  1869. # * redirect_url: the URL the user is about to be redirected to. Needs
  1870. # manual escaping (see
  1871. # https://jinja.palletsprojects.com/en/2.11.x/templates/#html-escaping).
  1872. #
  1873. # * display_url: the same as `redirect_url`, but with the query
  1874. # parameters stripped. The intention is to have a
  1875. # human-readable URL to show to users, not to use it as
  1876. # the final address to redirect to. Needs manual escaping
  1877. # (see https://jinja.palletsprojects.com/en/2.11.x/templates/#html-escaping).
  1878. #
  1879. # * server_name: the homeserver's name.
  1880. #
  1881. # * HTML page which notifies the user that they are authenticating to confirm
  1882. # an operation on their account during the user interactive authentication
  1883. # process: 'sso_auth_confirm.html'.
  1884. #
  1885. # When rendering, this template is given the following variables:
  1886. # * redirect_url: the URL the user is about to be redirected to. Needs
  1887. # manual escaping (see
  1888. # https://jinja.palletsprojects.com/en/2.11.x/templates/#html-escaping).
  1889. #
  1890. # * description: the operation which the user is being asked to confirm
  1891. #
  1892. # * HTML page shown after a successful user interactive authentication session:
  1893. # 'sso_auth_success.html'.
  1894. #
  1895. # Note that this page must include the JavaScript which notifies of a successful authentication
  1896. # (see https://matrix.org/docs/spec/client_server/r0.6.0#fallback).
  1897. #
  1898. # This template has no additional variables.
  1899. #
  1900. # * HTML page shown during single sign-on if a deactivated user (according to Synapse's database)
  1901. # attempts to login: 'sso_account_deactivated.html'.
  1902. #
  1903. # This template has no additional variables.
  1904. #
  1905. # * HTML page to display to users if something goes wrong during the
  1906. # OpenID Connect authentication process: 'sso_error.html'.
  1907. #
  1908. # When rendering, this template is given two variables:
  1909. # * error: the technical name of the error
  1910. # * error_description: a human-readable message for the error
  1911. #
  1912. # You can see the default templates at:
  1913. # https://github.com/matrix-org/synapse/tree/master/synapse/res/templates
  1914. #
  1915. #template_dir: "res/templates"
  1916.  
  1917.  
  1918. # JSON web token integration. The following settings can be used to make
  1919. # Synapse JSON web tokens for authentication, instead of its internal
  1920. # password database.
  1921. #
  1922. # Each JSON Web Token needs to contain a "sub" (subject) claim, which is
  1923. # used as the localpart of the mxid.
  1924. #
  1925. # Additionally, the expiration time ("exp"), not before time ("nbf"),
  1926. # and issued at ("iat") claims are validated if present.
  1927. #
  1928. # Note that this is a non-standard login type and client support is
  1929. # expected to be non-existent.
  1930. #
  1931. # See https://github.com/matrix-org/synapse/blob/master/docs/jwt.md.
  1932. #
  1933. #jwt_config:
  1934. # Uncomment the following to enable authorization using JSON web
  1935. # tokens. Defaults to false.
  1936. #
  1937. #enabled: true
  1938.  
  1939. # This is either the private shared secret or the public key used to
  1940. # decode the contents of the JSON web token.
  1941. #
  1942. # Required if 'enabled' is true.
  1943. #
  1944. #secret: "provided-by-your-issuer"
  1945.  
  1946. # The algorithm used to sign the JSON web token.
  1947. #
  1948. # Supported algorithms are listed at
  1949. # https://pyjwt.readthedocs.io/en/latest/algorithms.html
  1950. #
  1951. # Required if 'enabled' is true.
  1952. #
  1953. #algorithm: "provided-by-your-issuer"
  1954.  
  1955. # The issuer to validate the "iss" claim against.
  1956. #
  1957. # Optional, if provided the "iss" claim will be required and
  1958. # validated for all JSON web tokens.
  1959. #
  1960. #issuer: "provided-by-your-issuer"
  1961.  
  1962. # A list of audiences to validate the "aud" claim against.
  1963. #
  1964. # Optional, if provided the "aud" claim will be required and
  1965. # validated for all JSON web tokens.
  1966. #
  1967. # Note that if the "aud" claim is included in a JSON web token then
  1968. # validation will fail without configuring audiences.
  1969. #
  1970. #audiences:
  1971. # - "provided-by-your-issuer"
  1972.  
  1973.  
  1974. password_config:
  1975. # Uncomment to disable password login
  1976. #
  1977. #enabled: false
  1978.  
  1979. # Uncomment to disable authentication against the local password
  1980. # database. This is ignored if `enabled` is false, and is only useful
  1981. # if you have other password_providers.
  1982. #
  1983. #localdb_enabled: false
  1984.  
  1985. # Uncomment and change to a secret random string for extra security.
  1986. # DO NOT CHANGE THIS AFTER INITIAL SETUP!
  1987. #
  1988. #pepper: "EVEN_MORE_SECRET"
  1989.  
  1990. # Define and enforce a password policy. Each parameter is optional.
  1991. # This is an implementation of MSC2000.
  1992. #
  1993. policy:
  1994. # Whether to enforce the password policy.
  1995. # Defaults to 'false'.
  1996. #
  1997. #enabled: true
  1998.  
  1999. # Minimum accepted length for a password.
  2000. # Defaults to 0.
  2001. #
  2002. #minimum_length: 15
  2003.  
  2004. # Whether a password must contain at least one digit.
  2005. # Defaults to 'false'.
  2006. #
  2007. #require_digit: true
  2008.  
  2009. # Whether a password must contain at least one symbol.
  2010. # A symbol is any character that's not a number or a letter.
  2011. # Defaults to 'false'.
  2012. #
  2013. #require_symbol: true
  2014.  
  2015. # Whether a password must contain at least one lowercase letter.
  2016. # Defaults to 'false'.
  2017. #
  2018. #require_lowercase: true
  2019.  
  2020. # Whether a password must contain at least one lowercase letter.
  2021. # Defaults to 'false'.
  2022. #
  2023. #require_uppercase: true
  2024.  
  2025.  
  2026. # Configuration for sending emails from Synapse.
  2027. #
  2028. email:
  2029. # The hostname of the outgoing SMTP server to use. Defaults to 'localhost'.
  2030. #
  2031. #smtp_host: mail.server
  2032.  
  2033. # The port on the mail server for outgoing SMTP. Defaults to 25.
  2034. #
  2035. #smtp_port: 587
  2036.  
  2037. # Username/password for authentication to the SMTP server. By default, no
  2038. # authentication is attempted.
  2039. #
  2040. #smtp_user: "exampleusername"
  2041. #smtp_pass: "examplepassword"
  2042.  
  2043. # Uncomment the following to require TLS transport security for SMTP.
  2044. # By default, Synapse will connect over plain text, and will then switch to
  2045. # TLS via STARTTLS *if the SMTP server supports it*. If this option is set,
  2046. # Synapse will refuse to connect unless the server supports STARTTLS.
  2047. #
  2048. #require_transport_security: true
  2049.  
  2050. # notif_from defines the "From" address to use when sending emails.
  2051. # It must be set if email sending is enabled.
  2052. #
  2053. # The placeholder '%(app)s' will be replaced by the application name,
  2054. # which is normally 'app_name' (below), but may be overridden by the
  2055. # Matrix client application.
  2056. #
  2057. # Note that the placeholder must be written '%(app)s', including the
  2058. # trailing 's'.
  2059. #
  2060. #notif_from: "Your Friendly %(app)s homeserver <noreply@example.com>"
  2061.  
  2062. # app_name defines the default value for '%(app)s' in notif_from and email
  2063. # subjects. It defaults to 'Matrix'.
  2064. #
  2065. #app_name: my_branded_matrix_server
  2066.  
  2067. # Uncomment the following to enable sending emails for messages that the user
  2068. # has missed. Disabled by default.
  2069. #
  2070. #enable_notifs: true
  2071.  
  2072. # Uncomment the following to disable automatic subscription to email
  2073. # notifications for new users. Enabled by default.
  2074. #
  2075. #notif_for_new_users: false
  2076.  
  2077. # Custom URL for client links within the email notifications. By default
  2078. # links will be based on "https://matrix.to".
  2079. #
  2080. # (This setting used to be called riot_base_url; the old name is still
  2081. # supported for backwards-compatibility but is now deprecated.)
  2082. #
  2083. #client_base_url: "http://localhost/riot"
  2084.  
  2085. # Configure the time that a validation email will expire after sending.
  2086. # Defaults to 1h.
  2087. #
  2088. #validation_token_lifetime: 15m
  2089.  
  2090. # Directory in which Synapse will try to find the template files below.
  2091. # If not set, default templates from within the Synapse package will be used.
  2092. #
  2093. # Do not uncomment this setting unless you want to customise the templates.
  2094. #
  2095. # Synapse will look for the following templates in this directory:
  2096. #
  2097. # * The contents of email notifications of missed events: 'notif_mail.html' and
  2098. # 'notif_mail.txt'.
  2099. #
  2100. # * The contents of account expiry notice emails: 'notice_expiry.html' and
  2101. # 'notice_expiry.txt'.
  2102. #
  2103. # * The contents of password reset emails sent by the homeserver:
  2104. # 'password_reset.html' and 'password_reset.txt'
  2105. #
  2106. # * An HTML page that a user will see when they follow the link in the password
  2107. # reset email. The user will be asked to confirm the action before their
  2108. # password is reset: 'password_reset_confirmation.html'
  2109. #
  2110. # * HTML pages for success and failure that a user will see when they confirm
  2111. # the password reset flow using the page above: 'password_reset_success.html'
  2112. # and 'password_reset_failure.html'
  2113. #
  2114. # * The contents of address verification emails sent during registration:
  2115. # 'registration.html' and 'registration.txt'
  2116. #
  2117. # * HTML pages for success and failure that a user will see when they follow
  2118. # the link in an address verification email sent during registration:
  2119. # 'registration_success.html' and 'registration_failure.html'
  2120. #
  2121. # * The contents of address verification emails sent when an address is added
  2122. # to a Matrix account: 'add_threepid.html' and 'add_threepid.txt'
  2123. #
  2124. # * HTML pages for success and failure that a user will see when they follow
  2125. # the link in an address verification email sent when an address is added
  2126. # to a Matrix account: 'add_threepid_success.html' and
  2127. # 'add_threepid_failure.html'
  2128. #
  2129. # You can see the default templates at:
  2130. # https://github.com/matrix-org/synapse/tree/master/synapse/res/templates
  2131. #
  2132. #template_dir: "res/templates"
  2133.  
  2134. # Subjects to use when sending emails from Synapse.
  2135. #
  2136. # The placeholder '%(app)s' will be replaced with the value of the 'app_name'
  2137. # setting above, or by a value dictated by the Matrix client application.
  2138. #
  2139. # If a subject isn't overridden in this configuration file, the value used as
  2140. # its example will be used.
  2141. #
  2142. #subjects:
  2143.  
  2144. # Subjects for notification emails.
  2145. #
  2146. # On top of the '%(app)s' placeholder, these can use the following
  2147. # placeholders:
  2148. #
  2149. # * '%(person)s', which will be replaced by the display name of the user(s)
  2150. # that sent the message(s), e.g. "Alice and Bob".
  2151. # * '%(room)s', which will be replaced by the name of the room the
  2152. # message(s) have been sent to, e.g. "My super room".
  2153. #
  2154. # See the example provided for each setting to see which placeholder can be
  2155. # used and how to use them.
  2156. #
  2157. # Subject to use to notify about one message from one or more user(s) in a
  2158. # room which has a name.
  2159. #message_from_person_in_room: "[%(app)s] You have a message on %(app)s from %(person)s in the %(room)s room..."
  2160. #
  2161. # Subject to use to notify about one message from one or more user(s) in a
  2162. # room which doesn't have a name.
  2163. #message_from_person: "[%(app)s] You have a message on %(app)s from %(person)s..."
  2164. #
  2165. # Subject to use to notify about multiple messages from one or more users in
  2166. # a room which doesn't have a name.
  2167. #messages_from_person: "[%(app)s] You have messages on %(app)s from %(person)s..."
  2168. #
  2169. # Subject to use to notify about multiple messages in a room which has a
  2170. # name.
  2171. #messages_in_room: "[%(app)s] You have messages on %(app)s in the %(room)s room..."
  2172. #
  2173. # Subject to use to notify about multiple messages in multiple rooms.
  2174. #messages_in_room_and_others: "[%(app)s] You have messages on %(app)s in the %(room)s room and others..."
  2175. #
  2176. # Subject to use to notify about multiple messages from multiple persons in
  2177. # multiple rooms. This is similar to the setting above except it's used when
  2178. # the room in which the notification was triggered has no name.
  2179. #messages_from_person_and_others: "[%(app)s] You have messages on %(app)s from %(person)s and others..."
  2180. #
  2181. # Subject to use to notify about an invite to a room which has a name.
  2182. #invite_from_person_to_room: "[%(app)s] %(person)s has invited you to join the %(room)s room on %(app)s..."
  2183. #
  2184. # Subject to use to notify about an invite to a room which doesn't have a
  2185. # name.
  2186. #invite_from_person: "[%(app)s] %(person)s has invited you to chat on %(app)s..."
  2187.  
  2188. # Subject for emails related to account administration.
  2189. #
  2190. # On top of the '%(app)s' placeholder, these one can use the
  2191. # '%(server_name)s' placeholder, which will be replaced by the value of the
  2192. # 'server_name' setting in your Synapse configuration.
  2193. #
  2194. # Subject to use when sending a password reset email.
  2195. #password_reset: "[%(server_name)s] Password reset"
  2196. #
  2197. # Subject to use when sending a verification email to assert an address's
  2198. # ownership.
  2199. #email_validation: "[%(server_name)s] Validate your email"
  2200.  
  2201.  
  2202. # Password providers allow homeserver administrators to integrate
  2203. # their Synapse installation with existing authentication methods
  2204. # ex. LDAP, external tokens, etc.
  2205. #
  2206. # For more information and known implementations, please see
  2207. # https://github.com/matrix-org/synapse/blob/master/docs/password_auth_providers.md
  2208. #
  2209. # Note: instances wishing to use SAML or CAS authentication should
  2210. # instead use the `saml2_config` or `cas_config` options,
  2211. # respectively.
  2212. #
  2213. password_providers:
  2214. # # Example config for an LDAP auth provider
  2215. # - module: "ldap_auth_provider.LdapAuthProvider"
  2216. # config:
  2217. # enabled: true
  2218. # uri: "ldap://ldap.example.com:389"
  2219. # start_tls: true
  2220. # base: "ou=users,dc=example,dc=com"
  2221. # attributes:
  2222. # uid: "cn"
  2223. # mail: "email"
  2224. # name: "givenName"
  2225. # #bind_dn:
  2226. # #bind_password:
  2227. # #filter: "(objectClass=posixAccount)"
  2228.  
  2229.  
  2230.  
  2231. ## Push ##
  2232.  
  2233. push:
  2234. # Clients requesting push notifications can either have the body of
  2235. # the message sent in the notification poke along with other details
  2236. # like the sender, or just the event ID and room ID (`event_id_only`).
  2237. # If clients choose the former, this option controls whether the
  2238. # notification request includes the content of the event (other details
  2239. # like the sender are still included). For `event_id_only` push, it
  2240. # has no effect.
  2241. #
  2242. # For modern android devices the notification content will still appear
  2243. # because it is loaded by the app. iPhone, however will send a
  2244. # notification saying only that a message arrived and who it came from.
  2245. #
  2246. # The default value is "true" to include message details. Uncomment to only
  2247. # include the event ID and room ID in push notification payloads.
  2248. #
  2249. #include_content: false
  2250.  
  2251. # When a push notification is received, an unread count is also sent.
  2252. # This number can either be calculated as the number of unread messages
  2253. # for the user, or the number of *rooms* the user has unread messages in.
  2254. #
  2255. # The default value is "true", meaning push clients will see the number of
  2256. # rooms with unread messages in them. Uncomment to instead send the number
  2257. # of unread messages.
  2258. #
  2259. #group_unread_count_by_room: false
  2260.  
  2261.  
  2262. # Spam checkers are third-party modules that can block specific actions
  2263. # of local users, such as creating rooms and registering undesirable
  2264. # usernames, as well as remote users by redacting incoming events.
  2265. #
  2266. spam_checker:
  2267. #- module: "my_custom_project.SuperSpamChecker"
  2268. # config:
  2269. # example_option: 'things'
  2270. #- module: "some_other_project.BadEventStopper"
  2271. # config:
  2272. # example_stop_events_from: ['@bad:example.com']
  2273.  
  2274.  
  2275. ## Rooms ##
  2276.  
  2277. # Controls whether locally-created rooms should be end-to-end encrypted by
  2278. # default.
  2279. #
  2280. # Possible options are "all", "invite", and "off". They are defined as:
  2281. #
  2282. # * "all": any locally-created room
  2283. # * "invite": any room created with the "private_chat" or "trusted_private_chat"
  2284. # room creation presets
  2285. # * "off": this option will take no effect
  2286. #
  2287. # The default value is "off".
  2288. #
  2289. # Note that this option will only affect rooms created after it is set. It
  2290. # will also not affect rooms created by other servers.
  2291. #
  2292. #encryption_enabled_by_default_for_room_type: invite
  2293.  
  2294.  
  2295. # Uncomment to allow non-server-admin users to create groups on this server
  2296. #
  2297. #enable_group_creation: true
  2298.  
  2299. # If enabled, non server admins can only create groups with local parts
  2300. # starting with this prefix
  2301. #
  2302. #group_creation_prefix: "unofficial/"
  2303.  
  2304.  
  2305.  
  2306. # User Directory configuration
  2307. #
  2308. # 'enabled' defines whether users can search the user directory. If
  2309. # false then empty responses are returned to all queries. Defaults to
  2310. # true.
  2311. #
  2312. # 'search_all_users' defines whether to search all users visible to your HS
  2313. # when searching the user directory, rather than limiting to users visible
  2314. # in public rooms. Defaults to false. If you set it True, you'll have to
  2315. # rebuild the user_directory search indexes, see
  2316. # https://github.com/matrix-org/synapse/blob/master/docs/user_directory.md
  2317. #
  2318. #user_directory:
  2319. # enabled: true
  2320. # search_all_users: false
  2321.  
  2322.  
  2323. # User Consent configuration
  2324. #
  2325. # for detailed instructions, see
  2326. # https://github.com/matrix-org/synapse/blob/master/docs/consent_tracking.md
  2327. #
  2328. # Parts of this section are required if enabling the 'consent' resource under
  2329. # 'listeners', in particular 'template_dir' and 'version'.
  2330. #
  2331. # 'template_dir' gives the location of the templates for the HTML forms.
  2332. # This directory should contain one subdirectory per language (eg, 'en', 'fr'),
  2333. # and each language directory should contain the policy document (named as
  2334. # '<version>.html') and a success page (success.html).
  2335. #
  2336. # 'version' specifies the 'current' version of the policy document. It defines
  2337. # the version to be served by the consent resource if there is no 'v'
  2338. # parameter.
  2339. #
  2340. # 'server_notice_content', if enabled, will send a user a "Server Notice"
  2341. # asking them to consent to the privacy policy. The 'server_notices' section
  2342. # must also be configured for this to work. Notices will *not* be sent to
  2343. # guest users unless 'send_server_notice_to_guests' is set to true.
  2344. #
  2345. # 'block_events_error', if set, will block any attempts to send events
  2346. # until the user consents to the privacy policy. The value of the setting is
  2347. # used as the text of the error.
  2348. #
  2349. # 'require_at_registration', if enabled, will add a step to the registration
  2350. # process, similar to how captcha works. Users will be required to accept the
  2351. # policy before their account is created.
  2352. #
  2353. # 'policy_name' is the display name of the policy users will see when registering
  2354. # for an account. Has no effect unless `require_at_registration` is enabled.
  2355. # Defaults to "Privacy Policy".
  2356. #
  2357. #user_consent:
  2358. # template_dir: res/templates/privacy
  2359. # version: 1.0
  2360. # server_notice_content:
  2361. # msgtype: m.text
  2362. # body: >-
  2363. # To continue using this homeserver you must review and agree to the
  2364. # terms and conditions at %(consent_uri)s
  2365. # send_server_notice_to_guests: true
  2366. # block_events_error: >-
  2367. # To continue using this homeserver you must review and agree to the
  2368. # terms and conditions at %(consent_uri)s
  2369. # require_at_registration: false
  2370. # policy_name: Privacy Policy
  2371. #
  2372.  
  2373.  
  2374.  
  2375. # Local statistics collection. Used in populating the room directory.
  2376. #
  2377. # 'bucket_size' controls how large each statistics timeslice is. It can
  2378. # be defined in a human readable short form -- e.g. "1d", "1y".
  2379. #
  2380. # 'retention' controls how long historical statistics will be kept for.
  2381. # It can be defined in a human readable short form -- e.g. "1d", "1y".
  2382. #
  2383. #
  2384. #stats:
  2385. # enabled: true
  2386. # bucket_size: 1d
  2387. # retention: 1y
  2388.  
  2389.  
  2390. # Server Notices room configuration
  2391. #
  2392. # Uncomment this section to enable a room which can be used to send notices
  2393. # from the server to users. It is a special room which cannot be left; notices
  2394. # come from a special "notices" user id.
  2395. #
  2396. # If you uncomment this section, you *must* define the system_mxid_localpart
  2397. # setting, which defines the id of the user which will be used to send the
  2398. # notices.
  2399. #
  2400. # It's also possible to override the room name, the display name of the
  2401. # "notices" user, and the avatar for the user.
  2402. #
  2403. #server_notices:
  2404. # system_mxid_localpart: notices
  2405. # system_mxid_display_name: "Server Notices"
  2406. # system_mxid_avatar_url: "mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ"
  2407. # room_name: "Server Notices"
  2408.  
  2409.  
  2410.  
  2411. # Uncomment to disable searching the public room list. When disabled
  2412. # blocks searching local and remote room lists for local and remote
  2413. # users by always returning an empty list for all queries.
  2414. #
  2415. #enable_room_list_search: false
  2416.  
  2417. # The `alias_creation` option controls who's allowed to create aliases
  2418. # on this server.
  2419. #
  2420. # The format of this option is a list of rules that contain globs that
  2421. # match against user_id, room_id and the new alias (fully qualified with
  2422. # server name). The action in the first rule that matches is taken,
  2423. # which can currently either be "allow" or "deny".
  2424. #
  2425. # Missing user_id/room_id/alias fields default to "*".
  2426. #
  2427. # If no rules match the request is denied. An empty list means no one
  2428. # can create aliases.
  2429. #
  2430. # Options for the rules include:
  2431. #
  2432. # user_id: Matches against the creator of the alias
  2433. # alias: Matches against the alias being created
  2434. # room_id: Matches against the room ID the alias is being pointed at
  2435. # action: Whether to "allow" or "deny" the request if the rule matches
  2436. #
  2437. # The default is:
  2438. #
  2439. #alias_creation_rules:
  2440. # - user_id: "*"
  2441. # alias: "*"
  2442. # room_id: "*"
  2443. # action: allow
  2444.  
  2445. # The `room_list_publication_rules` option controls who can publish and
  2446. # which rooms can be published in the public room list.
  2447. #
  2448. # The format of this option is the same as that for
  2449. # `alias_creation_rules`.
  2450. #
  2451. # If the room has one or more aliases associated with it, only one of
  2452. # the aliases needs to match the alias rule. If there are no aliases
  2453. # then only rules with `alias: *` match.
  2454. #
  2455. # If no rules match the request is denied. An empty list means no one
  2456. # can publish rooms.
  2457. #
  2458. # Options for the rules include:
  2459. #
  2460. # user_id: Matches against the creator of the alias
  2461. # room_id: Matches against the room ID being published
  2462. # alias: Matches against any current local or canonical aliases
  2463. # associated with the room
  2464. # action: Whether to "allow" or "deny" the request if the rule matches
  2465. #
  2466. # The default is:
  2467. #
  2468. #room_list_publication_rules:
  2469. # - user_id: "*"
  2470. # alias: "*"
  2471. # room_id: "*"
  2472. # action: allow
  2473.  
  2474.  
  2475. # Server admins can define a Python module that implements extra rules for
  2476. # allowing or denying incoming events. In order to work, this module needs to
  2477. # override the methods defined in synapse/events/third_party_rules.py.
  2478. #
  2479. # This feature is designed to be used in closed federations only, where each
  2480. # participating server enforces the same rules.
  2481. #
  2482. #third_party_event_rules:
  2483. # module: "my_custom_project.SuperRulesSet"
  2484. # config:
  2485. # example_option: 'things'
  2486.  
  2487.  
  2488. ## Opentracing ##
  2489.  
  2490. # These settings enable opentracing, which implements distributed tracing.
  2491. # This allows you to observe the causal chains of events across servers
  2492. # including requests, key lookups etc., across any server running
  2493. # synapse or any other other services which supports opentracing
  2494. # (specifically those implemented with Jaeger).
  2495. #
  2496. opentracing:
  2497. # tracing is disabled by default. Uncomment the following line to enable it.
  2498. #
  2499. #enabled: true
  2500.  
  2501. # The list of homeservers we wish to send and receive span contexts and span baggage.
  2502. # See docs/opentracing.rst
  2503. # This is a list of regexes which are matched against the server_name of the
  2504. # homeserver.
  2505. #
  2506. # By default, it is empty, so no servers are matched.
  2507. #
  2508. #homeserver_whitelist:
  2509. # - ".*"
  2510.  
  2511. # Jaeger can be configured to sample traces at different rates.
  2512. # All configuration options provided by Jaeger can be set here.
  2513. # Jaeger's configuration mostly related to trace sampling which
  2514. # is documented here:
  2515. # https://www.jaegertracing.io/docs/1.13/sampling/.
  2516. #
  2517. #jaeger_config:
  2518. # sampler:
  2519. # type: const
  2520. # param: 1
  2521.  
  2522. # Logging whether spans were started and reported
  2523. #
  2524. # logging:
  2525. # false
  2526.  
  2527.  
  2528. ## Workers ##
  2529.  
  2530. # Disables sending of outbound federation transactions on the main process.
  2531. # Uncomment if using a federation sender worker.
  2532. #
  2533. #send_federation: false
  2534.  
  2535. # It is possible to run multiple federation sender workers, in which case the
  2536. # work is balanced across them.
  2537. #
  2538. # This configuration must be shared between all federation sender workers, and if
  2539. # changed all federation sender workers must be stopped at the same time and then
  2540. # started, to ensure that all instances are running with the same config (otherwise
  2541. # events may be dropped).
  2542. #
  2543. #federation_sender_instances:
  2544. # - federation_sender1
  2545.  
  2546. # When using workers this should be a map from `worker_name` to the
  2547. # HTTP replication listener of the worker, if configured.
  2548. #
  2549. #instance_map:
  2550. # worker1:
  2551. # host: localhost
  2552. # port: 8034
  2553.  
  2554. # Experimental: When using workers you can define which workers should
  2555. # handle event persistence and typing notifications. Any worker
  2556. # specified here must also be in the `instance_map`.
  2557. #
  2558. #stream_writers:
  2559. # events: worker1
  2560. # typing: worker1
  2561.  
  2562. # The worker that is used to run background tasks (e.g. cleaning up expired
  2563. # data). If not provided this defaults to the main process.
  2564. #
  2565. #run_background_tasks_on: worker1
  2566.  
  2567.  
  2568. # Configuration for Redis when using workers. This *must* be enabled when
  2569. # using workers (unless using old style direct TCP configuration).
  2570. #
  2571. redis:
  2572. # Uncomment the below to enable Redis support.
  2573. #
  2574. #enabled: true
  2575.  
  2576. # Optional host and port to use to connect to redis. Defaults to
  2577. # localhost and 6379
  2578. #
  2579. #host: localhost
  2580. #port: 6379
  2581.  
  2582. # Optional password if configured on the Redis instance
  2583. #
  2584. #password: <secret_password>
Add Comment
Please, Sign In to add comment