sample_config.yaml 88 KB

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