sample_config.yaml 38 KB

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