sample_config.yaml 86 KB

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