sample_config.yaml 59 KB

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