Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

1761 righe
61 KiB

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