homeserver.yaml 90 KB

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