Guest User

homeserver.yaml

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