sample_config.yaml 53 KB

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