sample_config.yaml 57 KB

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