sample_config.yaml 98 KB

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