Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

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