sample_config.yaml 91 KB

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