sample_config.yaml 32 KB

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