sample_config.yaml 95 KB

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