You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2607 lines
90 KiB

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