sample_config.yaml 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183
  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. # CPU affinity mask. Setting this restricts the CPUs on which the
  23. # process will be scheduled. It is represented as a bitmask, with the
  24. # lowest order bit corresponding to the first logical CPU and the
  25. # highest order bit corresponding to the last logical CPU. Not all CPUs
  26. # may exist on a given system but a mask may specify more CPUs than are
  27. # present.
  28. #
  29. # For example:
  30. # 0x00000001 is processor #0,
  31. # 0x00000003 is processors #0 and #1,
  32. # 0xFFFFFFFF is all processors (#0 through #31).
  33. #
  34. # Pinning a Python process to a single CPU is desirable, because Python
  35. # is inherently single-threaded due to the GIL, and can suffer a
  36. # 30-40% slowdown due to cache blow-out and thread context switching
  37. # if the scheduler happens to schedule the underlying threads across
  38. # different cores. See
  39. # https://www.mirantis.com/blog/improve-performance-python-programs-restricting-single-cpu/.
  40. #
  41. # This setting requires the affinity package to be installed!
  42. #
  43. #cpu_affinity: 0xFFFFFFFF
  44. # The path to the web client which will be served at /_matrix/client/
  45. # if 'webclient' is configured under the 'listeners' configuration.
  46. #
  47. #web_client_location: "/path/to/web/root"
  48. # The public-facing base URL that clients use to access this HS
  49. # (not including _matrix/...). This is the same URL a user would
  50. # enter into the 'custom HS URL' field on their client. If you
  51. # use synapse with a reverse proxy, this should be the URL to reach
  52. # synapse via the proxy.
  53. #
  54. #public_baseurl: https://example.com/
  55. # Set the soft limit on the number of file descriptors synapse can use
  56. # Zero is used to indicate synapse should set the soft limit to the
  57. # hard limit.
  58. #
  59. #soft_file_limit: 0
  60. # Set to false to disable presence tracking on this homeserver.
  61. #
  62. #use_presence: false
  63. # whether to require users to authenticate in order to query /profile
  64. # endpoints via CS API. this is a workaround in advance of MSC1301 landing
  65. #auth_profile_reqs: false
  66. # whether to require users to authenticate in order to query /publicRooms
  67. # endpoints via CS API. this is a workaround in advance of
  68. # https://github.com/matrix-org/matrix-doc/issues/612 being solved
  69. #auth_public_rooms: false
  70. # The GC threshold parameters to pass to `gc.set_threshold`, if defined
  71. #
  72. #gc_thresholds: [700, 10, 10]
  73. # Set the limit on the returned events in the timeline in the get
  74. # and sync operations. The default value is -1, means no upper limit.
  75. #
  76. #filter_timeline_limit: 5000
  77. # Whether room invites to users on this server should be blocked
  78. # (except those sent by local server admins). The default is False.
  79. #
  80. #block_non_admin_invites: True
  81. # Room searching
  82. #
  83. # If disabled, new messages will not be indexed for searching and users
  84. # will receive errors when searching for messages. Defaults to enabled.
  85. #
  86. #enable_search: false
  87. # Restrict federation to the following whitelist of domains.
  88. # N.B. we recommend also firewalling your federation listener to limit
  89. # inbound federation traffic as early as possible, rather than relying
  90. # purely on this application-layer restriction. If not specified, the
  91. # default is to whitelist everything.
  92. #
  93. #federation_domain_whitelist:
  94. # - lon.example.com
  95. # - nyc.example.com
  96. # - syd.example.com
  97. # List of ports that Synapse should listen on, their purpose and their
  98. # configuration.
  99. #
  100. # Options for each listener include:
  101. #
  102. # port: the TCP port to bind to
  103. #
  104. # bind_addresses: a list of local addresses to listen on. The default is
  105. # 'all local interfaces'.
  106. #
  107. # type: the type of listener. Normally 'http', but other valid options are:
  108. # 'manhole' (see docs/manhole.md),
  109. # 'metrics' (see docs/metrics-howto.rst),
  110. # 'replication' (see docs/workers.rst).
  111. #
  112. # tls: set to true to enable TLS for this listener. Will use the TLS
  113. # key/cert specified in tls_private_key_path / tls_certificate_path.
  114. #
  115. # x_forwarded: Only valid for an 'http' listener. Set to true to use the
  116. # X-Forwarded-For header as the client IP. Useful when Synapse is
  117. # behind a reverse-proxy.
  118. #
  119. # resources: Only valid for an 'http' listener. A list of resources to host
  120. # on this port. Options for each resource are:
  121. #
  122. # names: a list of names of HTTP resources. See below for a list of
  123. # valid resource names.
  124. #
  125. # compress: set to true to enable HTTP comression for this resource.
  126. #
  127. # additional_resources: Only valid for an 'http' listener. A map of
  128. # additional endpoints which should be loaded via dynamic modules.
  129. #
  130. # Valid resource names are:
  131. #
  132. # client: the client-server API (/_matrix/client). Also implies 'media' and
  133. # 'static'.
  134. #
  135. # consent: user consent forms (/_matrix/consent). See
  136. # docs/consent_tracking.md.
  137. #
  138. # federation: the server-server API (/_matrix/federation). Also implies
  139. # 'media', 'keys', 'openid'
  140. #
  141. # keys: the key discovery API (/_matrix/keys).
  142. #
  143. # media: the media API (/_matrix/media).
  144. #
  145. # metrics: the metrics interface. See docs/metrics-howto.rst.
  146. #
  147. # openid: OpenID authentication.
  148. #
  149. # replication: the HTTP replication API (/_synapse/replication). See
  150. # docs/workers.rst.
  151. #
  152. # static: static resources under synapse/static (/_matrix/static). (Mostly
  153. # useful for 'fallback authentication'.)
  154. #
  155. # webclient: A web client. Requires web_client_location to be set.
  156. #
  157. listeners:
  158. # TLS-enabled listener: for when matrix traffic is sent directly to synapse.
  159. #
  160. # Disabled by default. To enable it, uncomment the following. (Note that you
  161. # will also need to give Synapse a TLS key and certificate: see the TLS section
  162. # below.)
  163. #
  164. #- port: 8448
  165. # type: http
  166. # tls: true
  167. # resources:
  168. # - names: [client, federation]
  169. # Unsecure HTTP listener: for when matrix traffic passes through a reverse proxy
  170. # that unwraps TLS.
  171. #
  172. # If you plan to use a reverse proxy, please see
  173. # https://github.com/matrix-org/synapse/blob/master/docs/reverse_proxy.rst.
  174. #
  175. - port: 8008
  176. tls: false
  177. bind_addresses: ['::1', '127.0.0.1']
  178. type: http
  179. x_forwarded: true
  180. resources:
  181. - names: [client, federation]
  182. compress: false
  183. # example additonal_resources:
  184. #
  185. #additional_resources:
  186. # "/_matrix/my/custom/endpoint":
  187. # module: my_module.CustomRequestHandler
  188. # config: {}
  189. # Turn on the twisted ssh manhole service on localhost on the given
  190. # port.
  191. #
  192. #- port: 9000
  193. # bind_addresses: ['::1', '127.0.0.1']
  194. # type: manhole
  195. ## Homeserver blocking ##
  196. # How to reach the server admin, used in ResourceLimitError
  197. #
  198. #admin_contact: 'mailto:admin@server.com'
  199. # Global blocking
  200. #
  201. #hs_disabled: False
  202. #hs_disabled_message: 'Human readable reason for why the HS is blocked'
  203. #hs_disabled_limit_type: 'error code(str), to help clients decode reason'
  204. # Monthly Active User Blocking
  205. #
  206. #limit_usage_by_mau: False
  207. #max_mau_value: 50
  208. #mau_trial_days: 2
  209. # If enabled, the metrics for the number of monthly active users will
  210. # be populated, however no one will be limited. If limit_usage_by_mau
  211. # is true, this is implied to be true.
  212. #
  213. #mau_stats_only: False
  214. # Sometimes the server admin will want to ensure certain accounts are
  215. # never blocked by mau checking. These accounts are specified here.
  216. #
  217. #mau_limit_reserved_threepids:
  218. # - medium: 'email'
  219. # address: 'reserved_user@example.com'
  220. ## TLS ##
  221. # PEM-encoded X509 certificate for TLS.
  222. # This certificate, as of Synapse 1.0, will need to be a valid and verifiable
  223. # certificate, signed by a recognised Certificate Authority.
  224. #
  225. # See 'ACME support' below to enable auto-provisioning this certificate via
  226. # Let's Encrypt.
  227. #
  228. # If supplying your own, be sure to use a `.pem` file that includes the
  229. # full certificate chain including any intermediate certificates (for
  230. # instance, if using certbot, use `fullchain.pem` as your certificate,
  231. # not `cert.pem`).
  232. #
  233. #tls_certificate_path: "CONFDIR/SERVERNAME.tls.crt"
  234. # PEM-encoded private key for TLS
  235. #
  236. #tls_private_key_path: "CONFDIR/SERVERNAME.tls.key"
  237. # ACME support: This will configure Synapse to request a valid TLS certificate
  238. # for your configured `server_name` via Let's Encrypt.
  239. #
  240. # Note that provisioning a certificate in this way requires port 80 to be
  241. # routed to Synapse so that it can complete the http-01 ACME challenge.
  242. # By default, if you enable ACME support, Synapse will attempt to listen on
  243. # port 80 for incoming http-01 challenges - however, this will likely fail
  244. # with 'Permission denied' or a similar error.
  245. #
  246. # There are a couple of potential solutions to this:
  247. #
  248. # * If you already have an Apache, Nginx, or similar listening on port 80,
  249. # you can configure Synapse to use an alternate port, and have your web
  250. # server forward the requests. For example, assuming you set 'port: 8009'
  251. # below, on Apache, you would write:
  252. #
  253. # ProxyPass /.well-known/acme-challenge http://localhost:8009/.well-known/acme-challenge
  254. #
  255. # * Alternatively, you can use something like `authbind` to give Synapse
  256. # permission to listen on port 80.
  257. #
  258. acme:
  259. # ACME support is disabled by default. Uncomment the following line
  260. # (and tls_certificate_path and tls_private_key_path above) to enable it.
  261. #
  262. #enabled: true
  263. # Endpoint to use to request certificates. If you only want to test,
  264. # use Let's Encrypt's staging url:
  265. # https://acme-staging.api.letsencrypt.org/directory
  266. #
  267. #url: https://acme-v01.api.letsencrypt.org/directory
  268. # Port number to listen on for the HTTP-01 challenge. Change this if
  269. # you are forwarding connections through Apache/Nginx/etc.
  270. #
  271. #port: 80
  272. # Local addresses to listen on for incoming connections.
  273. # Again, you may want to change this if you are forwarding connections
  274. # through Apache/Nginx/etc.
  275. #
  276. #bind_addresses: ['::', '0.0.0.0']
  277. # How many days remaining on a certificate before it is renewed.
  278. #
  279. #reprovision_threshold: 30
  280. # The domain that the certificate should be for. Normally this
  281. # should be the same as your Matrix domain (i.e., 'server_name'), but,
  282. # by putting a file at 'https://<server_name>/.well-known/matrix/server',
  283. # you can delegate incoming traffic to another server. If you do that,
  284. # you should give the target of the delegation here.
  285. #
  286. # For example: if your 'server_name' is 'example.com', but
  287. # 'https://example.com/.well-known/matrix/server' delegates to
  288. # 'matrix.example.com', you should put 'matrix.example.com' here.
  289. #
  290. # If not set, defaults to your 'server_name'.
  291. #
  292. #domain: matrix.example.com
  293. # List of allowed TLS fingerprints for this server to publish along
  294. # with the signing keys for this server. Other matrix servers that
  295. # make HTTPS requests to this server will check that the TLS
  296. # certificates returned by this server match one of the fingerprints.
  297. #
  298. # Synapse automatically adds the fingerprint of its own certificate
  299. # to the list. So if federation traffic is handled directly by synapse
  300. # then no modification to the list is required.
  301. #
  302. # If synapse is run behind a load balancer that handles the TLS then it
  303. # will be necessary to add the fingerprints of the certificates used by
  304. # the loadbalancers to this list if they are different to the one
  305. # synapse is using.
  306. #
  307. # Homeservers are permitted to cache the list of TLS fingerprints
  308. # returned in the key responses up to the "valid_until_ts" returned in
  309. # key. It may be necessary to publish the fingerprints of a new
  310. # certificate and wait until the "valid_until_ts" of the previous key
  311. # responses have passed before deploying it.
  312. #
  313. # You can calculate a fingerprint from a given TLS listener via:
  314. # openssl s_client -connect $host:$port < /dev/null 2> /dev/null |
  315. # openssl x509 -outform DER | openssl sha256 -binary | base64 | tr -d '='
  316. # or by checking matrix.org/federationtester/api/report?server_name=$host
  317. #
  318. #tls_fingerprints: [{"sha256": "<base64_encoded_sha256_fingerprint>"}]
  319. ## Database ##
  320. database:
  321. # The database engine name
  322. name: "sqlite3"
  323. # Arguments to pass to the engine
  324. args:
  325. # Path to the database
  326. database: "DATADIR/homeserver.db"
  327. # Number of events to cache in memory.
  328. #
  329. #event_cache_size: 10K
  330. ## Logging ##
  331. # A yaml python logging config file
  332. #
  333. log_config: "CONFDIR/SERVERNAME.log.config"
  334. ## Ratelimiting ##
  335. # Number of messages a client can send per second
  336. #
  337. #rc_messages_per_second: 0.2
  338. # Number of message a client can send before being throttled
  339. #
  340. #rc_message_burst_count: 10.0
  341. # Ratelimiting settings for registration and login.
  342. #
  343. # Each ratelimiting configuration is made of two parameters:
  344. # - per_second: number of requests a client can send per second.
  345. # - burst_count: number of requests a client can send before being throttled.
  346. #
  347. # Synapse currently uses the following configurations:
  348. # - one for registration that ratelimits registration requests based on the
  349. # client's IP address.
  350. # - one for login that ratelimits login requests based on the client's IP
  351. # address.
  352. # - one for login that ratelimits login requests based on the account the
  353. # client is attempting to log into.
  354. # - one for login that ratelimits login requests based on the account the
  355. # client is attempting to log into, based on the amount of failed login
  356. # attempts for this account.
  357. #
  358. # The defaults are as shown below.
  359. #
  360. #rc_registration:
  361. # per_second: 0.17
  362. # burst_count: 3
  363. #
  364. #rc_login:
  365. # address:
  366. # per_second: 0.17
  367. # burst_count: 3
  368. # account:
  369. # per_second: 0.17
  370. # burst_count: 3
  371. # failed_attempts:
  372. # per_second: 0.17
  373. # burst_count: 3
  374. # The federation window size in milliseconds
  375. #
  376. #federation_rc_window_size: 1000
  377. # The number of federation requests from a single server in a window
  378. # before the server will delay processing the request.
  379. #
  380. #federation_rc_sleep_limit: 10
  381. # The duration in milliseconds to delay processing events from
  382. # remote servers by if they go over the sleep limit.
  383. #
  384. #federation_rc_sleep_delay: 500
  385. # The maximum number of concurrent federation requests allowed
  386. # from a single server
  387. #
  388. #federation_rc_reject_limit: 50
  389. # The number of federation requests to concurrently process from a
  390. # single server
  391. #
  392. #federation_rc_concurrent: 3
  393. # Target outgoing federation transaction frequency for sending read-receipts,
  394. # per-room.
  395. #
  396. # If we end up trying to send out more read-receipts, they will get buffered up
  397. # into fewer transactions.
  398. #
  399. #federation_rr_transactions_per_room_per_second: 50
  400. # Directory where uploaded images and attachments are stored.
  401. #
  402. media_store_path: "DATADIR/media_store"
  403. # Media storage providers allow media to be stored in different
  404. # locations.
  405. #
  406. #media_storage_providers:
  407. # - module: file_system
  408. # # Whether to write new local files.
  409. # store_local: false
  410. # # Whether to write new remote media
  411. # store_remote: false
  412. # # Whether to block upload requests waiting for write to this
  413. # # provider to complete
  414. # store_synchronous: false
  415. # config:
  416. # directory: /mnt/some/other/directory
  417. # Directory where in-progress uploads are stored.
  418. #
  419. uploads_path: "DATADIR/uploads"
  420. # The largest allowed upload size in bytes
  421. #
  422. #max_upload_size: 10M
  423. # Maximum number of pixels that will be thumbnailed
  424. #
  425. #max_image_pixels: 32M
  426. # Whether to generate new thumbnails on the fly to precisely match
  427. # the resolution requested by the client. If true then whenever
  428. # a new resolution is requested by the client the server will
  429. # generate a new thumbnail. If false the server will pick a thumbnail
  430. # from a precalculated list.
  431. #
  432. #dynamic_thumbnails: false
  433. # List of thumbnails to precalculate when an image is uploaded.
  434. #
  435. #thumbnail_sizes:
  436. # - width: 32
  437. # height: 32
  438. # method: crop
  439. # - width: 96
  440. # height: 96
  441. # method: crop
  442. # - width: 320
  443. # height: 240
  444. # method: scale
  445. # - width: 640
  446. # height: 480
  447. # method: scale
  448. # - width: 800
  449. # height: 600
  450. # method: scale
  451. # Is the preview URL API enabled? If enabled, you *must* specify
  452. # an explicit url_preview_ip_range_blacklist of IPs that the spider is
  453. # denied from accessing.
  454. #
  455. #url_preview_enabled: false
  456. # List of IP address CIDR ranges that the URL preview spider is denied
  457. # from accessing. There are no defaults: you must explicitly
  458. # specify a list for URL previewing to work. You should specify any
  459. # internal services in your network that you do not want synapse to try
  460. # to connect to, otherwise anyone in any Matrix room could cause your
  461. # synapse to issue arbitrary GET requests to your internal services,
  462. # causing serious security issues.
  463. #
  464. #url_preview_ip_range_blacklist:
  465. # - '127.0.0.0/8'
  466. # - '10.0.0.0/8'
  467. # - '172.16.0.0/12'
  468. # - '192.168.0.0/16'
  469. # - '100.64.0.0/10'
  470. # - '169.254.0.0/16'
  471. # - '::1/128'
  472. # - 'fe80::/64'
  473. # - 'fc00::/7'
  474. #
  475. # List of IP address CIDR ranges that the URL preview spider is allowed
  476. # to access even if they are specified in url_preview_ip_range_blacklist.
  477. # This is useful for specifying exceptions to wide-ranging blacklisted
  478. # target IP ranges - e.g. for enabling URL previews for a specific private
  479. # website only visible in your network.
  480. #
  481. #url_preview_ip_range_whitelist:
  482. # - '192.168.1.1'
  483. # Optional list of URL matches that the URL preview spider is
  484. # denied from accessing. You should use url_preview_ip_range_blacklist
  485. # in preference to this, otherwise someone could define a public DNS
  486. # entry that points to a private IP address and circumvent the blacklist.
  487. # This is more useful if you know there is an entire shape of URL that
  488. # you know that will never want synapse to try to spider.
  489. #
  490. # Each list entry is a dictionary of url component attributes as returned
  491. # by urlparse.urlsplit as applied to the absolute form of the URL. See
  492. # https://docs.python.org/2/library/urlparse.html#urlparse.urlsplit
  493. # The values of the dictionary are treated as an filename match pattern
  494. # applied to that component of URLs, unless they start with a ^ in which
  495. # case they are treated as a regular expression match. If all the
  496. # specified component matches for a given list item succeed, the URL is
  497. # blacklisted.
  498. #
  499. #url_preview_url_blacklist:
  500. # # blacklist any URL with a username in its URI
  501. # - username: '*'
  502. #
  503. # # blacklist all *.google.com URLs
  504. # - netloc: 'google.com'
  505. # - netloc: '*.google.com'
  506. #
  507. # # blacklist all plain HTTP URLs
  508. # - scheme: 'http'
  509. #
  510. # # blacklist http(s)://www.acme.com/foo
  511. # - netloc: 'www.acme.com'
  512. # path: '/foo'
  513. #
  514. # # blacklist any URL with a literal IPv4 address
  515. # - netloc: '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'
  516. # The largest allowed URL preview spidering size in bytes
  517. #
  518. #max_spider_size: 10M
  519. ## Captcha ##
  520. # See docs/CAPTCHA_SETUP for full details of configuring this.
  521. # This Home Server's ReCAPTCHA public key.
  522. #
  523. #recaptcha_public_key: "YOUR_PUBLIC_KEY"
  524. # This Home Server's ReCAPTCHA private key.
  525. #
  526. #recaptcha_private_key: "YOUR_PRIVATE_KEY"
  527. # Enables ReCaptcha checks when registering, preventing signup
  528. # unless a captcha is answered. Requires a valid ReCaptcha
  529. # public/private key.
  530. #
  531. #enable_registration_captcha: false
  532. # A secret key used to bypass the captcha test entirely.
  533. #
  534. #captcha_bypass_secret: "YOUR_SECRET_HERE"
  535. # The API endpoint to use for verifying m.login.recaptcha responses.
  536. #
  537. #recaptcha_siteverify_api: "https://www.recaptcha.net/recaptcha/api/siteverify"
  538. ## TURN ##
  539. # The public URIs of the TURN server to give to clients
  540. #
  541. #turn_uris: []
  542. # The shared secret used to compute passwords for the TURN server
  543. #
  544. #turn_shared_secret: "YOUR_SHARED_SECRET"
  545. # The Username and password if the TURN server needs them and
  546. # does not use a token
  547. #
  548. #turn_username: "TURNSERVER_USERNAME"
  549. #turn_password: "TURNSERVER_PASSWORD"
  550. # How long generated TURN credentials last
  551. #
  552. #turn_user_lifetime: 1h
  553. # Whether guests should be allowed to use the TURN server.
  554. # This defaults to True, otherwise VoIP will be unreliable for guests.
  555. # However, it does introduce a slight security risk as it allows users to
  556. # connect to arbitrary endpoints without having first signed up for a
  557. # valid account (e.g. by passing a CAPTCHA).
  558. #
  559. #turn_allow_guests: True
  560. ## Registration ##
  561. #
  562. # Registration can be rate-limited using the parameters in the "Ratelimiting"
  563. # section of this file.
  564. # Enable registration for new users.
  565. #
  566. #enable_registration: false
  567. # The user must provide all of the below types of 3PID when registering.
  568. #
  569. #registrations_require_3pid:
  570. # - email
  571. # - msisdn
  572. # Explicitly disable asking for MSISDNs from the registration
  573. # flow (overrides registrations_require_3pid if MSISDNs are set as required)
  574. #
  575. #disable_msisdn_registration: true
  576. # Derive the user's matrix ID from a type of 3PID used when registering.
  577. # This overrides any matrix ID the user proposes when calling /register
  578. # The 3PID type should be present in registrations_require_3pid to avoid
  579. # users failing to register if they don't specify the right kind of 3pid.
  580. #
  581. #register_mxid_from_3pid: email
  582. # Uncomment to set the display name of new users to their email address,
  583. # rather than using the default heuristic.
  584. #
  585. #register_just_use_email_for_display_name: true
  586. # Mandate that users are only allowed to associate certain formats of
  587. # 3PIDs with accounts on this server.
  588. #
  589. # Use an Identity Server to establish which 3PIDs are allowed to register?
  590. # Overrides allowed_local_3pids below.
  591. #
  592. #check_is_for_allowed_local_3pids: matrix.org
  593. #
  594. # If you are using an IS you can also check whether that IS registers
  595. # pending invites for the given 3PID (and then allow it to sign up on
  596. # the platform):
  597. #
  598. #allow_invited_3pids: False
  599. #
  600. #allowed_local_3pids:
  601. # - medium: email
  602. # pattern: '.*@matrix\.org'
  603. # - medium: email
  604. # pattern: '.*@vector\.im'
  605. # - medium: msisdn
  606. # pattern: '\+44'
  607. # If true, stop users from trying to change the 3PIDs associated with
  608. # their accounts.
  609. #
  610. #disable_3pid_changes: False
  611. # Enable 3PIDs lookup requests to identity servers from this server.
  612. #
  613. #enable_3pid_lookup: true
  614. # If set, allows registration of standard or admin accounts by anyone who
  615. # has the shared secret, even if registration is otherwise disabled.
  616. #
  617. # registration_shared_secret: <PRIVATE STRING>
  618. # Set the number of bcrypt rounds used to generate password hash.
  619. # Larger numbers increase the work factor needed to generate the hash.
  620. # The default number is 12 (which equates to 2^12 rounds).
  621. # N.B. that increasing this will exponentially increase the time required
  622. # to register or login - e.g. 24 => 2^24 rounds which will take >20 mins.
  623. #
  624. #bcrypt_rounds: 12
  625. # Allows users to register as guests without a password/email/etc, and
  626. # participate in rooms hosted on this server which have been made
  627. # accessible to anonymous users.
  628. #
  629. #allow_guest_access: false
  630. # The identity server which we suggest that clients should use when users log
  631. # in on this server.
  632. #
  633. # (By default, no suggestion is made, so it is left up to the client.
  634. # This setting is ignored unless public_baseurl is also set.)
  635. #
  636. #default_identity_server: https://matrix.org
  637. # The list of identity servers trusted to verify third party
  638. # identifiers by this server.
  639. #
  640. # Also defines the ID server which will be called when an account is
  641. # deactivated (one will be picked arbitrarily).
  642. #
  643. #trusted_third_party_id_servers:
  644. # - matrix.org
  645. # - vector.im
  646. # If enabled, user IDs, display names and avatar URLs will be replicated
  647. # to this server whenever they change.
  648. # This is an experimental API currently implemented by sydent to support
  649. # cross-homeserver user directories.
  650. #
  651. #replicate_user_profiles_to: example.com
  652. # If specified, attempt to replay registrations, profile changes & 3pid
  653. # bindings on the given target homeserver via the AS API. The HS is authed
  654. # via a given AS token.
  655. #
  656. #shadow_server:
  657. # hs_url: https://shadow.example.com
  658. # hs: shadow.example.com
  659. # as_token: 12u394refgbdhivsia
  660. # If enabled, don't let users set their own display names/avatars
  661. # other than for the very first time (unless they are a server admin).
  662. # Useful when provisioning users based on the contents of a 3rd party
  663. # directory and to avoid ambiguities.
  664. #
  665. #disable_set_displayname: False
  666. #disable_set_avatar_url: False
  667. # Users who register on this homeserver will automatically be joined
  668. # to these rooms
  669. #
  670. #auto_join_rooms:
  671. # - "#example:example.com"
  672. # Where auto_join_rooms are specified, setting this flag ensures that the
  673. # the rooms exist by creating them when the first user on the
  674. # homeserver registers.
  675. # Setting to false means that if the rooms are not manually created,
  676. # users cannot be auto-joined since they do not exist.
  677. #
  678. #autocreate_auto_join_rooms: true
  679. ## Metrics ###
  680. # Enable collection and rendering of performance metrics
  681. #
  682. #enable_metrics: False
  683. # Enable sentry integration
  684. # NOTE: While attempts are made to ensure that the logs don't contain
  685. # any sensitive information, this cannot be guaranteed. By enabling
  686. # this option the sentry server may therefore receive sensitive
  687. # information, and it in turn may then diseminate sensitive information
  688. # through insecure notification channels if so configured.
  689. #
  690. #sentry:
  691. # dsn: "..."
  692. # Whether or not to report anonymized homeserver usage statistics.
  693. # report_stats: true|false
  694. ## API Configuration ##
  695. # A list of event types that will be included in the room_invite_state
  696. #
  697. #room_invite_state_types:
  698. # - "m.room.join_rules"
  699. # - "m.room.canonical_alias"
  700. # - "m.room.avatar"
  701. # - "m.room.encryption"
  702. # - "m.room.name"
  703. # A list of application service config files to use
  704. #
  705. #app_service_config_files:
  706. # - app_service_1.yaml
  707. # - app_service_2.yaml
  708. # Uncomment to enable tracking of application service IP addresses. Implicitly
  709. # enables MAU tracking for application service users.
  710. #
  711. #track_appservice_user_ips: True
  712. # a secret which is used to sign access tokens. If none is specified,
  713. # the registration_shared_secret is used, if one is given; otherwise,
  714. # a secret key is derived from the signing key.
  715. #
  716. # macaroon_secret_key: <PRIVATE STRING>
  717. # Used to enable access token expiration.
  718. #
  719. #expire_access_token: False
  720. # a secret which is used to calculate HMACs for form values, to stop
  721. # falsification of values. Must be specified for the User Consent
  722. # forms to work.
  723. #
  724. # form_secret: <PRIVATE STRING>
  725. ## Signing Keys ##
  726. # Path to the signing key to sign messages with
  727. #
  728. signing_key_path: "CONFDIR/SERVERNAME.signing.key"
  729. # The keys that the server used to sign messages with but won't use
  730. # to sign new messages. E.g. it has lost its private key
  731. #
  732. #old_signing_keys:
  733. # "ed25519:auto":
  734. # # Base64 encoded public key
  735. # key: "The public part of your old signing key."
  736. # # Millisecond POSIX timestamp when the key expired.
  737. # expired_ts: 123456789123
  738. # How long key response published by this server is valid for.
  739. # Used to set the valid_until_ts in /key/v2 APIs.
  740. # Determines how quickly servers will query to check which keys
  741. # are still valid.
  742. #
  743. #key_refresh_interval: 1d
  744. # The trusted servers to download signing keys from.
  745. #
  746. #perspectives:
  747. # servers:
  748. # "matrix.org":
  749. # verify_keys:
  750. # "ed25519:auto":
  751. # key: "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
  752. # Enable SAML2 for registration and login. Uses pysaml2.
  753. #
  754. # `sp_config` is the configuration for the pysaml2 Service Provider.
  755. # See pysaml2 docs for format of config.
  756. #
  757. # Default values will be used for the 'entityid' and 'service' settings,
  758. # so it is not normally necessary to specify them unless you need to
  759. # override them.
  760. #
  761. #saml2_config:
  762. # sp_config:
  763. # # point this to the IdP's metadata. You can use either a local file or
  764. # # (preferably) a URL.
  765. # metadata:
  766. # #local: ["saml2/idp.xml"]
  767. # remote:
  768. # - url: https://our_idp/metadata.xml
  769. #
  770. # # The rest of sp_config is just used to generate our metadata xml, and you
  771. # # may well not need it, depending on your setup. Alternatively you
  772. # # may need a whole lot more detail - see the pysaml2 docs!
  773. #
  774. # description: ["My awesome SP", "en"]
  775. # name: ["Test SP", "en"]
  776. #
  777. # organization:
  778. # name: Example com
  779. # display_name:
  780. # - ["Example co", "en"]
  781. # url: "http://example.com"
  782. #
  783. # contact_person:
  784. # - given_name: Bob
  785. # sur_name: "the Sysadmin"
  786. # email_address": ["admin@example.com"]
  787. # contact_type": technical
  788. #
  789. # # Instead of putting the config inline as above, you can specify a
  790. # # separate pysaml2 configuration file:
  791. # #
  792. # config_path: "CONFDIR/sp_conf.py"
  793. # Enable CAS for registration and login.
  794. #
  795. #cas_config:
  796. # enabled: true
  797. # server_url: "https://cas-server.com"
  798. # service_url: "https://homeserver.domain.com:8448"
  799. # #required_attributes:
  800. # # name: value
  801. # The JWT needs to contain a globally unique "sub" (subject) claim.
  802. #
  803. #jwt_config:
  804. # enabled: true
  805. # secret: "a secret"
  806. # algorithm: "HS256"
  807. password_config:
  808. # Uncomment to disable password login
  809. #
  810. #enabled: false
  811. # Uncomment and change to a secret random string for extra security.
  812. # DO NOT CHANGE THIS AFTER INITIAL SETUP!
  813. #
  814. #pepper: "EVEN_MORE_SECRET"
  815. # Enable sending emails for notification events
  816. # Defining a custom URL for Riot is only needed if email notifications
  817. # should contain links to a self-hosted installation of Riot; when set
  818. # the "app_name" setting is ignored.
  819. #
  820. # If your SMTP server requires authentication, the optional smtp_user &
  821. # smtp_pass variables should be used
  822. #
  823. #email:
  824. # enable_notifs: false
  825. # smtp_host: "localhost"
  826. # smtp_port: 25
  827. # smtp_user: "exampleusername"
  828. # smtp_pass: "examplepassword"
  829. # require_transport_security: False
  830. # notif_from: "Your Friendly %(app)s Home Server <noreply@example.com>"
  831. # app_name: Matrix
  832. # # if template_dir is unset, uses the example templates that are part of
  833. # # the Synapse distribution.
  834. # #template_dir: res/templates
  835. # notif_template_html: notif_mail.html
  836. # notif_template_text: notif_mail.txt
  837. # notif_for_new_users: True
  838. # riot_base_url: "http://localhost/riot"
  839. #password_providers:
  840. # - module: "ldap_auth_provider.LdapAuthProvider"
  841. # config:
  842. # enabled: true
  843. # uri: "ldap://ldap.example.com:389"
  844. # start_tls: true
  845. # base: "ou=users,dc=example,dc=com"
  846. # attributes:
  847. # uid: "cn"
  848. # mail: "email"
  849. # name: "givenName"
  850. # #bind_dn:
  851. # #bind_password:
  852. # #filter: "(objectClass=posixAccount)"
  853. # Clients requesting push notifications can either have the body of
  854. # the message sent in the notification poke along with other details
  855. # like the sender, or just the event ID and room ID (`event_id_only`).
  856. # If clients choose the former, this option controls whether the
  857. # notification request includes the content of the event (other details
  858. # like the sender are still included). For `event_id_only` push, it
  859. # has no effect.
  860. #
  861. # For modern android devices the notification content will still appear
  862. # because it is loaded by the app. iPhone, however will send a
  863. # notification saying only that a message arrived and who it came from.
  864. #
  865. #push:
  866. # include_content: true
  867. #spam_checker:
  868. # module: "my_custom_project.SuperSpamChecker"
  869. # config:
  870. # example_option: 'things'
  871. # Uncomment to allow non-server-admin users to create groups on this server
  872. #
  873. #enable_group_creation: true
  874. # If enabled, non server admins can only create groups with local parts
  875. # starting with this prefix
  876. #
  877. #group_creation_prefix: "unofficial/"
  878. # User Directory configuration
  879. #
  880. # 'enabled' defines whether users can search the user directory. If
  881. # false then empty responses are returned to all queries. Defaults to
  882. # true.
  883. #
  884. # 'search_all_users' defines whether to search all users visible to your HS
  885. # when searching the user directory, rather than limiting to users visible
  886. # in public rooms. Defaults to false. If you set it True, you'll have to run
  887. # UPDATE user_directory_stream_pos SET stream_id = NULL;
  888. # on your database to tell it to rebuild the user_directory search indexes.
  889. #
  890. #user_directory:
  891. # enabled: true
  892. # search_all_users: false
  893. #
  894. # # If this is set, user search will be delegated to this ID server instead
  895. # # of synapse performing the search itself.
  896. # # This is an experimental API.
  897. # defer_to_id_server: https://id.example.com
  898. # User Consent configuration
  899. #
  900. # for detailed instructions, see
  901. # https://github.com/matrix-org/synapse/blob/master/docs/consent_tracking.md
  902. #
  903. # Parts of this section are required if enabling the 'consent' resource under
  904. # 'listeners', in particular 'template_dir' and 'version'.
  905. #
  906. # 'template_dir' gives the location of the templates for the HTML forms.
  907. # This directory should contain one subdirectory per language (eg, 'en', 'fr'),
  908. # and each language directory should contain the policy document (named as
  909. # '<version>.html') and a success page (success.html).
  910. #
  911. # 'version' specifies the 'current' version of the policy document. It defines
  912. # the version to be served by the consent resource if there is no 'v'
  913. # parameter.
  914. #
  915. # 'server_notice_content', if enabled, will send a user a "Server Notice"
  916. # asking them to consent to the privacy policy. The 'server_notices' section
  917. # must also be configured for this to work. Notices will *not* be sent to
  918. # guest users unless 'send_server_notice_to_guests' is set to true.
  919. #
  920. # 'block_events_error', if set, will block any attempts to send events
  921. # until the user consents to the privacy policy. The value of the setting is
  922. # used as the text of the error.
  923. #
  924. # 'require_at_registration', if enabled, will add a step to the registration
  925. # process, similar to how captcha works. Users will be required to accept the
  926. # policy before their account is created.
  927. #
  928. # 'policy_name' is the display name of the policy users will see when registering
  929. # for an account. Has no effect unless `require_at_registration` is enabled.
  930. # Defaults to "Privacy Policy".
  931. #
  932. #user_consent:
  933. # template_dir: res/templates/privacy
  934. # version: 1.0
  935. # server_notice_content:
  936. # msgtype: m.text
  937. # body: >-
  938. # To continue using this homeserver you must review and agree to the
  939. # terms and conditions at %(consent_uri)s
  940. # send_server_notice_to_guests: True
  941. # block_events_error: >-
  942. # To continue using this homeserver you must review and agree to the
  943. # terms and conditions at %(consent_uri)s
  944. # require_at_registration: False
  945. # policy_name: Privacy Policy
  946. #
  947. # Server Notices room configuration
  948. #
  949. # Uncomment this section to enable a room which can be used to send notices
  950. # from the server to users. It is a special room which cannot be left; notices
  951. # come from a special "notices" user id.
  952. #
  953. # If you uncomment this section, you *must* define the system_mxid_localpart
  954. # setting, which defines the id of the user which will be used to send the
  955. # notices.
  956. #
  957. # It's also possible to override the room name, the display name of the
  958. # "notices" user, and the avatar for the user.
  959. #
  960. #server_notices:
  961. # system_mxid_localpart: notices
  962. # system_mxid_display_name: "Server Notices"
  963. # system_mxid_avatar_url: "mxc://server.com/oumMVlgDnLYFaPVkExemNVVZ"
  964. # room_name: "Server Notices"
  965. # Uncomment to disable searching the public room list. When disabled
  966. # blocks searching local and remote room lists for local and remote
  967. # users by always returning an empty list for all queries.
  968. #
  969. #enable_room_list_search: false
  970. # The `alias_creation` option controls who's allowed to create aliases
  971. # on this server.
  972. #
  973. # The format of this option is a list of rules that contain globs that
  974. # match against user_id, room_id and the new alias (fully qualified with
  975. # server name). The action in the first rule that matches is taken,
  976. # which can currently either be "allow" or "deny".
  977. #
  978. # Missing user_id/room_id/alias fields default to "*".
  979. #
  980. # If no rules match the request is denied. An empty list means no one
  981. # can create aliases.
  982. #
  983. # Options for the rules include:
  984. #
  985. # user_id: Matches against the creator of the alias
  986. # alias: Matches against the alias being created
  987. # room_id: Matches against the room ID the alias is being pointed at
  988. # action: Whether to "allow" or "deny" the request if the rule matches
  989. #
  990. # The default is:
  991. #
  992. #alias_creation_rules:
  993. # - user_id: "*"
  994. # alias: "*"
  995. # room_id: "*"
  996. # action: allow
  997. # The `room_list_publication_rules` option controls who can publish and
  998. # which rooms can be published in the public room list.
  999. #
  1000. # The format of this option is the same as that for
  1001. # `alias_creation_rules`.
  1002. #
  1003. # If the room has one or more aliases associated with it, only one of
  1004. # the aliases needs to match the alias rule. If there are no aliases
  1005. # then only rules with `alias: *` match.
  1006. #
  1007. # If no rules match the request is denied. An empty list means no one
  1008. # can publish rooms.
  1009. #
  1010. # Options for the rules include:
  1011. #
  1012. # user_id: Matches agaisnt the creator of the alias
  1013. # room_id: Matches against the room ID being published
  1014. # alias: Matches against any current local or canonical aliases
  1015. # associated with the room
  1016. # action: Whether to "allow" or "deny" the request if the rule matches
  1017. #
  1018. # The default is:
  1019. #
  1020. #room_list_publication_rules:
  1021. # - user_id: "*"
  1022. # alias: "*"
  1023. # room_id: "*"
  1024. # action: allow