1
0

sample_config.yaml 76 KB

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