sample_config.yaml 93 KB

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