sample_config.yaml 68 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999
  1. # This file is maintained as an up-to-date snapshot of the default
  2. # homeserver.yaml configuration generated by Synapse.
  3. #
  4. # It is intended to act as a reference for the default configuration,
  5. # helping admins keep track of new options and other changes, and compare
  6. # their configs with the current default. As such, many of the actual
  7. # config values shown are placeholders.
  8. #
  9. # It is *not* intended to be copied and used as the basis for a real
  10. # homeserver.yaml. Instead, if you are starting from scratch, please generate
  11. # a fresh config using Synapse by following the instructions in INSTALL.md.
  12. ################################################################################
  13. # Configuration file for Synapse.
  14. #
  15. # This is a YAML file: see [1] for a quick introduction. Note in particular
  16. # that *indentation is important*: all the elements of a list or dictionary
  17. # should have the same indentation.
  18. #
  19. # [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
  20. ## Server ##
  21. # The domain name of the server, with optional explicit port.
  22. # This is used by remote servers to connect to this server,
  23. # e.g. matrix.org, localhost:8080, etc.
  24. # This is also the last part of your UserID.
  25. #
  26. server_name: "SERVERNAME"
  27. # When running as a daemon, the file to store the pid in
  28. #
  29. pid_file: DATADIR/homeserver.pid
  30. # The absolute URL to the web client which /_matrix/client will redirect
  31. # to if 'webclient' is configured under the 'listeners' configuration.
  32. #
  33. # This option can be also set to the filesystem path to the web client
  34. # which will be served at /_matrix/client/ if 'webclient' is configured
  35. # under the 'listeners' configuration, however this is a security risk:
  36. # https://github.com/matrix-org/synapse#security-note
  37. #
  38. #web_client_location: https://riot.example.com/
  39. # The public-facing base URL that clients use to access this HS
  40. # (not including _matrix/...). This is the same URL a user would
  41. # enter into the 'custom HS URL' field on their client. If you
  42. # use synapse with a reverse proxy, this should be the URL to reach
  43. # synapse via the proxy.
  44. #
  45. #public_baseurl: https://example.com/
  46. # Set the soft limit on the number of file descriptors synapse can use
  47. # Zero is used to indicate synapse should set the soft limit to the
  48. # hard limit.
  49. #
  50. #soft_file_limit: 0
  51. # Set to false to disable presence tracking on this homeserver.
  52. #
  53. #use_presence: false
  54. # Whether to require authentication to retrieve profile data (avatars,
  55. # display names) of other users through the client API. Defaults to
  56. # 'false'. Note that profile data is also available via the federation
  57. # API, so this setting is of limited value if federation is enabled on
  58. # the server.
  59. #
  60. #require_auth_for_profile_requests: true
  61. # Uncomment to require a user to share a room with another user in order
  62. # to retrieve their profile information. Only checked on Client-Server
  63. # requests. Profile requests from other servers should be checked by the
  64. # requesting server. Defaults to 'false'.
  65. #
  66. #limit_profile_requests_to_users_who_share_rooms: true
  67. # If set to 'true', removes the need for authentication to access the server's
  68. # public rooms directory through the client API, meaning that anyone can
  69. # query the room directory. Defaults to 'false'.
  70. #
  71. #allow_public_rooms_without_auth: true
  72. # If set to 'true', allows any other homeserver to fetch the server's public
  73. # rooms directory via federation. Defaults to 'false'.
  74. #
  75. #allow_public_rooms_over_federation: true
  76. # The default room version for newly created rooms.
  77. #
  78. # Known room versions are listed here:
  79. # https://matrix.org/docs/spec/#complete-list-of-room-versions
  80. #
  81. # For example, for room version 1, default_room_version should be set
  82. # to "1".
  83. #
  84. #default_room_version: "5"
  85. # The GC threshold parameters to pass to `gc.set_threshold`, if defined
  86. #
  87. #gc_thresholds: [700, 10, 10]
  88. # Set the limit on the returned events in the timeline in the get
  89. # and sync operations. The default value is -1, means no upper limit.
  90. #
  91. #filter_timeline_limit: 5000
  92. # Whether room invites to users on this server should be blocked
  93. # (except those sent by local server admins). The default is False.
  94. #
  95. #block_non_admin_invites: true
  96. # Room searching
  97. #
  98. # If disabled, new messages will not be indexed for searching and users
  99. # will receive errors when searching for messages. Defaults to enabled.
  100. #
  101. #enable_search: false
  102. # Restrict federation to the following whitelist of domains.
  103. # N.B. we recommend also firewalling your federation listener to limit
  104. # inbound federation traffic as early as possible, rather than relying
  105. # purely on this application-layer restriction. If not specified, the
  106. # default is to whitelist everything.
  107. #
  108. #federation_domain_whitelist:
  109. # - lon.example.com
  110. # - nyc.example.com
  111. # - syd.example.com
  112. # Prevent federation requests from being sent to the following
  113. # blacklist IP address CIDR ranges. If this option is not specified, or
  114. # specified with an empty list, no ip range blacklist will be enforced.
  115. #
  116. # As of Synapse v1.4.0 this option also affects any outbound requests to identity
  117. # servers provided by user input.
  118. #
  119. # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly
  120. # listed here, since they correspond to unroutable addresses.)
  121. #
  122. federation_ip_range_blacklist:
  123. - '127.0.0.0/8'
  124. - '10.0.0.0/8'
  125. - '172.16.0.0/12'
  126. - '192.168.0.0/16'
  127. - '100.64.0.0/10'
  128. - '169.254.0.0/16'
  129. - '::1/128'
  130. - 'fe80::/64'
  131. - 'fc00::/7'
  132. # List of ports that Synapse should listen on, their purpose and their
  133. # configuration.
  134. #
  135. # Options for each listener include:
  136. #
  137. # port: the TCP port to bind to
  138. #
  139. # bind_addresses: a list of local addresses to listen on. The default is
  140. # 'all local interfaces'.
  141. #
  142. # type: the type of listener. Normally 'http', but other valid options are:
  143. # 'manhole' (see docs/manhole.md),
  144. # 'metrics' (see docs/metrics-howto.md),
  145. # 'replication' (see docs/workers.md).
  146. #
  147. # tls: set to true to enable TLS for this listener. Will use the TLS
  148. # key/cert specified in tls_private_key_path / tls_certificate_path.
  149. #
  150. # x_forwarded: Only valid for an 'http' listener. Set to true to use the
  151. # X-Forwarded-For header as the client IP. Useful when Synapse is
  152. # behind a reverse-proxy.
  153. #
  154. # resources: Only valid for an 'http' listener. A list of resources to host
  155. # on this port. Options for each resource are:
  156. #
  157. # names: a list of names of HTTP resources. See below for a list of
  158. # valid resource names.
  159. #
  160. # compress: set to true to enable HTTP comression for this resource.
  161. #
  162. # additional_resources: Only valid for an 'http' listener. A map of
  163. # additional endpoints which should be loaded via dynamic modules.
  164. #
  165. # Valid resource names are:
  166. #
  167. # client: the client-server API (/_matrix/client), and the synapse admin
  168. # API (/_synapse/admin). Also implies 'media' and 'static'.
  169. #
  170. # consent: user consent forms (/_matrix/consent). See
  171. # docs/consent_tracking.md.
  172. #
  173. # federation: the server-server API (/_matrix/federation). Also implies
  174. # 'media', 'keys', 'openid'
  175. #
  176. # keys: the key discovery API (/_matrix/keys).
  177. #
  178. # media: the media API (/_matrix/media).
  179. #
  180. # metrics: the metrics interface. See docs/metrics-howto.md.
  181. #
  182. # openid: OpenID authentication.
  183. #
  184. # replication: the HTTP replication API (/_synapse/replication). See
  185. # docs/workers.md.
  186. #
  187. # static: static resources under synapse/static (/_matrix/static). (Mostly
  188. # useful for 'fallback authentication'.)
  189. #
  190. # webclient: A web client. Requires web_client_location to be set.
  191. #
  192. listeners:
  193. # TLS-enabled listener: for when matrix traffic is sent directly to synapse.
  194. #
  195. # Disabled by default. To enable it, uncomment the following. (Note that you
  196. # will also need to give Synapse a TLS key and certificate: see the TLS section
  197. # below.)
  198. #
  199. #- port: 8448
  200. # type: http
  201. # tls: true
  202. # resources:
  203. # - names: [client, federation]
  204. # Unsecure HTTP listener: for when matrix traffic passes through a reverse proxy
  205. # that unwraps TLS.
  206. #
  207. # If you plan to use a reverse proxy, please see
  208. # https://github.com/matrix-org/synapse/blob/master/docs/reverse_proxy.md.
  209. #
  210. - port: 8008
  211. tls: false
  212. type: http
  213. x_forwarded: true
  214. bind_addresses: ['::1', '127.0.0.1']
  215. resources:
  216. - names: [client, federation]
  217. compress: false
  218. # example additional_resources:
  219. #
  220. #additional_resources:
  221. # "/_matrix/my/custom/endpoint":
  222. # module: my_module.CustomRequestHandler
  223. # config: {}
  224. # Turn on the twisted ssh manhole service on localhost on the given
  225. # port.
  226. #
  227. #- port: 9000
  228. # bind_addresses: ['::1', '127.0.0.1']
  229. # type: manhole
  230. ## Homeserver blocking ##
  231. # How to reach the server admin, used in ResourceLimitError
  232. #
  233. #admin_contact: 'mailto:admin@server.com'
  234. # Global blocking
  235. #
  236. #hs_disabled: false
  237. #hs_disabled_message: 'Human readable reason for why the HS is blocked'
  238. # Monthly Active User Blocking
  239. #
  240. # Used in cases where the admin or server owner wants to limit to the
  241. # number of monthly active users.
  242. #
  243. # 'limit_usage_by_mau' disables/enables monthly active user blocking. When
  244. # anabled and a limit is reached the server returns a 'ResourceLimitError'
  245. # with error type Codes.RESOURCE_LIMIT_EXCEEDED
  246. #
  247. # 'max_mau_value' is the hard limit of monthly active users above which
  248. # the server will start blocking user actions.
  249. #
  250. # 'mau_trial_days' is a means to add a grace period for active users. It
  251. # means that users must be active for this number of days before they
  252. # can be considered active and guards against the case where lots of users
  253. # sign up in a short space of time never to return after their initial
  254. # session.
  255. #
  256. # 'mau_limit_alerting' is a means of limiting client side alerting
  257. # should the mau limit be reached. This is useful for small instances
  258. # where the admin has 5 mau seats (say) for 5 specific people and no
  259. # interest increasing the mau limit further. Defaults to True, which
  260. # means that alerting is enabled
  261. #
  262. #limit_usage_by_mau: false
  263. #max_mau_value: 50
  264. #mau_trial_days: 2
  265. #mau_limit_alerting: false
  266. # If enabled, the metrics for the number of monthly active users will
  267. # be populated, however no one will be limited. If limit_usage_by_mau
  268. # is true, this is implied to be true.
  269. #
  270. #mau_stats_only: false
  271. # Sometimes the server admin will want to ensure certain accounts are
  272. # never blocked by mau checking. These accounts are specified here.
  273. #
  274. #mau_limit_reserved_threepids:
  275. # - medium: 'email'
  276. # address: 'reserved_user@example.com'
  277. # Used by phonehome stats to group together related servers.
  278. #server_context: context
  279. # Resource-constrained homeserver Settings
  280. #
  281. # If limit_remote_rooms.enabled is True, the room complexity will be
  282. # checked before a user joins a new remote room. If it is above
  283. # limit_remote_rooms.complexity, it will disallow joining or
  284. # instantly leave.
  285. #
  286. # limit_remote_rooms.complexity_error can be set to customise the text
  287. # displayed to the user when a room above the complexity threshold has
  288. # its join cancelled.
  289. #
  290. # Uncomment the below lines to enable:
  291. #limit_remote_rooms:
  292. # enabled: true
  293. # complexity: 1.0
  294. # complexity_error: "This room is too complex."
  295. # Whether to require a user to be in the room to add an alias to it.
  296. # Defaults to 'true'.
  297. #
  298. #require_membership_for_aliases: false
  299. # Whether to allow per-room membership profiles through the send of membership
  300. # events with profile information that differ from the target's global profile.
  301. # Defaults to 'true'.
  302. #
  303. #allow_per_room_profiles: false
  304. # How long to keep redacted events in unredacted form in the database. After
  305. # this period redacted events get replaced with their redacted form in the DB.
  306. #
  307. # Defaults to `7d`. Set to `null` to disable.
  308. #
  309. #redaction_retention_period: 28d
  310. # How long to track users' last seen time and IPs in the database.
  311. #
  312. # Defaults to `28d`. Set to `null` to disable clearing out of old rows.
  313. #
  314. #user_ips_max_age: 14d
  315. # Message retention policy at the server level.
  316. #
  317. # Room admins and mods can define a retention period for their rooms using the
  318. # 'm.room.retention' state event, and server admins can cap this period by setting
  319. # the 'allowed_lifetime_min' and 'allowed_lifetime_max' config options.
  320. #
  321. # If this feature is enabled, Synapse will regularly look for and purge events
  322. # which are older than the room's maximum retention period. Synapse will also
  323. # filter events received over federation so that events that should have been
  324. # purged are ignored and not stored again.
  325. #
  326. retention:
  327. # The message retention policies feature is disabled by default. Uncomment the
  328. # following line to enable it.
  329. #
  330. #enabled: true
  331. # Default retention policy. If set, Synapse will apply it to rooms that lack the
  332. # 'm.room.retention' state event. Currently, the value of 'min_lifetime' doesn't
  333. # matter much because Synapse doesn't take it into account yet.
  334. #
  335. #default_policy:
  336. # min_lifetime: 1d
  337. # max_lifetime: 1y
  338. # Retention policy limits. If set, a user won't be able to send a
  339. # 'm.room.retention' event which features a 'min_lifetime' or a 'max_lifetime'
  340. # that's not within this range. This is especially useful in closed federations,
  341. # in which server admins can make sure every federating server applies the same
  342. # rules.
  343. #
  344. #allowed_lifetime_min: 1d
  345. #allowed_lifetime_max: 1y
  346. # Server admins can define the settings of the background jobs purging the
  347. # events which lifetime has expired under the 'purge_jobs' section.
  348. #
  349. # If no configuration is provided, a single job will be set up to delete expired
  350. # events in every room daily.
  351. #
  352. # Each job's configuration defines which range of message lifetimes the job
  353. # takes care of. For example, if 'shortest_max_lifetime' is '2d' and
  354. # 'longest_max_lifetime' is '3d', the job will handle purging expired events in
  355. # rooms whose state defines a 'max_lifetime' that's both higher than 2 days, and
  356. # lower than or equal to 3 days. Both the minimum and the maximum value of a
  357. # range are optional, e.g. a job with no 'shortest_max_lifetime' and a
  358. # 'longest_max_lifetime' of '3d' will handle every room with a retention policy
  359. # which 'max_lifetime' is lower than or equal to three days.
  360. #
  361. # The rationale for this per-job configuration is that some rooms might have a
  362. # retention policy with a low 'max_lifetime', where history needs to be purged
  363. # of outdated messages on a more frequent basis than for the rest of the rooms
  364. # (e.g. every 12h), but not want that purge to be performed by a job that's
  365. # iterating over every room it knows, which could be heavy on the server.
  366. #
  367. #purge_jobs:
  368. # - shortest_max_lifetime: 1d
  369. # longest_max_lifetime: 3d
  370. # interval: 12h
  371. # - shortest_max_lifetime: 3d
  372. # longest_max_lifetime: 1y
  373. # interval: 1d
  374. # Inhibits the /requestToken endpoints from returning an error that might leak
  375. # information about whether an e-mail address is in use or not on this
  376. # homeserver.
  377. # Note that for some endpoints the error situation is the e-mail already being
  378. # used, and for others the error is entering the e-mail being unused.
  379. # If this option is enabled, instead of returning an error, these endpoints will
  380. # act as if no error happened and return a fake session ID ('sid') to clients.
  381. #
  382. #request_token_inhibit_3pid_errors: true
  383. ## TLS ##
  384. # PEM-encoded X509 certificate for TLS.
  385. # This certificate, as of Synapse 1.0, will need to be a valid and verifiable
  386. # certificate, signed by a recognised Certificate Authority.
  387. #
  388. # See 'ACME support' below to enable auto-provisioning this certificate via
  389. # Let's Encrypt.
  390. #
  391. # If supplying your own, be sure to use a `.pem` file that includes the
  392. # full certificate chain including any intermediate certificates (for
  393. # instance, if using certbot, use `fullchain.pem` as your certificate,
  394. # not `cert.pem`).
  395. #
  396. #tls_certificate_path: "CONFDIR/SERVERNAME.tls.crt"
  397. # PEM-encoded private key for TLS
  398. #
  399. #tls_private_key_path: "CONFDIR/SERVERNAME.tls.key"
  400. # Whether to verify TLS server certificates for outbound federation requests.
  401. #
  402. # Defaults to `true`. To disable certificate verification, uncomment the
  403. # following line.
  404. #
  405. #federation_verify_certificates: false
  406. # The minimum TLS version that will be used for outbound federation requests.
  407. #
  408. # Defaults to `1`. Configurable to `1`, `1.1`, `1.2`, or `1.3`. Note
  409. # that setting this value higher than `1.2` will prevent federation to most
  410. # of the public Matrix network: only configure it to `1.3` if you have an
  411. # entirely private federation setup and you can ensure TLS 1.3 support.
  412. #
  413. #federation_client_minimum_tls_version: 1.2
  414. # Skip federation certificate verification on the following whitelist
  415. # of domains.
  416. #
  417. # This setting should only be used in very specific cases, such as
  418. # federation over Tor hidden services and similar. For private networks
  419. # of homeservers, you likely want to use a private CA instead.
  420. #
  421. # Only effective if federation_verify_certicates is `true`.
  422. #
  423. #federation_certificate_verification_whitelist:
  424. # - lon.example.com
  425. # - *.domain.com
  426. # - *.onion
  427. # List of custom certificate authorities for federation traffic.
  428. #
  429. # This setting should only normally be used within a private network of
  430. # homeservers.
  431. #
  432. # Note that this list will replace those that are provided by your
  433. # operating environment. Certificates must be in PEM format.
  434. #
  435. #federation_custom_ca_list:
  436. # - myCA1.pem
  437. # - myCA2.pem
  438. # - myCA3.pem
  439. # ACME support: This will configure Synapse to request a valid TLS certificate
  440. # for your configured `server_name` via Let's Encrypt.
  441. #
  442. # Note that ACME v1 is now deprecated, and Synapse currently doesn't support
  443. # ACME v2. This means that this feature currently won't work with installs set
  444. # up after November 2019. For more info, and alternative solutions, see
  445. # https://github.com/matrix-org/synapse/blob/master/docs/ACME.md#deprecation-of-acme-v1
  446. #
  447. # Note that provisioning a certificate in this way requires port 80 to be
  448. # routed to Synapse so that it can complete the http-01 ACME challenge.
  449. # By default, if you enable ACME support, Synapse will attempt to listen on
  450. # port 80 for incoming http-01 challenges - however, this will likely fail
  451. # with 'Permission denied' or a similar error.
  452. #
  453. # There are a couple of potential solutions to this:
  454. #
  455. # * If you already have an Apache, Nginx, or similar listening on port 80,
  456. # you can configure Synapse to use an alternate port, and have your web
  457. # server forward the requests. For example, assuming you set 'port: 8009'
  458. # below, on Apache, you would write:
  459. #
  460. # ProxyPass /.well-known/acme-challenge http://localhost:8009/.well-known/acme-challenge
  461. #
  462. # * Alternatively, you can use something like `authbind` to give Synapse
  463. # permission to listen on port 80.
  464. #
  465. acme:
  466. # ACME support is disabled by default. Set this to `true` and uncomment
  467. # tls_certificate_path and tls_private_key_path above to enable it.
  468. #
  469. enabled: false
  470. # Endpoint to use to request certificates. If you only want to test,
  471. # use Let's Encrypt's staging url:
  472. # https://acme-staging.api.letsencrypt.org/directory
  473. #
  474. #url: https://acme-v01.api.letsencrypt.org/directory
  475. # Port number to listen on for the HTTP-01 challenge. Change this if
  476. # you are forwarding connections through Apache/Nginx/etc.
  477. #
  478. port: 80
  479. # Local addresses to listen on for incoming connections.
  480. # Again, you may want to change this if you are forwarding connections
  481. # through Apache/Nginx/etc.
  482. #
  483. bind_addresses: ['::', '0.0.0.0']
  484. # How many days remaining on a certificate before it is renewed.
  485. #
  486. reprovision_threshold: 30
  487. # The domain that the certificate should be for. Normally this
  488. # should be the same as your Matrix domain (i.e., 'server_name'), but,
  489. # by putting a file at 'https://<server_name>/.well-known/matrix/server',
  490. # you can delegate incoming traffic to another server. If you do that,
  491. # you should give the target of the delegation here.
  492. #
  493. # For example: if your 'server_name' is 'example.com', but
  494. # 'https://example.com/.well-known/matrix/server' delegates to
  495. # 'matrix.example.com', you should put 'matrix.example.com' here.
  496. #
  497. # If not set, defaults to your 'server_name'.
  498. #
  499. domain: matrix.example.com
  500. # file to use for the account key. This will be generated if it doesn't
  501. # exist.
  502. #
  503. # If unspecified, we will use CONFDIR/client.key.
  504. #
  505. account_key_file: DATADIR/acme_account.key
  506. # List of allowed TLS fingerprints for this server to publish along
  507. # with the signing keys for this server. Other matrix servers that
  508. # make HTTPS requests to this server will check that the TLS
  509. # certificates returned by this server match one of the fingerprints.
  510. #
  511. # Synapse automatically adds the fingerprint of its own certificate
  512. # to the list. So if federation traffic is handled directly by synapse
  513. # then no modification to the list is required.
  514. #
  515. # If synapse is run behind a load balancer that handles the TLS then it
  516. # will be necessary to add the fingerprints of the certificates used by
  517. # the loadbalancers to this list if they are different to the one
  518. # synapse is using.
  519. #
  520. # Homeservers are permitted to cache the list of TLS fingerprints
  521. # returned in the key responses up to the "valid_until_ts" returned in
  522. # key. It may be necessary to publish the fingerprints of a new
  523. # certificate and wait until the "valid_until_ts" of the previous key
  524. # responses have passed before deploying it.
  525. #
  526. # You can calculate a fingerprint from a given TLS listener via:
  527. # openssl s_client -connect $host:$port < /dev/null 2> /dev/null |
  528. # openssl x509 -outform DER | openssl sha256 -binary | base64 | tr -d '='
  529. # or by checking matrix.org/federationtester/api/report?server_name=$host
  530. #
  531. #tls_fingerprints: [{"sha256": "<base64_encoded_sha256_fingerprint>"}]
  532. ## Database ##
  533. # The 'database' setting defines the database that synapse uses to store all of
  534. # its data.
  535. #
  536. # 'name' gives the database engine to use: either 'sqlite3' (for SQLite) or
  537. # 'psycopg2' (for PostgreSQL).
  538. #
  539. # 'args' gives options which are passed through to the database engine,
  540. # except for options starting 'cp_', which are used to configure the Twisted
  541. # connection pool. For a reference to valid arguments, see:
  542. # * for sqlite: https://docs.python.org/3/library/sqlite3.html#sqlite3.connect
  543. # * for postgres: https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
  544. # * for the connection pool: https://twistedmatrix.com/documents/current/api/twisted.enterprise.adbapi.ConnectionPool.html#__init__
  545. #
  546. #
  547. # Example SQLite configuration:
  548. #
  549. #database:
  550. # name: sqlite3
  551. # args:
  552. # database: /path/to/homeserver.db
  553. #
  554. #
  555. # Example Postgres configuration:
  556. #
  557. #database:
  558. # name: psycopg2
  559. # args:
  560. # user: synapse
  561. # password: secretpassword
  562. # database: synapse
  563. # host: localhost
  564. # cp_min: 5
  565. # cp_max: 10
  566. #
  567. # For more information on using Synapse with Postgres, see `docs/postgres.md`.
  568. #
  569. database:
  570. name: sqlite3
  571. args:
  572. database: DATADIR/homeserver.db
  573. # Number of events to cache in memory.
  574. #
  575. #event_cache_size: 10K
  576. ## Logging ##
  577. # A yaml python logging config file as described by
  578. # https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema
  579. #
  580. log_config: "CONFDIR/SERVERNAME.log.config"
  581. ## Ratelimiting ##
  582. # Ratelimiting settings for client actions (registration, login, messaging).
  583. #
  584. # Each ratelimiting configuration is made of two parameters:
  585. # - per_second: number of requests a client can send per second.
  586. # - burst_count: number of requests a client can send before being throttled.
  587. #
  588. # Synapse currently uses the following configurations:
  589. # - one for messages that ratelimits sending based on the account the client
  590. # is using
  591. # - one for registration that ratelimits registration requests based on the
  592. # client's IP address.
  593. # - one for login that ratelimits login requests based on the client's IP
  594. # address.
  595. # - one for login that ratelimits login requests based on the account the
  596. # client is attempting to log into.
  597. # - one for login that ratelimits login requests based on the account the
  598. # client is attempting to log into, based on the amount of failed login
  599. # attempts for this account.
  600. # - one for ratelimiting redactions by room admins. If this is not explicitly
  601. # set then it uses the same ratelimiting as per rc_message. This is useful
  602. # to allow room admins to deal with abuse quickly.
  603. #
  604. # The defaults are as shown below.
  605. #
  606. #rc_message:
  607. # per_second: 0.2
  608. # burst_count: 10
  609. #
  610. #rc_registration:
  611. # per_second: 0.17
  612. # burst_count: 3
  613. #
  614. #rc_login:
  615. # address:
  616. # per_second: 0.17
  617. # burst_count: 3
  618. # account:
  619. # per_second: 0.17
  620. # burst_count: 3
  621. # failed_attempts:
  622. # per_second: 0.17
  623. # burst_count: 3
  624. #
  625. #rc_admin_redaction:
  626. # per_second: 1
  627. # burst_count: 50
  628. # Ratelimiting settings for incoming federation
  629. #
  630. # The rc_federation configuration is made up of the following settings:
  631. # - window_size: window size in milliseconds
  632. # - sleep_limit: number of federation requests from a single server in
  633. # a window before the server will delay processing the request.
  634. # - sleep_delay: duration in milliseconds to delay processing events
  635. # from remote servers by if they go over the sleep limit.
  636. # - reject_limit: maximum number of concurrent federation requests
  637. # allowed from a single server
  638. # - concurrent: number of federation requests to concurrently process
  639. # from a single server
  640. #
  641. # The defaults are as shown below.
  642. #
  643. #rc_federation:
  644. # window_size: 1000
  645. # sleep_limit: 10
  646. # sleep_delay: 500
  647. # reject_limit: 50
  648. # concurrent: 3
  649. # Target outgoing federation transaction frequency for sending read-receipts,
  650. # per-room.
  651. #
  652. # If we end up trying to send out more read-receipts, they will get buffered up
  653. # into fewer transactions.
  654. #
  655. #federation_rr_transactions_per_room_per_second: 50
  656. ## Media Store ##
  657. # Enable the media store service in the Synapse master. Uncomment the
  658. # following if you are using a separate media store worker.
  659. #
  660. #enable_media_repo: false
  661. # Directory where uploaded images and attachments are stored.
  662. #
  663. media_store_path: "DATADIR/media_store"
  664. # Media storage providers allow media to be stored in different
  665. # locations.
  666. #
  667. #media_storage_providers:
  668. # - module: file_system
  669. # # Whether to store newly uploaded local files
  670. # store_local: false
  671. # # Whether to store newly downloaded remote files
  672. # store_remote: false
  673. # # Whether to wait for successful storage for local uploads
  674. # store_synchronous: false
  675. # config:
  676. # directory: /mnt/some/other/directory
  677. # The largest allowed upload size in bytes
  678. #
  679. #max_upload_size: 10M
  680. # Maximum number of pixels that will be thumbnailed
  681. #
  682. #max_image_pixels: 32M
  683. # Whether to generate new thumbnails on the fly to precisely match
  684. # the resolution requested by the client. If true then whenever
  685. # a new resolution is requested by the client the server will
  686. # generate a new thumbnail. If false the server will pick a thumbnail
  687. # from a precalculated list.
  688. #
  689. #dynamic_thumbnails: false
  690. # List of thumbnails to precalculate when an image is uploaded.
  691. #
  692. #thumbnail_sizes:
  693. # - width: 32
  694. # height: 32
  695. # method: crop
  696. # - width: 96
  697. # height: 96
  698. # method: crop
  699. # - width: 320
  700. # height: 240
  701. # method: scale
  702. # - width: 640
  703. # height: 480
  704. # method: scale
  705. # - width: 800
  706. # height: 600
  707. # method: scale
  708. # Is the preview URL API enabled?
  709. #
  710. # 'false' by default: uncomment the following to enable it (and specify a
  711. # url_preview_ip_range_blacklist blacklist).
  712. #
  713. #url_preview_enabled: true
  714. # List of IP address CIDR ranges that the URL preview spider is denied
  715. # from accessing. There are no defaults: you must explicitly
  716. # specify a list for URL previewing to work. You should specify any
  717. # internal services in your network that you do not want synapse to try
  718. # to connect to, otherwise anyone in any Matrix room could cause your
  719. # synapse to issue arbitrary GET requests to your internal services,
  720. # causing serious security issues.
  721. #
  722. # (0.0.0.0 and :: are always blacklisted, whether or not they are explicitly
  723. # listed here, since they correspond to unroutable addresses.)
  724. #
  725. # This must be specified if url_preview_enabled is set. It is recommended that
  726. # you uncomment the following list as a starting point.
  727. #
  728. #url_preview_ip_range_blacklist:
  729. # - '127.0.0.0/8'
  730. # - '10.0.0.0/8'
  731. # - '172.16.0.0/12'
  732. # - '192.168.0.0/16'
  733. # - '100.64.0.0/10'
  734. # - '169.254.0.0/16'
  735. # - '::1/128'
  736. # - 'fe80::/64'
  737. # - 'fc00::/7'
  738. # List of IP address CIDR ranges that the URL preview spider is allowed
  739. # to access even if they are specified in url_preview_ip_range_blacklist.
  740. # This is useful for specifying exceptions to wide-ranging blacklisted
  741. # target IP ranges - e.g. for enabling URL previews for a specific private
  742. # website only visible in your network.
  743. #
  744. #url_preview_ip_range_whitelist:
  745. # - '192.168.1.1'
  746. # Optional list of URL matches that the URL preview spider is
  747. # denied from accessing. You should use url_preview_ip_range_blacklist
  748. # in preference to this, otherwise someone could define a public DNS
  749. # entry that points to a private IP address and circumvent the blacklist.
  750. # This is more useful if you know there is an entire shape of URL that
  751. # you know that will never want synapse to try to spider.
  752. #
  753. # Each list entry is a dictionary of url component attributes as returned
  754. # by urlparse.urlsplit as applied to the absolute form of the URL. See
  755. # https://docs.python.org/2/library/urlparse.html#urlparse.urlsplit
  756. # The values of the dictionary are treated as an filename match pattern
  757. # applied to that component of URLs, unless they start with a ^ in which
  758. # case they are treated as a regular expression match. If all the
  759. # specified component matches for a given list item succeed, the URL is
  760. # blacklisted.
  761. #
  762. #url_preview_url_blacklist:
  763. # # blacklist any URL with a username in its URI
  764. # - username: '*'
  765. #
  766. # # blacklist all *.google.com URLs
  767. # - netloc: 'google.com'
  768. # - netloc: '*.google.com'
  769. #
  770. # # blacklist all plain HTTP URLs
  771. # - scheme: 'http'
  772. #
  773. # # blacklist http(s)://www.acme.com/foo
  774. # - netloc: 'www.acme.com'
  775. # path: '/foo'
  776. #
  777. # # blacklist any URL with a literal IPv4 address
  778. # - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
  779. # The largest allowed URL preview spidering size in bytes
  780. #
  781. #max_spider_size: 10M
  782. # A list of values for the Accept-Language HTTP header used when
  783. # downloading webpages during URL preview generation. This allows
  784. # Synapse to specify the preferred languages that URL previews should
  785. # be in when communicating with remote servers.
  786. #
  787. # Each value is a IETF language tag; a 2-3 letter identifier for a
  788. # language, optionally followed by subtags separated by '-', specifying
  789. # a country or region variant.
  790. #
  791. # Multiple values can be provided, and a weight can be added to each by
  792. # using quality value syntax (;q=). '*' translates to any language.
  793. #
  794. # Defaults to "en".
  795. #
  796. # Example:
  797. #
  798. # url_preview_accept_language:
  799. # - en-UK
  800. # - en-US;q=0.9
  801. # - fr;q=0.8
  802. # - *;q=0.7
  803. #
  804. url_preview_accept_language:
  805. # - en
  806. ## Captcha ##
  807. # See docs/CAPTCHA_SETUP for full details of configuring this.
  808. # This homeserver's ReCAPTCHA public key.
  809. #
  810. #recaptcha_public_key: "YOUR_PUBLIC_KEY"
  811. # This homeserver's ReCAPTCHA private key.
  812. #
  813. #recaptcha_private_key: "YOUR_PRIVATE_KEY"
  814. # Enables ReCaptcha checks when registering, preventing signup
  815. # unless a captcha is answered. Requires a valid ReCaptcha
  816. # public/private key.
  817. #
  818. #enable_registration_captcha: false
  819. # The API endpoint to use for verifying m.login.recaptcha responses.
  820. #
  821. #recaptcha_siteverify_api: "https://www.recaptcha.net/recaptcha/api/siteverify"
  822. ## TURN ##
  823. # The public URIs of the TURN server to give to clients
  824. #
  825. #turn_uris: []
  826. # The shared secret used to compute passwords for the TURN server
  827. #
  828. #turn_shared_secret: "YOUR_SHARED_SECRET"
  829. # The Username and password if the TURN server needs them and
  830. # does not use a token
  831. #
  832. #turn_username: "TURNSERVER_USERNAME"
  833. #turn_password: "TURNSERVER_PASSWORD"
  834. # How long generated TURN credentials last
  835. #
  836. #turn_user_lifetime: 1h
  837. # Whether guests should be allowed to use the TURN server.
  838. # This defaults to True, otherwise VoIP will be unreliable for guests.
  839. # However, it does introduce a slight security risk as it allows users to
  840. # connect to arbitrary endpoints without having first signed up for a
  841. # valid account (e.g. by passing a CAPTCHA).
  842. #
  843. #turn_allow_guests: true
  844. ## Registration ##
  845. #
  846. # Registration can be rate-limited using the parameters in the "Ratelimiting"
  847. # section of this file.
  848. # Enable registration for new users.
  849. #
  850. #enable_registration: false
  851. # Optional account validity configuration. This allows for accounts to be denied
  852. # any request after a given period.
  853. #
  854. # Once this feature is enabled, Synapse will look for registered users without an
  855. # expiration date at startup and will add one to every account it found using the
  856. # current settings at that time.
  857. # This means that, if a validity period is set, and Synapse is restarted (it will
  858. # then derive an expiration date from the current validity period), and some time
  859. # after that the validity period changes and Synapse is restarted, the users'
  860. # expiration dates won't be updated unless their account is manually renewed. This
  861. # date will be randomly selected within a range [now + period - d ; now + period],
  862. # where d is equal to 10% of the validity period.
  863. #
  864. account_validity:
  865. # The account validity feature is disabled by default. Uncomment the
  866. # following line to enable it.
  867. #
  868. #enabled: true
  869. # The period after which an account is valid after its registration. When
  870. # renewing the account, its validity period will be extended by this amount
  871. # of time. This parameter is required when using the account validity
  872. # feature.
  873. #
  874. #period: 6w
  875. # The amount of time before an account's expiry date at which Synapse will
  876. # send an email to the account's email address with a renewal link. By
  877. # default, no such emails are sent.
  878. #
  879. # If you enable this setting, you will also need to fill out the 'email' and
  880. # 'public_baseurl' configuration sections.
  881. #
  882. #renew_at: 1w
  883. # The subject of the email sent out with the renewal link. '%(app)s' can be
  884. # used as a placeholder for the 'app_name' parameter from the 'email'
  885. # section.
  886. #
  887. # Note that the placeholder must be written '%(app)s', including the
  888. # trailing 's'.
  889. #
  890. # If this is not set, a default value is used.
  891. #
  892. #renew_email_subject: "Renew your %(app)s account"
  893. # Directory in which Synapse will try to find templates for the HTML files to
  894. # serve to the user when trying to renew an account. If not set, default
  895. # templates from within the Synapse package will be used.
  896. #
  897. #template_dir: "res/templates"
  898. # File within 'template_dir' giving the HTML to be displayed to the user after
  899. # they successfully renewed their account. If not set, default text is used.
  900. #
  901. #account_renewed_html_path: "account_renewed.html"
  902. # File within 'template_dir' giving the HTML to be displayed when the user
  903. # tries to renew an account with an invalid renewal token. If not set,
  904. # default text is used.
  905. #
  906. #invalid_token_html_path: "invalid_token.html"
  907. # Time that a user's session remains valid for, after they log in.
  908. #
  909. # Note that this is not currently compatible with guest logins.
  910. #
  911. # Note also that this is calculated at login time: changes are not applied
  912. # retrospectively to users who have already logged in.
  913. #
  914. # By default, this is infinite.
  915. #
  916. #session_lifetime: 24h
  917. # The user must provide all of the below types of 3PID when registering.
  918. #
  919. #registrations_require_3pid:
  920. # - email
  921. # - msisdn
  922. # Explicitly disable asking for MSISDNs from the registration
  923. # flow (overrides registrations_require_3pid if MSISDNs are set as required)
  924. #
  925. #disable_msisdn_registration: true
  926. # Mandate that users are only allowed to associate certain formats of
  927. # 3PIDs with accounts on this server.
  928. #
  929. #allowed_local_3pids:
  930. # - medium: email
  931. # pattern: '.*@matrix\.org'
  932. # - medium: email
  933. # pattern: '.*@vector\.im'
  934. # - medium: msisdn
  935. # pattern: '\+44'
  936. # Enable 3PIDs lookup requests to identity servers from this server.
  937. #
  938. #enable_3pid_lookup: true
  939. # If set, allows registration of standard or admin accounts by anyone who
  940. # has the shared secret, even if registration is otherwise disabled.
  941. #
  942. # registration_shared_secret: <PRIVATE STRING>
  943. # Set the number of bcrypt rounds used to generate password hash.
  944. # Larger numbers increase the work factor needed to generate the hash.
  945. # The default number is 12 (which equates to 2^12 rounds).
  946. # N.B. that increasing this will exponentially increase the time required
  947. # to register or login - e.g. 24 => 2^24 rounds which will take >20 mins.
  948. #
  949. #bcrypt_rounds: 12
  950. # Allows users to register as guests without a password/email/etc, and
  951. # participate in rooms hosted on this server which have been made
  952. # accessible to anonymous users.
  953. #
  954. #allow_guest_access: false
  955. # The identity server which we suggest that clients should use when users log
  956. # in on this server.
  957. #
  958. # (By default, no suggestion is made, so it is left up to the client.
  959. # This setting is ignored unless public_baseurl is also set.)
  960. #
  961. #default_identity_server: https://matrix.org
  962. # The list of identity servers trusted to verify third party
  963. # identifiers by this server.
  964. #
  965. # Also defines the ID server which will be called when an account is
  966. # deactivated (one will be picked arbitrarily).
  967. #
  968. # Note: This option is deprecated. Since v0.99.4, Synapse has tracked which identity
  969. # server a 3PID has been bound to. For 3PIDs bound before then, Synapse runs a
  970. # background migration script, informing itself that the identity server all of its
  971. # 3PIDs have been bound to is likely one of the below.
  972. #
  973. # As of Synapse v1.4.0, all other functionality of this option has been deprecated, and
  974. # it is now solely used for the purposes of the background migration script, and can be
  975. # removed once it has run.
  976. #trusted_third_party_id_servers:
  977. # - matrix.org
  978. # - vector.im
  979. # Handle threepid (email/phone etc) registration and password resets through a set of
  980. # *trusted* identity servers. Note that this allows the configured identity server to
  981. # reset passwords for accounts!
  982. #
  983. # Be aware that if `email` is not set, and SMTP options have not been
  984. # configured in the email config block, registration and user password resets via
  985. # email will be globally disabled.
  986. #
  987. # Additionally, if `msisdn` is not set, registration and password resets via msisdn
  988. # will be disabled regardless. This is due to Synapse currently not supporting any
  989. # method of sending SMS messages on its own.
  990. #
  991. # To enable using an identity server for operations regarding a particular third-party
  992. # identifier type, set the value to the URL of that identity server as shown in the
  993. # examples below.
  994. #
  995. # Servers handling the these requests must answer the `/requestToken` endpoints defined
  996. # by the Matrix Identity Service API specification:
  997. # https://matrix.org/docs/spec/identity_service/latest
  998. #
  999. # If a delegate is specified, the config option public_baseurl must also be filled out.
  1000. #
  1001. account_threepid_delegates:
  1002. #email: https://example.com # Delegate email sending to example.com
  1003. #msisdn: http://localhost:8090 # Delegate SMS sending to this local process
  1004. # Whether users are allowed to change their displayname after it has
  1005. # been initially set. Useful when provisioning users based on the
  1006. # contents of a third-party directory.
  1007. #
  1008. # Does not apply to server administrators. Defaults to 'true'
  1009. #
  1010. #enable_set_displayname: false
  1011. # Whether users are allowed to change their avatar after it has been
  1012. # initially set. Useful when provisioning users based on the contents
  1013. # of a third-party directory.
  1014. #
  1015. # Does not apply to server administrators. Defaults to 'true'
  1016. #
  1017. #enable_set_avatar_url: false
  1018. # Whether users can change the 3PIDs associated with their accounts
  1019. # (email address and msisdn).
  1020. #
  1021. # Defaults to 'true'
  1022. #
  1023. #enable_3pid_changes: false
  1024. # Users who register on this homeserver will automatically be joined
  1025. # to these rooms
  1026. #
  1027. #auto_join_rooms:
  1028. # - "#example:example.com"
  1029. # Where auto_join_rooms are specified, setting this flag ensures that the
  1030. # the rooms exist by creating them when the first user on the
  1031. # homeserver registers.
  1032. # Setting to false means that if the rooms are not manually created,
  1033. # users cannot be auto-joined since they do not exist.
  1034. #
  1035. #autocreate_auto_join_rooms: true
  1036. ## Metrics ###
  1037. # Enable collection and rendering of performance metrics
  1038. #
  1039. #enable_metrics: false
  1040. # Enable sentry integration
  1041. # NOTE: While attempts are made to ensure that the logs don't contain
  1042. # any sensitive information, this cannot be guaranteed. By enabling
  1043. # this option the sentry server may therefore receive sensitive
  1044. # information, and it in turn may then diseminate sensitive information
  1045. # through insecure notification channels if so configured.
  1046. #
  1047. #sentry:
  1048. # dsn: "..."
  1049. # Flags to enable Prometheus metrics which are not suitable to be
  1050. # enabled by default, either for performance reasons or limited use.
  1051. #
  1052. metrics_flags:
  1053. # Publish synapse_federation_known_servers, a gauge of the number of
  1054. # servers this homeserver knows about, including itself. May cause
  1055. # performance problems on large homeservers.
  1056. #
  1057. #known_servers: true
  1058. # Whether or not to report anonymized homeserver usage statistics.
  1059. # report_stats: true|false
  1060. # The endpoint to report the anonymized homeserver usage statistics to.
  1061. # Defaults to https://matrix.org/report-usage-stats/push
  1062. #
  1063. #report_stats_endpoint: https://example.com/report-usage-stats/push
  1064. ## API Configuration ##
  1065. # A list of event types that will be included in the room_invite_state
  1066. #
  1067. #room_invite_state_types:
  1068. # - "m.room.join_rules"
  1069. # - "m.room.canonical_alias"
  1070. # - "m.room.avatar"
  1071. # - "m.room.encryption"
  1072. # - "m.room.name"
  1073. # A list of application service config files to use
  1074. #
  1075. #app_service_config_files:
  1076. # - app_service_1.yaml
  1077. # - app_service_2.yaml
  1078. # Uncomment to enable tracking of application service IP addresses. Implicitly
  1079. # enables MAU tracking for application service users.
  1080. #
  1081. #track_appservice_user_ips: true
  1082. # a secret which is used to sign access tokens. If none is specified,
  1083. # the registration_shared_secret is used, if one is given; otherwise,
  1084. # a secret key is derived from the signing key.
  1085. #
  1086. # macaroon_secret_key: <PRIVATE STRING>
  1087. # a secret which is used to calculate HMACs for form values, to stop
  1088. # falsification of values. Must be specified for the User Consent
  1089. # forms to work.
  1090. #
  1091. # form_secret: <PRIVATE STRING>
  1092. ## Signing Keys ##
  1093. # Path to the signing key to sign messages with
  1094. #
  1095. signing_key_path: "CONFDIR/SERVERNAME.signing.key"
  1096. # The keys that the server used to sign messages with but won't use
  1097. # to sign new messages.
  1098. #
  1099. old_signing_keys:
  1100. # For each key, `key` should be the base64-encoded public key, and
  1101. # `expired_ts`should be the time (in milliseconds since the unix epoch) that
  1102. # it was last used.
  1103. #
  1104. # It is possible to build an entry from an old signing.key file using the
  1105. # `export_signing_key` script which is provided with synapse.
  1106. #
  1107. # For example:
  1108. #
  1109. #"ed25519:id": { key: "base64string", expired_ts: 123456789123 }
  1110. # How long key response published by this server is valid for.
  1111. # Used to set the valid_until_ts in /key/v2 APIs.
  1112. # Determines how quickly servers will query to check which keys
  1113. # are still valid.
  1114. #
  1115. #key_refresh_interval: 1d
  1116. # The trusted servers to download signing keys from.
  1117. #
  1118. # When we need to fetch a signing key, each server is tried in parallel.
  1119. #
  1120. # Normally, the connection to the key server is validated via TLS certificates.
  1121. # Additional security can be provided by configuring a `verify key`, which
  1122. # will make synapse check that the response is signed by that key.
  1123. #
  1124. # This setting supercedes an older setting named `perspectives`. The old format
  1125. # is still supported for backwards-compatibility, but it is deprecated.
  1126. #
  1127. # 'trusted_key_servers' defaults to matrix.org, but using it will generate a
  1128. # warning on start-up. To suppress this warning, set
  1129. # 'suppress_key_server_warning' to true.
  1130. #
  1131. # Options for each entry in the list include:
  1132. #
  1133. # server_name: the name of the server. required.
  1134. #
  1135. # verify_keys: an optional map from key id to base64-encoded public key.
  1136. # If specified, we will check that the response is signed by at least
  1137. # one of the given keys.
  1138. #
  1139. # accept_keys_insecurely: a boolean. Normally, if `verify_keys` is unset,
  1140. # and federation_verify_certificates is not `true`, synapse will refuse
  1141. # to start, because this would allow anyone who can spoof DNS responses
  1142. # to masquerade as the trusted key server. If you know what you are doing
  1143. # and are sure that your network environment provides a secure connection
  1144. # to the key server, you can set this to `true` to override this
  1145. # behaviour.
  1146. #
  1147. # An example configuration might look like:
  1148. #
  1149. #trusted_key_servers:
  1150. # - server_name: "my_trusted_server.example.com"
  1151. # verify_keys:
  1152. # "ed25519:auto": "abcdefghijklmnopqrstuvwxyzabcdefghijklmopqr"
  1153. # - server_name: "my_other_trusted_server.example.com"
  1154. #
  1155. trusted_key_servers:
  1156. - server_name: "matrix.org"
  1157. # Uncomment the following to disable the warning that is emitted when the
  1158. # trusted_key_servers include 'matrix.org'. See above.
  1159. #
  1160. #suppress_key_server_warning: true
  1161. # The signing keys to use when acting as a trusted key server. If not specified
  1162. # defaults to the server signing key.
  1163. #
  1164. # Can contain multiple keys, one per line.
  1165. #
  1166. #key_server_signing_keys_path: "key_server_signing_keys.key"
  1167. # Enable SAML2 for registration and login. Uses pysaml2.
  1168. #
  1169. # At least one of `sp_config` or `config_path` must be set in this section to
  1170. # enable SAML login.
  1171. #
  1172. # (You will probably also want to set the following options to `false` to
  1173. # disable the regular login/registration flows:
  1174. # * enable_registration
  1175. # * password_config.enabled
  1176. #
  1177. # Once SAML support is enabled, a metadata file will be exposed at
  1178. # https://<server>:<port>/_matrix/saml2/metadata.xml, which you may be able to
  1179. # use to configure your SAML IdP with. Alternatively, you can manually configure
  1180. # the IdP to use an ACS location of
  1181. # https://<server>:<port>/_matrix/saml2/authn_response.
  1182. #
  1183. saml2_config:
  1184. # `sp_config` is the configuration for the pysaml2 Service Provider.
  1185. # See pysaml2 docs for format of config.
  1186. #
  1187. # Default values will be used for the 'entityid' and 'service' settings,
  1188. # so it is not normally necessary to specify them unless you need to
  1189. # override them.
  1190. #
  1191. #sp_config:
  1192. # # point this to the IdP's metadata. You can use either a local file or
  1193. # # (preferably) a URL.
  1194. # metadata:
  1195. # #local: ["saml2/idp.xml"]
  1196. # remote:
  1197. # - url: https://our_idp/metadata.xml
  1198. #
  1199. # # By default, the user has to go to our login page first. If you'd like
  1200. # # to allow IdP-initiated login, set 'allow_unsolicited: true' in a
  1201. # # 'service.sp' section:
  1202. # #
  1203. # #service:
  1204. # # sp:
  1205. # # allow_unsolicited: true
  1206. #
  1207. # # The examples below are just used to generate our metadata xml, and you
  1208. # # may well not need them, depending on your setup. Alternatively you
  1209. # # may need a whole lot more detail - see the pysaml2 docs!
  1210. #
  1211. # description: ["My awesome SP", "en"]
  1212. # name: ["Test SP", "en"]
  1213. #
  1214. # organization:
  1215. # name: Example com
  1216. # display_name:
  1217. # - ["Example co", "en"]
  1218. # url: "http://example.com"
  1219. #
  1220. # contact_person:
  1221. # - given_name: Bob
  1222. # sur_name: "the Sysadmin"
  1223. # email_address": ["admin@example.com"]
  1224. # contact_type": technical
  1225. # Instead of putting the config inline as above, you can specify a
  1226. # separate pysaml2 configuration file:
  1227. #
  1228. #config_path: "CONFDIR/sp_conf.py"
  1229. # The lifetime of a SAML session. This defines how long a user has to
  1230. # complete the authentication process, if allow_unsolicited is unset.
  1231. # The default is 5 minutes.
  1232. #
  1233. #saml_session_lifetime: 5m
  1234. # An external module can be provided here as a custom solution to
  1235. # mapping attributes returned from a saml provider onto a matrix user.
  1236. #
  1237. user_mapping_provider:
  1238. # The custom module's class. Uncomment to use a custom module.
  1239. #
  1240. #module: mapping_provider.SamlMappingProvider
  1241. # Custom configuration values for the module. Below options are
  1242. # intended for the built-in provider, they should be changed if
  1243. # using a custom module. This section will be passed as a Python
  1244. # dictionary to the module's `parse_config` method.
  1245. #
  1246. config:
  1247. # The SAML attribute (after mapping via the attribute maps) to use
  1248. # to derive the Matrix ID from. 'uid' by default.
  1249. #
  1250. # Note: This used to be configured by the
  1251. # saml2_config.mxid_source_attribute option. If that is still
  1252. # defined, its value will be used instead.
  1253. #
  1254. #mxid_source_attribute: displayName
  1255. # The mapping system to use for mapping the saml attribute onto a
  1256. # matrix ID.
  1257. #
  1258. # Options include:
  1259. # * 'hexencode' (which maps unpermitted characters to '=xx')
  1260. # * 'dotreplace' (which replaces unpermitted characters with
  1261. # '.').
  1262. # The default is 'hexencode'.
  1263. #
  1264. # Note: This used to be configured by the
  1265. # saml2_config.mxid_mapping option. If that is still defined, its
  1266. # value will be used instead.
  1267. #
  1268. #mxid_mapping: dotreplace
  1269. # In previous versions of synapse, the mapping from SAML attribute to
  1270. # MXID was always calculated dynamically rather than stored in a
  1271. # table. For backwards- compatibility, we will look for user_ids
  1272. # matching such a pattern before creating a new account.
  1273. #
  1274. # This setting controls the SAML attribute which will be used for this
  1275. # backwards-compatibility lookup. Typically it should be 'uid', but if
  1276. # the attribute maps are changed, it may be necessary to change it.
  1277. #
  1278. # The default is 'uid'.
  1279. #
  1280. #grandfathered_mxid_source_attribute: upn
  1281. # Directory in which Synapse will try to find the template files below.
  1282. # If not set, default templates from within the Synapse package will be used.
  1283. #
  1284. # DO NOT UNCOMMENT THIS SETTING unless you want to customise the templates.
  1285. # If you *do* uncomment it, you will need to make sure that all the templates
  1286. # below are in the directory.
  1287. #
  1288. # Synapse will look for the following templates in this directory:
  1289. #
  1290. # * HTML page to display to users if something goes wrong during the
  1291. # authentication process: 'saml_error.html'.
  1292. #
  1293. # This template doesn't currently need any variable to render.
  1294. #
  1295. # You can see the default templates at:
  1296. # https://github.com/matrix-org/synapse/tree/master/synapse/res/templates
  1297. #
  1298. #template_dir: "res/templates"
  1299. # Enable CAS for registration and login.
  1300. #
  1301. #cas_config:
  1302. # enabled: true
  1303. # server_url: "https://cas-server.com"
  1304. # service_url: "https://homeserver.domain.com:8448"
  1305. # #displayname_attribute: name
  1306. # #required_attributes:
  1307. # # name: value
  1308. # Additional settings to use with single-sign on systems such as SAML2 and CAS.
  1309. #
  1310. sso:
  1311. # A list of client URLs which are whitelisted so that the user does not
  1312. # have to confirm giving access to their account to the URL. Any client
  1313. # whose URL starts with an entry in the following list will not be subject
  1314. # to an additional confirmation step after the SSO login is completed.
  1315. #
  1316. # WARNING: An entry such as "https://my.client" is insecure, because it
  1317. # will also match "https://my.client.evil.site", exposing your users to
  1318. # phishing attacks from evil.site. To avoid this, include a slash after the
  1319. # hostname: "https://my.client/".
  1320. #
  1321. # If public_baseurl is set, then the login fallback page (used by clients
  1322. # that don't natively support the required login flows) is whitelisted in
  1323. # addition to any URLs in this list.
  1324. #
  1325. # By default, this list is empty.
  1326. #
  1327. #client_whitelist:
  1328. # - https://riot.im/develop
  1329. # - https://my.custom.client/
  1330. # Directory in which Synapse will try to find the template files below.
  1331. # If not set, default templates from within the Synapse package will be used.
  1332. #
  1333. # DO NOT UNCOMMENT THIS SETTING unless you want to customise the templates.
  1334. # If you *do* uncomment it, you will need to make sure that all the templates
  1335. # below are in the directory.
  1336. #
  1337. # Synapse will look for the following templates in this directory:
  1338. #
  1339. # * HTML page for a confirmation step before redirecting back to the client
  1340. # with the login token: 'sso_redirect_confirm.html'.
  1341. #
  1342. # When rendering, this template is given three variables:
  1343. # * redirect_url: the URL the user is about to be redirected to. Needs
  1344. # manual escaping (see
  1345. # https://jinja.palletsprojects.com/en/2.11.x/templates/#html-escaping).
  1346. #
  1347. # * display_url: the same as `redirect_url`, but with the query
  1348. # parameters stripped. The intention is to have a
  1349. # human-readable URL to show to users, not to use it as
  1350. # the final address to redirect to. Needs manual escaping
  1351. # (see https://jinja.palletsprojects.com/en/2.11.x/templates/#html-escaping).
  1352. #
  1353. # * server_name: the homeserver's name.
  1354. #
  1355. # * HTML page which notifies the user that they are authenticating to confirm
  1356. # an operation on their account during the user interactive authentication
  1357. # process: 'sso_auth_confirm.html'.
  1358. #
  1359. # When rendering, this template is given the following variables:
  1360. # * redirect_url: the URL the user is about to be redirected to. Needs
  1361. # manual escaping (see
  1362. # https://jinja.palletsprojects.com/en/2.11.x/templates/#html-escaping).
  1363. #
  1364. # * description: the operation which the user is being asked to confirm
  1365. #
  1366. # * HTML page shown after a successful user interactive authentication session:
  1367. # 'sso_auth_success.html'.
  1368. #
  1369. # Note that this page must include the JavaScript which notifies of a successful authentication
  1370. # (see https://matrix.org/docs/spec/client_server/r0.6.0#fallback).
  1371. #
  1372. # This template has no additional variables.
  1373. #
  1374. # * HTML page shown during single sign-on if a deactivated user (according to Synapse's database)
  1375. # attempts to login: 'sso_account_deactivated.html'.
  1376. #
  1377. # This template has no additional variables.
  1378. #
  1379. # You can see the default templates at:
  1380. # https://github.com/matrix-org/synapse/tree/master/synapse/res/templates
  1381. #
  1382. #template_dir: "res/templates"
  1383. # The JWT needs to contain a globally unique "sub" (subject) claim.
  1384. #
  1385. #jwt_config:
  1386. # enabled: true
  1387. # secret: "a secret"
  1388. # algorithm: "HS256"
  1389. password_config:
  1390. # Uncomment to disable password login
  1391. #
  1392. #enabled: false
  1393. # Uncomment to disable authentication against the local password
  1394. # database. This is ignored if `enabled` is false, and is only useful
  1395. # if you have other password_providers.
  1396. #
  1397. #localdb_enabled: false
  1398. # Uncomment and change to a secret random string for extra security.
  1399. # DO NOT CHANGE THIS AFTER INITIAL SETUP!
  1400. #
  1401. #pepper: "EVEN_MORE_SECRET"
  1402. # Define and enforce a password policy. Each parameter is optional.
  1403. # This is an implementation of MSC2000.
  1404. #
  1405. policy:
  1406. # Whether to enforce the password policy.
  1407. # Defaults to 'false'.
  1408. #
  1409. #enabled: true
  1410. # Minimum accepted length for a password.
  1411. # Defaults to 0.
  1412. #
  1413. #minimum_length: 15
  1414. # Whether a password must contain at least one digit.
  1415. # Defaults to 'false'.
  1416. #
  1417. #require_digit: true
  1418. # Whether a password must contain at least one symbol.
  1419. # A symbol is any character that's not a number or a letter.
  1420. # Defaults to 'false'.
  1421. #
  1422. #require_symbol: true
  1423. # Whether a password must contain at least one lowercase letter.
  1424. # Defaults to 'false'.
  1425. #
  1426. #require_lowercase: true
  1427. # Whether a password must contain at least one lowercase letter.
  1428. # Defaults to 'false'.
  1429. #
  1430. #require_uppercase: true
  1431. # Configuration for sending emails from Synapse.
  1432. #
  1433. email:
  1434. # The hostname of the outgoing SMTP server to use. Defaults to 'localhost'.
  1435. #
  1436. #smtp_host: mail.server
  1437. # The port on the mail server for outgoing SMTP. Defaults to 25.
  1438. #
  1439. #smtp_port: 587
  1440. # Username/password for authentication to the SMTP server. By default, no
  1441. # authentication is attempted.
  1442. #
  1443. # smtp_user: "exampleusername"
  1444. # smtp_pass: "examplepassword"
  1445. # Uncomment the following to require TLS transport security for SMTP.
  1446. # By default, Synapse will connect over plain text, and will then switch to
  1447. # TLS via STARTTLS *if the SMTP server supports it*. If this option is set,
  1448. # Synapse will refuse to connect unless the server supports STARTTLS.
  1449. #
  1450. #require_transport_security: true
  1451. # notif_from defines the "From" address to use when sending emails.
  1452. # It must be set if email sending is enabled.
  1453. #
  1454. # The placeholder '%(app)s' will be replaced by the application name,
  1455. # which is normally 'app_name' (below), but may be overridden by the
  1456. # Matrix client application.
  1457. #
  1458. # Note that the placeholder must be written '%(app)s', including the
  1459. # trailing 's'.
  1460. #
  1461. #notif_from: "Your Friendly %(app)s homeserver <noreply@example.com>"
  1462. # app_name defines the default value for '%(app)s' in notif_from. It
  1463. # defaults to 'Matrix'.
  1464. #
  1465. #app_name: my_branded_matrix_server
  1466. # Uncomment the following to enable sending emails for messages that the user
  1467. # has missed. Disabled by default.
  1468. #
  1469. #enable_notifs: true
  1470. # Uncomment the following to disable automatic subscription to email
  1471. # notifications for new users. Enabled by default.
  1472. #
  1473. #notif_for_new_users: false
  1474. # Custom URL for client links within the email notifications. By default
  1475. # links will be based on "https://matrix.to".
  1476. #
  1477. # (This setting used to be called riot_base_url; the old name is still
  1478. # supported for backwards-compatibility but is now deprecated.)
  1479. #
  1480. #client_base_url: "http://localhost/riot"
  1481. # Configure the time that a validation email will expire after sending.
  1482. # Defaults to 1h.
  1483. #
  1484. #validation_token_lifetime: 15m
  1485. # Directory in which Synapse will try to find the template files below.
  1486. # If not set, default templates from within the Synapse package will be used.
  1487. #
  1488. # DO NOT UNCOMMENT THIS SETTING unless you want to customise the templates.
  1489. # If you *do* uncomment it, you will need to make sure that all the templates
  1490. # below are in the directory.
  1491. #
  1492. # Synapse will look for the following templates in this directory:
  1493. #
  1494. # * The contents of email notifications of missed events: 'notif_mail.html' and
  1495. # 'notif_mail.txt'.
  1496. #
  1497. # * The contents of account expiry notice emails: 'notice_expiry.html' and
  1498. # 'notice_expiry.txt'.
  1499. #
  1500. # * The contents of password reset emails sent by the homeserver:
  1501. # 'password_reset.html' and 'password_reset.txt'
  1502. #
  1503. # * HTML pages for success and failure that a user will see when they follow
  1504. # the link in the password reset email: 'password_reset_success.html' and
  1505. # 'password_reset_failure.html'
  1506. #
  1507. # * The contents of address verification emails sent during registration:
  1508. # 'registration.html' and 'registration.txt'
  1509. #
  1510. # * HTML pages for success and failure that a user will see when they follow
  1511. # the link in an address verification email sent during registration:
  1512. # 'registration_success.html' and 'registration_failure.html'
  1513. #
  1514. # * The contents of address verification emails sent when an address is added
  1515. # to a Matrix account: 'add_threepid.html' and 'add_threepid.txt'
  1516. #
  1517. # * HTML pages for success and failure that a user will see when they follow
  1518. # the link in an address verification email sent when an address is added
  1519. # to a Matrix account: 'add_threepid_success.html' and
  1520. # 'add_threepid_failure.html'
  1521. #
  1522. # You can see the default templates at:
  1523. # https://github.com/matrix-org/synapse/tree/master/synapse/res/templates
  1524. #
  1525. #template_dir: "res/templates"
  1526. # Password providers allow homeserver administrators to integrate
  1527. # their Synapse installation with existing authentication methods
  1528. # ex. LDAP, external tokens, etc.
  1529. #
  1530. # For more information and known implementations, please see
  1531. # https://github.com/matrix-org/synapse/blob/master/docs/password_auth_providers.md
  1532. #
  1533. # Note: instances wishing to use SAML or CAS authentication should
  1534. # instead use the `saml2_config` or `cas_config` options,
  1535. # respectively.
  1536. #
  1537. password_providers:
  1538. # # Example config for an LDAP auth provider
  1539. # - module: "ldap_auth_provider.LdapAuthProvider"
  1540. # config:
  1541. # enabled: true
  1542. # uri: "ldap://ldap.example.com:389"
  1543. # start_tls: true
  1544. # base: "ou=users,dc=example,dc=com"
  1545. # attributes:
  1546. # uid: "cn"
  1547. # mail: "email"
  1548. # name: "givenName"
  1549. # #bind_dn:
  1550. # #bind_password:
  1551. # #filter: "(objectClass=posixAccount)"
  1552. # Clients requesting push notifications can either have the body of
  1553. # the message sent in the notification poke along with other details
  1554. # like the sender, or just the event ID and room ID (`event_id_only`).
  1555. # If clients choose the former, this option controls whether the
  1556. # notification request includes the content of the event (other details
  1557. # like the sender are still included). For `event_id_only` push, it
  1558. # has no effect.
  1559. #
  1560. # For modern android devices the notification content will still appear
  1561. # because it is loaded by the app. iPhone, however will send a
  1562. # notification saying only that a message arrived and who it came from.
  1563. #
  1564. #push:
  1565. # include_content: true
  1566. #spam_checker:
  1567. # module: "my_custom_project.SuperSpamChecker"
  1568. # config:
  1569. # example_option: 'things'
  1570. # Uncomment to allow non-server-admin users to create groups on this server
  1571. #
  1572. #enable_group_creation: true
  1573. # If enabled, non server admins can only create groups with local parts
  1574. # starting with this prefix
  1575. #
  1576. #group_creation_prefix: "unofficial/"
  1577. # User Directory configuration
  1578. #
  1579. # 'enabled' defines whether users can search the user directory. If
  1580. # false then empty responses are returned to all queries. Defaults to
  1581. # true.
  1582. #
  1583. # 'search_all_users' defines whether to search all users visible to your HS
  1584. # when searching the user directory, rather than limiting to users visible
  1585. # in public rooms. Defaults to false. If you set it True, you'll have to
  1586. # rebuild the user_directory search indexes, see
  1587. # https://github.com/matrix-org/synapse/blob/master/docs/user_directory.md
  1588. #
  1589. #user_directory:
  1590. # enabled: true
  1591. # search_all_users: false
  1592. # User Consent configuration
  1593. #
  1594. # for detailed instructions, see
  1595. # https://github.com/matrix-org/synapse/blob/master/docs/consent_tracking.md
  1596. #
  1597. # Parts of this section are required if enabling the 'consent' resource under
  1598. # 'listeners', in particular 'template_dir' and 'version'.
  1599. #
  1600. # 'template_dir' gives the location of the templates for the HTML forms.
  1601. # This directory should contain one subdirectory per language (eg, 'en', 'fr'),
  1602. # and each language directory should contain the policy document (named as
  1603. # '<version>.html') and a success page (success.html).
  1604. #
  1605. # 'version' specifies the 'current' version of the policy document. It defines
  1606. # the version to be served by the consent resource if there is no 'v'
  1607. # parameter.
  1608. #
  1609. # 'server_notice_content', if enabled, will send a user a "Server Notice"
  1610. # asking them to consent to the privacy policy. The 'server_notices' section
  1611. # must also be configured for this to work. Notices will *not* be sent to
  1612. # guest users unless 'send_server_notice_to_guests' is set to true.
  1613. #
  1614. # 'block_events_error', if set, will block any attempts to send events
  1615. # until the user consents to the privacy policy. The value of the setting is
  1616. # used as the text of the error.
  1617. #
  1618. # 'require_at_registration', if enabled, will add a step to the registration
  1619. # process, similar to how captcha works. Users will be required to accept the
  1620. # policy before their account is created.
  1621. #
  1622. # 'policy_name' is the display name of the policy users will see when registering
  1623. # for an account. Has no effect unless `require_at_registration` is enabled.
  1624. # Defaults to "Privacy Policy".
  1625. #
  1626. #user_consent:
  1627. # template_dir: res/templates/privacy
  1628. # version: 1.0
  1629. # server_notice_content:
  1630. # msgtype: m.text
  1631. # body: >-
  1632. # To continue using this homeserver you must review and agree to the
  1633. # terms and conditions at %(consent_uri)s
  1634. # send_server_notice_to_guests: true
  1635. # block_events_error: >-
  1636. # To continue using this homeserver you must review and agree to the
  1637. # terms and conditions at %(consent_uri)s
  1638. # require_at_registration: false
  1639. # policy_name: Privacy Policy
  1640. #
  1641. # Local statistics collection. Used in populating the room directory.
  1642. #
  1643. # 'bucket_size' controls how large each statistics timeslice is. It can
  1644. # be defined in a human readable short form -- e.g. "1d", "1y".
  1645. #
  1646. # 'retention' controls how long historical statistics will be kept for.
  1647. # It can be defined in a human readable short form -- e.g. "1d", "1y".
  1648. #
  1649. #
  1650. #stats:
  1651. # enabled: true
  1652. # bucket_size: 1d
  1653. # retention: 1y
  1654. # Server Notices room configuration
  1655. #
  1656. # Uncomment this section to enable a room which can be used to send notices
  1657. # from the server to users. It is a special room which cannot be left; notices
  1658. # come from a special "notices" user id.
  1659. #
  1660. # If you uncomment this section, you *must* define the system_mxid_localpart
  1661. # setting, which defines the id of the user which will be used to send the
  1662. # notices.
  1663. #
  1664. # It's also possible to override the room name, the display name of the
  1665. # "notices" user, and the avatar for the user.
  1666. #
  1667. #server_notices:
  1668. # system_mxid_localpart: notices
  1669. # system_mxid_display_name: "Server Notices"
  1670. # system_mxid_avatar_url: "mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ"
  1671. # room_name: "Server Notices"
  1672. # Uncomment to disable searching the public room list. When disabled
  1673. # blocks searching local and remote room lists for local and remote
  1674. # users by always returning an empty list for all queries.
  1675. #
  1676. #enable_room_list_search: false
  1677. # The `alias_creation` option controls who's allowed to create aliases
  1678. # on this server.
  1679. #
  1680. # The format of this option is a list of rules that contain globs that
  1681. # match against user_id, room_id and the new alias (fully qualified with
  1682. # server name). The action in the first rule that matches is taken,
  1683. # which can currently either be "allow" or "deny".
  1684. #
  1685. # Missing user_id/room_id/alias fields default to "*".
  1686. #
  1687. # If no rules match the request is denied. An empty list means no one
  1688. # can create aliases.
  1689. #
  1690. # Options for the rules include:
  1691. #
  1692. # user_id: Matches against the creator of the alias
  1693. # alias: Matches against the alias being created
  1694. # room_id: Matches against the room ID the alias is being pointed at
  1695. # action: Whether to "allow" or "deny" the request if the rule matches
  1696. #
  1697. # The default is:
  1698. #
  1699. #alias_creation_rules:
  1700. # - user_id: "*"
  1701. # alias: "*"
  1702. # room_id: "*"
  1703. # action: allow
  1704. # The `room_list_publication_rules` option controls who can publish and
  1705. # which rooms can be published in the public room list.
  1706. #
  1707. # The format of this option is the same as that for
  1708. # `alias_creation_rules`.
  1709. #
  1710. # If the room has one or more aliases associated with it, only one of
  1711. # the aliases needs to match the alias rule. If there are no aliases
  1712. # then only rules with `alias: *` match.
  1713. #
  1714. # If no rules match the request is denied. An empty list means no one
  1715. # can publish rooms.
  1716. #
  1717. # Options for the rules include:
  1718. #
  1719. # user_id: Matches agaisnt the creator of the alias
  1720. # room_id: Matches against the room ID being published
  1721. # alias: Matches against any current local or canonical aliases
  1722. # associated with the room
  1723. # action: Whether to "allow" or "deny" the request if the rule matches
  1724. #
  1725. # The default is:
  1726. #
  1727. #room_list_publication_rules:
  1728. # - user_id: "*"
  1729. # alias: "*"
  1730. # room_id: "*"
  1731. # action: allow
  1732. # Server admins can define a Python module that implements extra rules for
  1733. # allowing or denying incoming events. In order to work, this module needs to
  1734. # override the methods defined in synapse/events/third_party_rules.py.
  1735. #
  1736. # This feature is designed to be used in closed federations only, where each
  1737. # participating server enforces the same rules.
  1738. #
  1739. #third_party_event_rules:
  1740. # module: "my_custom_project.SuperRulesSet"
  1741. # config:
  1742. # example_option: 'things'
  1743. ## Opentracing ##
  1744. # These settings enable opentracing, which implements distributed tracing.
  1745. # This allows you to observe the causal chains of events across servers
  1746. # including requests, key lookups etc., across any server running
  1747. # synapse or any other other services which supports opentracing
  1748. # (specifically those implemented with Jaeger).
  1749. #
  1750. opentracing:
  1751. # tracing is disabled by default. Uncomment the following line to enable it.
  1752. #
  1753. #enabled: true
  1754. # The list of homeservers we wish to send and receive span contexts and span baggage.
  1755. # See docs/opentracing.rst
  1756. # This is a list of regexes which are matched against the server_name of the
  1757. # homeserver.
  1758. #
  1759. # By defult, it is empty, so no servers are matched.
  1760. #
  1761. #homeserver_whitelist:
  1762. # - ".*"
  1763. # Jaeger can be configured to sample traces at different rates.
  1764. # All configuration options provided by Jaeger can be set here.
  1765. # Jaeger's configuration mostly related to trace sampling which
  1766. # is documented here:
  1767. # https://www.jaegertracing.io/docs/1.13/sampling/.
  1768. #
  1769. #jaeger_config:
  1770. # sampler:
  1771. # type: const
  1772. # param: 1
  1773. # Logging whether spans were started and reported
  1774. #
  1775. # logging:
  1776. # false