Matrix Docker Ansible eploy
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 

2150 рядки
75 KiB

  1. {#
  2. SPDX-FileCopyrightText: 2025 MDAD project contributors
  3. SPDX-FileCopyrightText: 2025 Slavi Pantaleev
  4. SPDX-FileCopyrightText: 2025 Suguru Hirahara
  5. SPDX-FileCopyrightText: 2026 Catalan Lover <catalanlover@protonmail.com>
  6. SPDX-License-Identifier: AGPL-3.0-or-later
  7. #}
  8. ### continuwuity Configuration
  9. ### For more information, see:
  10. ### https://continuwuity.org/configuration.html
  11. [global]
  12. # The server_name is the pretty name of this server. It is used as a
  13. # suffix for user and room IDs/aliases.
  14. #
  15. # See the docs for reverse proxying and delegation:
  16. # https://continuwuity.org/deploying/generic.html#setting-up-the-reverse-proxy
  17. #
  18. # Also see the `[global.well_known]` config section at the very bottom.
  19. #
  20. # Examples of delegation:
  21. # - https://continuwuity.org/.well-known/matrix/server
  22. # - https://continuwuity.org/.well-known/matrix/client
  23. #
  24. # YOU NEED TO EDIT THIS. THIS CANNOT BE CHANGED AFTER WITHOUT A DATABASE
  25. # WIPE.
  26. #
  27. # example: "continuwuity.org"
  28. #
  29. server_name = {{ matrix_continuwuity_config_server_name | to_json }}
  30. # The default address (IPv4 or IPv6) continuwuity will listen on.
  31. #
  32. # If you are using Docker or a container NAT networking setup, this must
  33. # be "0.0.0.0".
  34. #
  35. # To listen on multiple addresses, specify a vector e.g. ["127.0.0.1",
  36. # "::1"]
  37. #
  38. address = "0.0.0.0"
  39. # The port(s) continuwuity will listen on.
  40. #
  41. # For reverse proxying, see:
  42. # https://continuwuity.org/deploying/generic.html#setting-up-the-reverse-proxy
  43. #
  44. # If you are using Docker, don't change this, you'll need to map an
  45. # external port to this.
  46. #
  47. # To listen on multiple ports, specify a vector e.g. [8080, 8448]
  48. #
  49. port = {{ matrix_continuwuity_config_port_number }}
  50. # The UNIX socket continuwuity will listen on.
  51. #
  52. # continuwuity cannot listen on both an IP address and a UNIX socket. If
  53. # listening on a UNIX socket, you MUST remove/comment the `address` key.
  54. #
  55. # Remember to make sure that your reverse proxy has access to this socket
  56. # file, either by adding your reverse proxy to the appropriate user group
  57. # or granting world R/W permissions with `unix_socket_perms` (666
  58. # minimum).
  59. #
  60. # example: "/run/continuwuity/continuwuity.sock"
  61. #
  62. #unix_socket_path =
  63. # The default permissions (in octal) to create the UNIX socket with.
  64. #
  65. #unix_socket_perms = 660
  66. # This is the only directory where continuwuity will save its data,
  67. # including media. Note: this was previously "/var/lib/matrix-conduit".
  68. #
  69. # YOU NEED TO EDIT THIS.
  70. #
  71. # example: "/var/lib/continuwuity"
  72. #
  73. database_path = "/var/lib/continuwuity"
  74. # continuwuity supports online database backups using RocksDB's Backup
  75. # engine API. To use this, set a database backup path that continuwuity
  76. # can write to.
  77. #
  78. # For more information, see:
  79. # https://continuwuity.org/maintenance.html#backups
  80. #
  81. # example: "/opt/continuwuity-db-backups"
  82. #
  83. #database_backup_path =
  84. # The amount of online RocksDB database backups to keep/retain, if using
  85. # "database_backup_path", before deleting the oldest one.
  86. #
  87. #database_backups_to_keep = 1
  88. # Text which will be added to the end of the user's displayname upon
  89. # registration with a space before the text. In Conduit, this was the
  90. # lightning bolt emoji.
  91. #
  92. # To disable, set this to "" (an empty string).
  93. #
  94. # The default is the trans pride flag.
  95. #
  96. # example: "🏳️‍⚧️"
  97. #
  98. new_user_displayname_suffix = {{ matrix_continuwuity_config_new_user_displayname_suffix | to_json }}
  99. # If enabled, continuwuity will send a simple GET request periodically to
  100. # `https://continuwuity.org/.well-known/continuwuity/announcements` for any new
  101. # announcements or major updates. This is not an update check endpoint.
  102. #
  103. allow_announcements_check = {{ matrix_continuwuity_config_allow_announcements_check | to_json }}
  104. # Set this to any float value to multiply continuwuity's in-memory LRU
  105. # caches with such as "auth_chain_cache_capacity".
  106. #
  107. # May be useful if you have significant memory to spare to increase
  108. # performance.
  109. #
  110. # If you have low memory, reducing this may be viable.
  111. #
  112. # By default, the individual caches such as "auth_chain_cache_capacity"
  113. # are scaled by your CPU core count.
  114. #
  115. #cache_capacity_modifier = 1.0
  116. # Set this to any float value in megabytes for continuwuity to tell the
  117. # database engine that this much memory is available for database read
  118. # caches.
  119. #
  120. # May be useful if you have significant memory to spare to increase
  121. # performance.
  122. #
  123. # Similar to the individual LRU caches, this is scaled up with your CPU
  124. # core count.
  125. #
  126. # This defaults to 128.0 + (64.0 * CPU core count).
  127. #
  128. #db_cache_capacity_mb = varies by system
  129. # Set this to any float value in megabytes for continuwuity to tell the
  130. # database engine that this much memory is available for database write
  131. # caches.
  132. #
  133. # May be useful if you have significant memory to spare to increase
  134. # performance.
  135. #
  136. # Similar to the individual LRU caches, this is scaled up with your CPU
  137. # core count.
  138. #
  139. # This defaults to 48.0 + (4.0 * CPU core count).
  140. #
  141. #db_write_buffer_capacity_mb = varies by system
  142. # This item is undocumented. Please contribute documentation for it.
  143. #
  144. #pdu_cache_capacity = varies by system
  145. # This item is undocumented. Please contribute documentation for it.
  146. #
  147. #auth_chain_cache_capacity = varies by system
  148. # This item is undocumented. Please contribute documentation for it.
  149. #
  150. #shorteventid_cache_capacity = varies by system
  151. # This item is undocumented. Please contribute documentation for it.
  152. #
  153. #eventidshort_cache_capacity = varies by system
  154. # This item is undocumented. Please contribute documentation for it.
  155. #
  156. #eventid_pdu_cache_capacity = varies by system
  157. # This item is undocumented. Please contribute documentation for it.
  158. #
  159. #shortstatekey_cache_capacity = varies by system
  160. # This item is undocumented. Please contribute documentation for it.
  161. #
  162. #statekeyshort_cache_capacity = varies by system
  163. # This item is undocumented. Please contribute documentation for it.
  164. #
  165. #servernameevent_data_cache_capacity = varies by system
  166. # This item is undocumented. Please contribute documentation for it.
  167. #
  168. #stateinfo_cache_capacity = varies by system
  169. # This item is undocumented. Please contribute documentation for it.
  170. #
  171. #roomid_spacehierarchy_cache_capacity = varies by system
  172. # Maximum entries stored in DNS memory-cache. The size of an entry may
  173. # vary so please take care if raising this value excessively. Only
  174. # decrease this when using an external DNS cache. Please note that
  175. # systemd-resolved does *not* count as an external cache, even when
  176. # configured to do so.
  177. #
  178. #dns_cache_entries = 32768
  179. # Minimum time-to-live in seconds for entries in the DNS cache. The
  180. # default may appear high to most administrators; this is by design as the
  181. # majority of NXDOMAINs are correct for a long time (e.g. the server is no
  182. # longer running Matrix). Only decrease this if you are using an external
  183. # DNS cache.
  184. #
  185. #dns_min_ttl = 10800
  186. # Minimum time-to-live in seconds for NXDOMAIN entries in the DNS cache.
  187. # This value is critical for the server to federate efficiently.
  188. # NXDOMAIN's are assumed to not be returning to the federation and
  189. # aggressively cached rather than constantly rechecked.
  190. #
  191. # Defaults to 3 days as these are *very rarely* false negatives.
  192. #
  193. #dns_min_ttl_nxdomain = 259200
  194. # Number of DNS nameserver retries after a timeout or error.
  195. #
  196. #dns_attempts = 10
  197. # The number of seconds to wait for a reply to a DNS query. Please note
  198. # that recursive queries can take up to several seconds for some domains,
  199. # so this value should not be too low, especially on slower hardware or
  200. # resolvers.
  201. #
  202. #dns_timeout = 10
  203. # Fallback to TCP on DNS errors. Set this to false if unsupported by
  204. # nameserver.
  205. #
  206. #dns_tcp_fallback = true
  207. # Enable to query all nameservers until the domain is found. Referred to
  208. # as "trust_negative_responses" in hickory_resolver. This can avoid
  209. # useless DNS queries if the first nameserver responds with NXDOMAIN or
  210. # an empty NOERROR response.
  211. #
  212. #query_all_nameservers = true
  213. # Enable using *only* TCP for querying your specified nameservers instead
  214. # of UDP.
  215. #
  216. # If you are running continuwuity in a container environment, this config
  217. # option may need to be enabled. For more details, see:
  218. # https://continuwuity.org/troubleshooting.html#potential-dns-issues-when-using-docker
  219. #
  220. #query_over_tcp_only = false
  221. # DNS A/AAAA record lookup strategy
  222. #
  223. # Takes a number of one of the following options:
  224. # 1 - Ipv4Only (Only query for A records, no AAAA/IPv6)
  225. #
  226. # 2 - Ipv6Only (Only query for AAAA records, no A/IPv4)
  227. #
  228. # 3 - Ipv4AndIpv6 (Query for A and AAAA records in parallel, uses whatever
  229. # returns a successful response first)
  230. #
  231. # 4 - Ipv6thenIpv4 (Query for AAAA record, if that fails then query the A
  232. # record)
  233. #
  234. # 5 - Ipv4thenIpv6 (Query for A record, if that fails then query the AAAA
  235. # record)
  236. #
  237. # If you don't have IPv6 networking, then for better DNS performance it
  238. # may be suitable to set this to Ipv4Only (1) as you will never ever use
  239. # the AAAA record contents even if the AAAA record is successful instead
  240. # of the A record.
  241. #
  242. #ip_lookup_strategy = 5
  243. # The source to use for discovering the real connecting client IP.
  244. #
  245. # Takes any of the following options:
  246. #
  247. # "cf_connecting_ip" - `Cf-Connecting-Ip` header
  248. # "cloudfront_viewer_address" - `CloudFront-Viewer-Address` header
  249. # "fly_client_ip" - `Fly-Client-IP` header
  250. # "x_forwarded_for" - rightmost value of the `X-Forwarded-For` header
  251. # "true_client_ip" - `True-Client-Ip` header
  252. # "x_envoy_external_address" - `X-Envoy-External-Address` header
  253. # "x_real_ip" - `X-Real-Ip` header
  254. #
  255. # Only set this if you are certain only your reverse proxy
  256. # will send the expected header. There is no "is the connecting IP allowed
  257. # to set this header" check; if the header selected is present, it is
  258. # used.
  259. #
  260. # Defaults to the IP address actually making the connection.
  261. #
  262. #request_ip_source = false
  263. # Max request size for file uploads in bytes. Defaults to 20MB.
  264. # Also limits incoming federated media.
  265. #
  266. max_request_size = {{ matrix_continuwuity_config_max_request_size }}
  267. # This item is undocumented. Please contribute documentation for it.
  268. #
  269. #max_fetch_prev_events = 1024
  270. # How many incoming federation transactions the server is willing to be
  271. # processing at any given time before it becomes overloaded and starts
  272. # rejecting further transactions until some slots become available.
  273. #
  274. # Setting this value too low or too high may result in unstable
  275. # federation, and setting it too high may cause runaway resource usage.
  276. #
  277. #max_concurrent_inbound_transactions = 150
  278. # Maximum age (in seconds) for cached federation transaction responses.
  279. # Entries older than this will be removed during cleanup.
  280. #
  281. #transaction_id_cache_max_age_secs = 7200 (2 hours)
  282. # Maximum number of cached federation transaction responses.
  283. # When the cache exceeds this limit, older entries will be removed.
  284. #
  285. #transaction_id_cache_max_entries = 8192
  286. # Default/base connection timeout (seconds). This is used only by URL
  287. # previews and update/news endpoint checks.
  288. #
  289. #request_conn_timeout = 10
  290. # Default/base request timeout (seconds). The time waiting to receive more
  291. # data from another server. This is used only by URL previews,
  292. # update/news, and misc endpoint checks.
  293. #
  294. #request_timeout = 35
  295. # Default/base request total timeout (seconds). The time limit for a whole
  296. # request. This is set very high to not cancel healthy requests while
  297. # serving as a backstop. This is used only by URL previews and update/news
  298. # endpoint checks.
  299. #
  300. #request_total_timeout = 320
  301. # Default/base idle connection pool timeout (seconds). This is used only
  302. # by URL previews and update/news endpoint checks.
  303. #
  304. #request_idle_timeout = 5
  305. # Default/base max idle connections per host. This is used only by URL
  306. # previews and update/news endpoint checks. Defaults to 1 as generally the
  307. # same open connection can be re-used.
  308. #
  309. #request_idle_per_host = 1
  310. # Federation well-known resolution connection timeout (seconds).
  311. #
  312. #well_known_conn_timeout = 6
  313. # Federation HTTP well-known resolution request timeout (seconds).
  314. #
  315. #well_known_timeout = 10
  316. # Federation client connection timeout (seconds). You should not set this
  317. # to high values, as dead homeservers can significantly slow down
  318. # federation, specifically key retrieval, which will take roughly the
  319. # amount of time you configure here given that a homeserver doesn't
  320. # respond. This will cause most clients to time out /keys/query, causing
  321. # E2EE and device verification to fail.
  322. #
  323. #federation_conn_timeout = 10
  324. # Federation client request timeout (seconds). You most definitely want
  325. # this to be high to account for extremely large room joins, slow
  326. # homeservers, your own resources etc.
  327. #
  328. # Joins have 6x the timeout.
  329. #
  330. #federation_timeout = 60
  331. # Policy server request timeout (seconds). Generally policy
  332. # servers should respond near instantly, however may slow down under
  333. # load. If a policy server doesn't respond in a short amount of time, the
  334. # room it is configured in may become unusable if this limit is set too
  335. # high. 30 seconds is a good default, however lower values may be
  336. # acceptable if temporary send failures are an okay trade-off.
  337. #
  338. #
  339. # About policy servers: https://matrix.org/blog/2025/04/introducing-policy-servers/
  340. # (Stabilized in Matrix v1.18)
  341. #
  342. #policy_server_request_timeout = 30
  343. # Federation client idle connection pool timeout (seconds).
  344. #
  345. #federation_idle_timeout = 25
  346. # Federation client max idle connections per host. Defaults to 1 as
  347. # generally the same open connection can be re-used.
  348. #
  349. #federation_idle_per_host = 1
  350. # Federation sender request timeout (seconds). The time it takes for the
  351. # remote server to process sent transactions can take a while.
  352. #
  353. #sender_timeout = 180
  354. # Federation sender idle connection pool timeout (seconds).
  355. #
  356. #sender_idle_timeout = 180
  357. # Federation sender transaction retry backoff limit (seconds).
  358. #
  359. #sender_retry_backoff_limit = 86400
  360. # Appservice URL request connection timeout. Defaults to 35 seconds as
  361. # generally appservices are hosted within the same network.
  362. #
  363. #appservice_timeout = 35
  364. # Appservice URL idle connection pool timeout (seconds).
  365. #
  366. #appservice_idle_timeout = 300
  367. # Notification gateway pusher request connection timeout (seconds).
  368. #
  369. #pusher_conn_timeout = 15
  370. # Notification gateway pusher total request timeout (seconds).
  371. #
  372. #pusher_timeout = 60
  373. # Notification gateway pusher idle connection pool timeout (seconds).
  374. #
  375. #pusher_idle_timeout = 15
  376. # Maximum time to receive a request from a client (seconds).
  377. #
  378. #client_receive_timeout = 75
  379. # Maximum time to process a request received from a client (seconds).
  380. #
  381. #client_request_timeout = 180
  382. # Maximum time to transmit a response to a client (seconds)
  383. #
  384. #client_response_timeout = 120
  385. # Grace period for clean shutdown of client requests (seconds).
  386. #
  387. #client_shutdown_timeout = 10
  388. # Grace period for clean shutdown of federation requests (seconds).
  389. #
  390. #sender_shutdown_timeout = 5
  391. # Enables registration. If set to false, no users can register on this
  392. # server.
  393. #
  394. # Registration requires a token, ReCAPTCHA, or email verification.
  395. # Official images do not support challengeless registration.
  396. #
  397. # If you would like registration only via token reg, please configure
  398. # `registration_token`.
  399. #
  400. allow_registration = {{ matrix_continuwuity_config_allow_registration | to_json }}
  401. # If registration is enabled, and this setting is true, new users
  402. # registered after the first admin user will be automatically suspended
  403. # and will require an admin to run `!admin users unsuspend <user_id>`.
  404. #
  405. # Suspended users are still able to read messages, make profile updates,
  406. # leave rooms, and deactivate their account, however cannot send messages,
  407. # invites, or create/join or otherwise modify rooms.
  408. # They are effectively read-only.
  409. #
  410. # If you want to use this to screen people who register on your server,
  411. # you should add a room to `auto_join_rooms` that is public, and contains
  412. # information that new users can read (since they won't be able to DM
  413. # anyone, or send a message, and may be confused).
  414. #
  415. suspend_on_register = {{ matrix_continuwuity_config_suspend_on_register | to_json }}
  416. # A static registration token that new users will have to provide when
  417. # creating an account. This token does not supersede tokens from other
  418. # sources, such as the `!admin token` command or the
  419. # `registration_token_file` configuration option.
  420. #
  421. # example: "o&^uCtes4HPf0Vu@F20jQeeWE7"
  422. #
  423. {% if matrix_continuwuity_config_registration_token != '' %}
  424. registration_token = {{ matrix_continuwuity_config_registration_token | to_json }}
  425. {% endif %}
  426. # A path to a file containing static registration tokens, one per line.
  427. # Tokens in this file do not supersede tokens from other sources, such as
  428. # the `!admin token` command or the `registration_token` configuration
  429. # option.
  430. #
  431. # The file will be read once, when Continuwuity starts. It is not
  432. # currently reread when the server configuration is reloaded. If the file
  433. # cannot be read, Continuwuity will fail to start.
  434. #
  435. #registration_token_file =
  436. {% if matrix_continuwuity_recaptcha_enabled %}
  437. # The public site key for reCaptcha. If this is provided, reCaptcha
  438. # becomes required during registration. If both captcha *and*
  439. # registration token are enabled, both will be required during
  440. # registration.
  441. #
  442. # IMPORTANT: "Verify the origin of reCAPTCHA solutions" **MUST** BE
  443. # DISABLED IF YOU WANT THE CAPTCHA TO WORK IN 3RD PARTY CLIENTS, OR
  444. # CLIENTS HOSTED ON DOMAINS OTHER THAN YOUR OWN!
  445. #
  446. # Registration must be enabled (`allow_registration` must be true) for
  447. # this to have any effect.
  448. #
  449. recaptcha_site_key = {{ matrix_continuwuity_config_recaptcha_site_key | to_json }}
  450. # The private site key for reCaptcha.
  451. # If this is omitted, captcha registration will not work,
  452. # even if `recaptcha_site_key` is set.
  453. #
  454. recaptcha_private_site_key = {{ matrix_continuwuity_config_recaptcha_private_site_key | to_json }}
  455. {% endif %}
  456. # Controls whether users are allowed to deactivate their own accounts
  457. # through the account management panel or their Matrix clients. Server
  458. # admins can always deactivate users using the relevant admin commands.
  459. #
  460. # Note that, in some jurisdictions, you may be legally required to honor
  461. # users who request to deactivate their accounts if you set this option
  462. # to `false`.
  463. #
  464. #allow_deactivation = true
  465. # Controls whether encrypted rooms and events are allowed.
  466. #
  467. allow_encryption = {{ matrix_continuwuity_config_allow_encryption | to_json }}
  468. # Controls whether federation is allowed or not. It is not recommended to
  469. # disable this after the fact due to potential federation breakage.
  470. #
  471. allow_federation = {{ matrix_continuwuity_config_allow_federation | to_json }}
  472. # Allows federation requests to be made to itself
  473. #
  474. # This isn't intended and is very likely a bug if federation requests are
  475. # being sent to yourself. This currently mainly exists for development
  476. # purposes.
  477. #
  478. #federation_loopback = false
  479. # Always calls /forget on behalf of the user if leaving a room. This is a
  480. # part of MSC4267 "Automatically forgetting rooms on leave"
  481. #
  482. forget_forced_upon_leave = {{ matrix_continuwuity_config_forget_forced_upon_leave | to_json }}
  483. # Set this to true to require authentication on the normally
  484. # unauthenticated profile retrieval endpoints (GET)
  485. # "/_matrix/client/v3/profile/{userId}".
  486. #
  487. # This can prevent profile scraping.
  488. #
  489. #require_auth_for_profile_requests = false
  490. # Set this to true to allow your server's public room directory to be
  491. # federated. Set this to false to protect against /publicRooms spiders,
  492. # but will forbid external users from viewing your server's public room
  493. # directory. If federation is disabled entirely (`allow_federation`), this
  494. # is inherently false.
  495. #
  496. #allow_public_room_directory_over_federation = false
  497. # Set this to true to lock down your server's public room directory and
  498. # only allow admins to publish rooms to the room directory. Unpublishing
  499. # is still allowed by all users with this enabled.
  500. #
  501. #lockdown_public_room_directory = false
  502. # Set this to true to allow federating device display names / allow
  503. # external users to see your device display name. If federation is
  504. # disabled entirely (`allow_federation`), this is inherently false. For
  505. # privacy reasons, this is best left disabled.
  506. #
  507. #allow_device_name_federation = false
  508. # Config option to allow or disallow incoming federation requests that
  509. # obtain the profiles of our local users from
  510. # `/_matrix/federation/v1/query/profile`
  511. #
  512. # Increases privacy of your local user's such as display names, but some
  513. # remote users may get a false "this user does not exist" error when they
  514. # try to invite you to a DM or room. Also can protect against profile
  515. # spiders.
  516. #
  517. # This is inherently false if `allow_federation` is disabled
  518. #
  519. #allow_inbound_profile_lookup_federation_requests = true
  520. # Allow standard users to create rooms. Appservices and admins are always
  521. # allowed to create rooms
  522. #
  523. allow_room_creation = {{ matrix_continuwuity_config_allow_room_creation | to_json }}
  524. # Set to false to disable users from joining or creating room versions
  525. # that aren't officially supported by continuwuity.
  526. #
  527. # continuwuity officially supports room versions 6 - 12.
  528. #
  529. # continuwuity has slightly experimental (though works fine in practice)
  530. # support for versions 3 - 5.
  531. #
  532. #allow_unstable_room_versions = true
  533. # Default room version continuwuity will create rooms with.
  534. # Note that this has to be a string since the room version is a string
  535. # rather than an integer. Forgetting the quotes will make the server fail
  536. # to start!
  537. #
  538. # Per spec, room version "12" is the default.
  539. #
  540. default_room_version = {{ matrix_continuwuity_config_default_room_version | to_json }}
  541. # A default allow value for the Access Control List when creating a room.
  542. #
  543. # If a list is provided, new rooms will be created with
  544. # a m.room.server_acl event. Only servers which match one of the patterns
  545. # in the list will be permitted to participate in the room.
  546. #
  547. # ACLs in existing rooms will not be updated automatically. This is not
  548. # a substitute for moderation bots.
  549. #
  550. #default_room_acl_allow =
  551. # A default deny value for the Access Control List when creating a room.
  552. #
  553. # If a list is provided, new rooms will be created with
  554. # a m.room.server_acl event. Servers which match one of the patterns
  555. # in the list will be NOT permitted to participate in the room.
  556. #
  557. # This config cannot be used if the default_room_acl_allow config is used.
  558. #
  559. # ACLs in existing rooms will not be updated automatically. This is not
  560. # a substitute for moderation bots.
  561. #
  562. #default_room_acl_deny =
  563. # The number of forward extremities to tolerate in a room before
  564. # attempting to manually squash them with a "dummy event". Setting this
  565. # above 20 will hinder its efficacy, and setting it below 5 will cause
  566. # more dummy events to be sent than necessary (which increases federation
  567. # traffic).
  568. #
  569. #dummy_event_threshold = 10
  570. # Enable OpenTelemetry OTLP tracing export. This replaces the deprecated
  571. # Jaeger exporter. Traces will be sent via OTLP to a collector (such as
  572. # Jaeger) that supports the OpenTelemetry Protocol.
  573. #
  574. # Configure your OTLP endpoint using the OTEL_EXPORTER_OTLP_ENDPOINT
  575. # environment variable (defaults to http://localhost:4318).
  576. #
  577. #allow_otlp = false
  578. # Filter for OTLP tracing spans. This controls which spans are exported
  579. # to the OTLP collector.
  580. #
  581. #otlp_filter = "info"
  582. # Protocol to use for OTLP tracing export. Options are "http" or "grpc".
  583. # The HTTP protocol uses port 4318 by default, while gRPC uses port 4317.
  584. #
  585. #otlp_protocol = "http"
  586. # If the 'perf_measurements' compile-time feature is enabled, enables
  587. # collecting folded stack trace profile of tracing spans using
  588. # tracing_flame. The resulting profile can be visualized with inferno[1],
  589. # speedscope[2], or a number of other tools.
  590. #
  591. # [1]: https://github.com/jonhoo/inferno
  592. # [2]: www.speedscope.app
  593. #
  594. #tracing_flame = false
  595. # This item is undocumented. Please contribute documentation for it.
  596. #
  597. #tracing_flame_filter = "info"
  598. # This item is undocumented. Please contribute documentation for it.
  599. #
  600. #tracing_flame_output_path = "./tracing.folded"
  601. # Examples:
  602. #
  603. # - No proxy (default):
  604. #
  605. # proxy = "none"
  606. #
  607. # - For global proxy, create the section at the bottom of this file:
  608. #
  609. # [global.proxy]
  610. # global = { url = "socks5h://localhost:9050" }
  611. #
  612. # - To proxy some domains:
  613. #
  614. # [global.proxy]
  615. # [[global.proxy.by_domain]]
  616. # url = "socks5h://localhost:9050"
  617. # include = ["*.onion", "matrix.myspecial.onion"]
  618. # exclude = ["*.myspecial.onion"]
  619. #
  620. # Include vs. Exclude:
  621. #
  622. # - If include is an empty list, it is assumed to be `["*"]`.
  623. #
  624. # - If a domain matches both the exclude and include list, the proxy will
  625. # only be used if it was included because of a more specific rule than
  626. # it was excluded. In the above example, the proxy would be used for
  627. # `ordinary.onion`, `matrix.myspecial.onion`, but not
  628. # `hello.myspecial.onion`.
  629. #
  630. #proxy = "none"
  631. # Servers listed here will be used to gather public keys of other servers
  632. # (notary trusted key servers).
  633. #
  634. # Currently, continuwuity doesn't support inbound batched key requests, so
  635. # this list should only contain other Synapse servers.
  636. #
  637. # example: ["matrix.org", "tchncs.de"]
  638. #
  639. trusted_servers = {{ matrix_continuwuity_config_trusted_servers | to_json }}
  640. # Whether to query the servers listed in trusted_servers first or query
  641. # the origin server first. For best security, querying the origin server
  642. # first is advised to minimize the exposure to a compromised trusted
  643. # server. For maximum federation/join performance this can be set to true,
  644. # however other options exist to query trusted servers first under
  645. # specific high-load circumstances and should be evaluated before setting
  646. # this to true.
  647. #
  648. #query_trusted_key_servers_first = false
  649. # Whether to query the servers listed in trusted_servers first
  650. # specifically on room joins. This option limits the exposure to a
  651. # compromised trusted server to room joins only. The join operation
  652. # requires gathering keys from many origin servers which can cause
  653. # significant delays. Therefore this defaults to true to mitigate
  654. # unexpected delays out-of-the-box. The security-paranoid or those willing
  655. # to tolerate delays are advised to set this to false. Note that setting
  656. # query_trusted_key_servers_first to true causes this option to be
  657. # ignored.
  658. #
  659. #query_trusted_key_servers_first_on_join = true
  660. # Only query trusted servers for keys and never the origin server. This is
  661. # intended for clusters or custom deployments using their trusted_servers
  662. # as forwarding-agents to cache and deduplicate requests. Notary servers
  663. # do not act as forwarding-agents by default, therefore do not enable this
  664. # unless you know exactly what you are doing.
  665. #
  666. #only_query_trusted_key_servers = false
  667. # Maximum number of keys to request in each trusted server batch query.
  668. #
  669. #trusted_server_batch_size = 1024
  670. # Max log level for continuwuity. Allows debug, info, warn, or error.
  671. #
  672. # See also:
  673. # https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives
  674. #
  675. # **Caveat**:
  676. # For release builds, the tracing crate is configured to only implement
  677. # levels higher than error to avoid unnecessary overhead in the compiled
  678. # binary from trace macros. For debug builds, this restriction is not
  679. # applied.
  680. #
  681. log = {{ matrix_continuwuity_config_log | to_json }}
  682. # Output logs with ANSI colours.
  683. #
  684. #log_colors = true
  685. # Configures the span events which will be outputted with the log.
  686. #
  687. #log_span_events = "none"
  688. # Configures whether CONTINUWUITY_LOG EnvFilter matches values using
  689. # regular expressions. See the tracing_subscriber documentation on
  690. # Directives.
  691. #
  692. #log_filter_regex = true
  693. # Toggles the display of ThreadId in tracing log output.
  694. #
  695. #log_thread_ids = false
  696. # Enable journald logging on Unix platforms
  697. #
  698. # When enabled, log output will be sent to the systemd journal
  699. # This is only supported on Unix platforms
  700. #
  701. #log_to_journald = false
  702. # The syslog identifier to use with journald logging
  703. #
  704. # Only used when journald logging is enabled
  705. #
  706. # Defaults to the binary name
  707. #
  708. #journald_identifier =
  709. # OpenID token expiration/TTL in seconds.
  710. #
  711. # These are the OpenID tokens that are primarily used for Matrix account
  712. # integrations (e.g. Vector Integrations in Element), *not* OIDC/OpenID
  713. # Connect/etc.
  714. #
  715. #openid_token_ttl = 3600
  716. # Allow an existing session to mint a login token for another client.
  717. # This requires interactive authentication, but has security ramifications
  718. # as a malicious client could use the mechanism to spawn more than one
  719. # session.
  720. # Enabled by default.
  721. #
  722. #login_via_existing_session = true
  723. # Login token expiration/TTL in milliseconds.
  724. #
  725. # These are short-lived tokens for the m.login.token endpoint.
  726. # This is used to allow existing sessions to create new sessions.
  727. # see login_via_existing_session.
  728. #
  729. #login_token_ttl = 120000
  730. # Static TURN username to provide the client if not using a shared secret
  731. # ("turn_secret"), It is recommended to use a shared secret over static
  732. # credentials.
  733. #
  734. {% if matrix_continuwuity_config_turn_username != '' %}
  735. turn_username = {{ matrix_continuwuity_config_turn_username | to_json }}
  736. {% endif %}
  737. # Static TURN password to provide the client if not using a shared secret
  738. # ("turn_secret"). It is recommended to use a shared secret over static
  739. # credentials.
  740. #
  741. {% if matrix_continuwuity_config_turn_password != '' %}
  742. turn_password = {{ matrix_continuwuity_config_turn_password | to_json }}
  743. {% endif %}
  744. # Vector list of TURN URIs/servers to use.
  745. #
  746. # Replace "example.turn.uri" with your TURN domain, such as the coturn
  747. # "realm" config option. If using TURN over TLS, replace the URI prefix
  748. # "turn:" with "turns:".
  749. #
  750. # example: ["turn:example.turn.uri?transport=udp",
  751. # "turn:example.turn.uri?transport=tcp"]
  752. #
  753. turn_uris = {{ matrix_continuwuity_config_turn_uris | to_json }}
  754. # TURN secret to use for generating the HMAC-SHA1 hash apart of username
  755. # and password generation.
  756. #
  757. # This is more secure, but if needed you can use traditional static
  758. # username/password credentials.
  759. #
  760. {% if matrix_continuwuity_config_turn_secret != '' %}
  761. turn_secret = {{ matrix_continuwuity_config_turn_secret | to_json }}
  762. {% endif %}
  763. # TURN secret to use that's read from the file path specified.
  764. #
  765. # This takes priority over "turn_secret" first, and falls back to
  766. # "turn_secret" if invalid or failed to open.
  767. #
  768. # example: "/etc/continuwuity/.turn_secret"
  769. #
  770. #turn_secret_file =
  771. # TURN TTL, in seconds.
  772. #
  773. #turn_ttl = 86400
  774. # List/vector of room IDs or room aliases that continuwuity will make
  775. # newly registered users join. The rooms specified must be rooms that you
  776. # have joined at least once on the server, and must be public.
  777. #
  778. # example: ["#continuwuity:continuwuity.org",
  779. # "!main-1:continuwuity.org"]
  780. #
  781. auto_join_rooms = {{ matrix_continuwuity_config_auto_join_rooms | to_json }}
  782. # Config option to automatically deactivate the account of any user who
  783. # attempts to join a:
  784. # - banned room
  785. # - forbidden room alias
  786. # - room alias or ID with a forbidden server name
  787. #
  788. # This may be useful if all your banned lists consist of toxic rooms or
  789. # servers that no good faith user would ever attempt to join, and
  790. # to automatically remediate the problem without any admin user
  791. # intervention.
  792. #
  793. # This will also make the user leave all rooms. Federation (e.g. remote
  794. # room invites) are ignored here.
  795. #
  796. # Defaults to false as rooms can be banned for non-moderation-related
  797. # reasons and this performs a full user deactivation.
  798. #
  799. #auto_deactivate_banned_room_attempts = false
  800. # RocksDB log level. This is not the same as continuwuity's log level.
  801. # This is the log level for the RocksDB engine/library which show up in
  802. # your database folder/path as `LOG` files. continuwuity will log RocksDB
  803. # errors as normal through tracing or panics if severe for safety.
  804. #
  805. #rocksdb_log_level = "error"
  806. # This item is undocumented. Please contribute documentation for it.
  807. #
  808. #rocksdb_log_stderr = false
  809. # Max RocksDB `LOG` file size before rotating in bytes. Defaults to 4MB in
  810. # bytes.
  811. #
  812. #rocksdb_max_log_file_size = 4194304
  813. # Time in seconds before RocksDB will forcibly rotate logs.
  814. #
  815. #rocksdb_log_time_to_roll = 0
  816. # Set this to true to use RocksDB config options that are tailored to HDDs
  817. # (slower device storage).
  818. #
  819. # It is worth noting that by default, continuwuity will use RocksDB with
  820. # Direct IO enabled. *Generally* speaking this improves performance as it
  821. # bypasses buffered I/O (system page cache). However there is a potential
  822. # chance that Direct IO may cause issues with database operations if your
  823. # setup is uncommon. This has been observed with FUSE filesystems, and
  824. # possibly ZFS filesystem. RocksDB generally deals/corrects these issues
  825. # but it cannot account for all setups. If you experience any weird
  826. # RocksDB issues, try enabling this option as it turns off Direct IO and
  827. # feel free to report in the continuwuity Matrix room if this option fixes
  828. # your DB issues.
  829. #
  830. # For more information, see:
  831. # https://github.com/facebook/rocksdb/wiki/Direct-IO
  832. #
  833. #rocksdb_optimize_for_spinning_disks = false
  834. # Enables direct-io to increase database performance via unbuffered I/O.
  835. #
  836. # For more details about direct I/O and RockDB, see:
  837. # https://github.com/facebook/rocksdb/wiki/Direct-IO
  838. #
  839. # Set this option to false if the database resides on a filesystem which
  840. # does not support direct-io like FUSE, or any form of complex filesystem
  841. # setup such as possibly ZFS.
  842. #
  843. #rocksdb_direct_io = true
  844. # Amount of threads that RocksDB will use for parallelism on database
  845. # operations such as cleanup, sync, flush, compaction, etc. Set to 0 to
  846. # use all your logical threads. Defaults to your CPU logical thread count.
  847. #
  848. #rocksdb_parallelism_threads = varies by system
  849. # Maximum number of LOG files RocksDB will keep. This must *not* be set to
  850. # 0. It must be at least 1. Defaults to 3 as these are not very useful
  851. # unless troubleshooting/debugging a RocksDB bug.
  852. #
  853. #rocksdb_max_log_files = 3
  854. # Type of RocksDB database compression to use.
  855. #
  856. # Available options are "zstd", "bz2", "lz4", or "none".
  857. #
  858. # It is best to use ZSTD as an overall good balance between
  859. # speed/performance, storage, IO amplification, and CPU usage. For more
  860. # performance but less compression (more storage used) and less CPU usage,
  861. # use LZ4.
  862. #
  863. # For more details, see:
  864. # https://github.com/facebook/rocksdb/wiki/Compression
  865. #
  866. # "none" will disable compression.
  867. #
  868. #rocksdb_compression_algo = "zstd"
  869. # Level of compression the specified compression algorithm for RocksDB to
  870. # use.
  871. #
  872. # Default is 32767, which is internally read by RocksDB as the default
  873. # magic number and translated to the library's default compression level
  874. # as they all differ. See their `kDefaultCompressionLevel`.
  875. #
  876. # Note when using the default value we may override it with a setting
  877. # tailored specifically for continuwuity.
  878. #
  879. #rocksdb_compression_level = 32767
  880. # Level of compression the specified compression algorithm for the
  881. # bottommost level/data for RocksDB to use. Default is 32767, which is
  882. # internally read by RocksDB as the default magic number and translated to
  883. # the library's default compression level as they all differ. See their
  884. # `kDefaultCompressionLevel`.
  885. #
  886. # Since this is the bottommost level (generally old and least used data),
  887. # it may be desirable to have a very high compression level here as it's
  888. # less likely for this data to be used. Research your chosen compression
  889. # algorithm.
  890. #
  891. # Note when using the default value we may override it with a setting
  892. # tailored specifically for continuwuity.
  893. #
  894. #rocksdb_bottommost_compression_level = 32767
  895. # Whether to enable RocksDB's "bottommost_compression".
  896. #
  897. # At the expense of more CPU usage, this will further compress the
  898. # database to reduce more storage. It is recommended to use ZSTD
  899. # compression with this for best compression results. This may be useful
  900. # if you're trying to reduce storage usage from the database.
  901. #
  902. # See https://github.com/facebook/rocksdb/wiki/Compression for more details.
  903. #
  904. #rocksdb_bottommost_compression = true
  905. # Compression algorithm for RocksDB's Write-Ahead-Log (WAL).
  906. #
  907. # At present, only ZSTD compression is supported by RocksDB for WAL
  908. # compression. Enabling this can reduce WAL size at the expense of some
  909. # CPU usage during writes.
  910. #
  911. # The options are:
  912. # - "none" = No compression
  913. # - "zstd" = ZSTD compression
  914. #
  915. # For more information on WAL compression, see:
  916. # https://github.com/facebook/rocksdb/wiki/WAL-Compression
  917. #
  918. #rocksdb_wal_compression = "zstd"
  919. # Database recovery mode (for RocksDB WAL corruption).
  920. #
  921. # Use this option when the server reports corruption and refuses to start.
  922. # Set mode 2 (PointInTime) to cleanly recover from this corruption. The
  923. # server will continue from the last good state, several seconds or
  924. # minutes prior to the crash. Clients may have to run "clear-cache &
  925. # reload" to account for the rollback. Upon success, you may reset the
  926. # mode back to default and restart again. Please note in some cases the
  927. # corruption error may not be cleared for at least 30 minutes of operation
  928. # in PointInTime mode.
  929. #
  930. # As a very last ditch effort, if PointInTime does not fix or resolve
  931. # anything, you can try mode 3 (SkipAnyCorruptedRecord) but this will
  932. # leave the server in a potentially inconsistent state.
  933. #
  934. # The default mode 1 (TolerateCorruptedTailRecords) will automatically
  935. # drop the last entry in the database if corrupted during shutdown, but
  936. # nothing more. It is extraordinarily unlikely this will desynchronize
  937. # clients. To disable any form of silent rollback set mode 0
  938. # (AbsoluteConsistency).
  939. #
  940. # The options are:
  941. # 0 = AbsoluteConsistency
  942. # 1 = TolerateCorruptedTailRecords (default)
  943. # 2 = PointInTime (use me if trying to recover)
  944. # 3 = SkipAnyCorruptedRecord (you now voided your Continuwuity warranty)
  945. #
  946. # For more information on these modes, see:
  947. # https://github.com/facebook/rocksdb/wiki/WAL-Recovery-Modes
  948. #
  949. # For more details on recovering a corrupt database, see:
  950. # https://continuwuity.org/troubleshooting.html#database-corruption
  951. #
  952. #rocksdb_recovery_mode = 1
  953. # Enables or disables paranoid SST file checks. This can improve RocksDB
  954. # database consistency at a potential performance impact due to further
  955. # safety checks ran.
  956. #
  957. # For more information, see:
  958. # https://github.com/facebook/rocksdb/wiki/Online-Verification#columnfamilyoptionsparanoid_file_checks
  959. #
  960. #rocksdb_paranoid_file_checks = false
  961. # Enables or disables checksum verification in rocksdb at runtime.
  962. # Checksums are usually hardware accelerated with low overhead; they are
  963. # enabled in rocksdb by default. Older or slower platforms may see gains
  964. # from disabling.
  965. #
  966. #rocksdb_checksums = true
  967. # Enables the "atomic flush" mode in rocksdb. This option is not intended
  968. # for users. It may be removed or ignored in future versions. Atomic flush
  969. # may be enabled by the paranoid to possibly improve database integrity at
  970. # the cost of performance.
  971. #
  972. #rocksdb_atomic_flush = false
  973. # Database repair mode (for RocksDB SST corruption).
  974. #
  975. # Use this option when the server reports corruption while running or
  976. # panics. If the server refuses to start use the recovery mode options
  977. # first. Corruption errors containing the acronym 'SST' which occur after
  978. # startup will likely require this option.
  979. #
  980. # - Backing up your database directory is recommended prior to running the
  981. # repair.
  982. #
  983. # - Disabling repair mode and restarting the server is recommended after
  984. # running the repair.
  985. #
  986. # See https://continuwuity.org/troubleshooting.html#database-corruption for more details on recovering a corrupt database.
  987. #
  988. #rocksdb_repair = false
  989. # Enables idle CPU priority for compaction thread. This is not enabled by
  990. # default to prevent compaction from falling too far behind on busy
  991. # systems.
  992. #
  993. #rocksdb_compaction_prio_idle = false
  994. # Enables idle IO priority for compaction thread. This prevents any
  995. # unexpected lag in the server's operation and is usually a good idea.
  996. # Enabled by default.
  997. #
  998. #rocksdb_compaction_ioprio_idle = true
  999. # Enables RocksDB compaction. You should never ever have to set this
  1000. # option to false. If you for some reason find yourself needing to use
  1001. # this option as part of troubleshooting or a bug, please reach out to us
  1002. # in the continuwuity Matrix room with information and details.
  1003. #
  1004. # Disabling compaction will lead to a significantly bloated and
  1005. # explosively large database, gradually poor performance, unnecessarily
  1006. # excessive disk read/writes, and slower shutdowns and startups.
  1007. #
  1008. #rocksdb_compaction = true
  1009. # Level of statistics collection. Some admin commands to display database
  1010. # statistics may require this option to be set. Database performance may
  1011. # be impacted by higher settings.
  1012. #
  1013. # Option is a number ranging from 0 to 6:
  1014. # 0 = No statistics.
  1015. # 1 = No statistics in release mode (default).
  1016. # 2 to 3 = Statistics with no performance impact.
  1017. # 3 to 5 = Statistics with possible performance impact.
  1018. # 6 = All statistics.
  1019. #
  1020. #rocksdb_stats_level = 1
  1021. # This is a password that can be configured that will let you login to the
  1022. # server bot account (currently `@conduit`) for emergency troubleshooting
  1023. # purposes such as recovering/recreating your admin room, or inviting
  1024. # yourself back.
  1025. #
  1026. # See https://continuwuity.org/troubleshooting.html#lost-access-to-admin-room for other ways to get back into your admin room.
  1027. #
  1028. # Once this password is unset, all sessions will be logged out for
  1029. # security purposes.
  1030. #
  1031. # example: "F670$2CP@Hw8mG7RY1$%!#Ic7YA"
  1032. #
  1033. {% if matrix_continuwuity_config_emergency_password != '' %}
  1034. emergency_password = {{ matrix_continuwuity_config_emergency_password | to_json }}
  1035. {% endif %}
  1036. # This item is undocumented. Please contribute documentation for it.
  1037. #
  1038. #notification_push_path = "/_matrix/push/v1/notify"
  1039. # Allow local (your server only) presence updates/requests.
  1040. #
  1041. # Local presence must be enabled for outgoing presence to function.
  1042. #
  1043. # Note that local presence is not as heavy on the CPU as federated
  1044. # presence, but will still become more expensive the more local users you
  1045. # have.
  1046. #
  1047. #allow_local_presence = true
  1048. # Allow incoming federated presence updates.
  1049. #
  1050. # This option enables processing inbound presence updates from other
  1051. # servers. Without it, remote users will appear as if they are always
  1052. # offline to your local users. This does not affect typing indicators or
  1053. # read receipts.
  1054. #
  1055. #allow_incoming_presence = true
  1056. # Allow outgoing presence updates/requests.
  1057. #
  1058. # This option sends presence updates to other servers, and requires that
  1059. # `allow_local_presence` is also enabled.
  1060. #
  1061. # Note that outgoing presence is very heavy on the CPU and network, and
  1062. # will typically cause extreme strain and slowdowns for no real benefit.
  1063. # There are only a few clients that even implement presence, so you
  1064. # probably don't want to enable this.
  1065. #
  1066. allow_outgoing_presence = {{ matrix_continuwuity_config_allow_outgoing_presence | to_json }}
  1067. # How many seconds without presence updates before you become idle.
  1068. # Defaults to 5 minutes.
  1069. #
  1070. #presence_idle_timeout_s = 300
  1071. # How many seconds without presence updates before you become offline.
  1072. # Defaults to 30 minutes.
  1073. #
  1074. #presence_offline_timeout_s = 1800
  1075. # Enable the presence idle timer for remote users.
  1076. #
  1077. # Disabling is offered as an optimization for servers participating in
  1078. # many large rooms or when resources are limited. Disabling it may cause
  1079. # incorrect presence states (i.e. stuck online) to be seen for some remote
  1080. # users.
  1081. #
  1082. #presence_timeout_remote_users = true
  1083. # Allow local read receipts.
  1084. #
  1085. # Disabling this will effectively also disable outgoing federated read
  1086. # receipts.
  1087. #
  1088. #allow_local_read_receipts = true
  1089. # Allow receiving incoming read receipts from remote servers.
  1090. #
  1091. #allow_incoming_read_receipts = true
  1092. # Allow sending read receipts to remote servers.
  1093. #
  1094. # Note that sending read receipts to remote servers in large rooms with
  1095. # lots of other homeservers may cause additional strain on the CPU and
  1096. # network.
  1097. #
  1098. #allow_outgoing_read_receipts = true
  1099. # Allow local typing updates.
  1100. #
  1101. # Disabling this will effectively also disable outgoing federated typing
  1102. # updates.
  1103. #
  1104. #allow_local_typing = true
  1105. # Allow outgoing typing updates to federation.
  1106. #
  1107. # Note that sending typing indicators to remote servers in large rooms
  1108. # with lots of other homeservers may cause additional strain on the CPU
  1109. # and network.
  1110. #
  1111. #allow_outgoing_typing = true
  1112. # Allow incoming typing updates from federation.
  1113. #
  1114. #allow_incoming_typing = true
  1115. # Maximum time federation user can indicate typing.
  1116. #
  1117. #typing_federation_timeout_s = 30
  1118. # Minimum time local client can indicate typing. This does not override a
  1119. # client's request to stop typing. It only enforces a minimum value in
  1120. # case of no stop request.
  1121. #
  1122. #typing_client_timeout_min_s = 15
  1123. # Maximum time local client can indicate typing.
  1124. #
  1125. #typing_client_timeout_max_s = 45
  1126. # Set this to true for continuwuity to compress HTTP response bodies using
  1127. # zstd. This option does nothing if continuwuity was not built with
  1128. # `zstd_compression` feature. Please be aware that enabling HTTP
  1129. # compression may weaken TLS. Most users should not need to enable this.
  1130. # See https://breachattack.com/ and https://wikipedia.org/wiki/BREACH
  1131. # before deciding to enable this.
  1132. #
  1133. #zstd_compression = false
  1134. # Set this to true for continuwuity to compress HTTP response bodies using
  1135. # gzip. This option does nothing if continuwuity was not built with
  1136. # `gzip_compression` feature. Please be aware that enabling HTTP
  1137. # compression may weaken TLS. Most users should not need to enable this.
  1138. # See https://breachattack.com/ and https://wikipedia.org/wiki/BREACH before
  1139. # deciding to enable this.
  1140. #
  1141. # If you are in a large amount of rooms, you may find that enabling this
  1142. # is necessary to reduce the significantly large response bodies.
  1143. #
  1144. #gzip_compression = false
  1145. # Set this to true for continuwuity to compress HTTP response bodies using
  1146. # brotli. This option does nothing if continuwuity was not built with
  1147. # `brotli_compression` feature. Please be aware that enabling HTTP
  1148. # compression may weaken TLS. Most users should not need to enable this.
  1149. # See https://breachattack.com/ and https://wikipedia.org/wiki/BREACH
  1150. # before deciding to enable this.
  1151. #
  1152. #brotli_compression = false
  1153. # Enable the legacy unauthenticated Matrix media repository endpoints.
  1154. # These endpoints consist of:
  1155. # - /_matrix/media/*/config
  1156. # - /_matrix/media/*/upload
  1157. # - /_matrix/media/*/preview_url
  1158. # - /_matrix/media/*/download/*
  1159. # - /_matrix/media/*/thumbnail/*
  1160. #
  1161. # The authenticated equivalent endpoints are always enabled.
  1162. #
  1163. # Defaults to false, as unauthenticated media has been sunsetted.
  1164. #
  1165. #allow_legacy_media = false
  1166. # This item is undocumented. Please contribute documentation for it.
  1167. #
  1168. #freeze_legacy_media = true
  1169. # Check consistency of the media directory at startup:
  1170. # 1. When `media_compat_file_link` is enabled, this check will upgrade
  1171. # media when switching back and forth between Conduit and conduwuit.
  1172. # Both options must be enabled to handle this.
  1173. # 2. When media is deleted from the directory, this check will also delete
  1174. # its database entry.
  1175. #
  1176. # If none of these checks apply to your use cases, and your media
  1177. # directory is significantly large setting this to false may reduce
  1178. # startup time.
  1179. #
  1180. #media_startup_check = true
  1181. # Enable backward-compatibility with Conduit's media directory by creating
  1182. # symlinks of media.
  1183. #
  1184. # This option is only necessary if you plan on using Conduit again.
  1185. # Otherwise setting this to false reduces filesystem clutter and overhead
  1186. # for managing these symlinks in the directory. This is now disabled by
  1187. # default. You may still return to upstream Conduit but you have to run
  1188. # continuwuity at least once with this set to true and allow the
  1189. # media_startup_check to take place before shutting down to return to
  1190. # Conduit.
  1191. #
  1192. #media_compat_file_link = false
  1193. # Prune missing media from the database as part of the media startup
  1194. # checks.
  1195. #
  1196. # This means if you delete files from the media directory the
  1197. # corresponding entries will be removed from the database. This is
  1198. # disabled by default because if the media directory is accidentally moved
  1199. # or inaccessible, the metadata entries in the database will be lost with
  1200. # sadness.
  1201. #
  1202. #prune_missing_media = false
  1203. # List of forbidden server names via regex patterns that we will block
  1204. # incoming AND outgoing federation with, and block client room joins /
  1205. # remote user invites.
  1206. #
  1207. # Note that your messages can still make it to forbidden servers through
  1208. # backfilling. Events we receive from forbidden servers via backfill
  1209. # from servers we *do* federate with will be stored in the database.
  1210. #
  1211. # This check is applied on the room ID, room alias, sender server name,
  1212. # sender user's server name, inbound federation X-Matrix origin, and
  1213. # outbound federation handler.
  1214. #
  1215. # You can set this to [".*"] to block all servers by default, and then
  1216. # use `allowed_remote_server_names` to allow only specific servers.
  1217. #
  1218. # example: ["badserver\\.tld$", "badphrase", "19dollarfortnitecards"]
  1219. #
  1220. forbidden_remote_server_names = {{ matrix_continuwuity_config_forbidden_remote_server_names | to_json }}
  1221. # List of allowed server names via regex patterns that we will allow,
  1222. # regardless of if they match `forbidden_remote_server_names`.
  1223. #
  1224. # This option has no effect if `forbidden_remote_server_names` is empty.
  1225. #
  1226. # example: ["goodserver\\.tld$", "goodphrase"]
  1227. #
  1228. allowed_remote_server_names = {{ matrix_continuwuity_config_allowed_remote_server_names | to_json }}
  1229. # Vector list of regex patterns of server names that continuwuity will
  1230. # refuse to download remote media from.
  1231. #
  1232. # example: ["badserver\.tld$", "badphrase", "19dollarfortnitecards"]
  1233. #
  1234. prevent_media_downloads_from = {{ matrix_continuwuity_config_prevent_media_downloads_from | to_json }}
  1235. # List of forbidden server names via regex patterns that we will block all
  1236. # outgoing federated room directory requests for. Useful for preventing
  1237. # our users from wandering into bad servers or spaces.
  1238. #
  1239. # example: ["badserver\.tld$", "badphrase", "19dollarfortnitecards"]
  1240. #
  1241. forbidden_remote_room_directory_server_names = {{ matrix_continuwuity_config_forbidden_remote_room_directory_server_names | to_json }}
  1242. # Vector list of regex patterns of server names that continuwuity will not
  1243. # send messages to the client from.
  1244. #
  1245. # Note that there is no way for clients to receive messages once a server
  1246. # has become unignored without doing a full sync. This is a protocol
  1247. # limitation with the current sync protocols. This means this is somewhat
  1248. # of a nuclear option.
  1249. #
  1250. # example: ["reallybadserver\.tld$", "reallybadphrase",
  1251. # "69dollarfortnitecards"]
  1252. #
  1253. ignore_messages_from_server_names = {{ matrix_continuwuity_config_ignore_messages_from_server_names | to_json }}
  1254. # List of server names that continuwuity will deprioritize (try last) when
  1255. # a client requests to join a room.
  1256. #
  1257. # This can be used to potentially speed up room join requests, by
  1258. # deprioritizing sending join requests through servers that are known to
  1259. # be large or slow.
  1260. #
  1261. # continuwuity will still send join requests to servers in this list if
  1262. # the room couldn't be joined via other servers it federates with.
  1263. #
  1264. # example: ["example.com"]
  1265. #
  1266. #deprioritize_joins_through_servers = []
  1267. # Send messages from users that the user has ignored to the client.
  1268. #
  1269. # There is no way for clients to receive messages sent while a user was
  1270. # ignored without doing a full sync. This is a protocol limitation with
  1271. # the current sync protocols. Disabling this option will move
  1272. # responsibility of ignoring messages to the client, which can avoid this
  1273. # limitation.
  1274. #
  1275. #send_messages_from_ignored_users_to_client = false
  1276. # Send "org.matrix.dummy_event" events to the client. This is a debugging
  1277. # option.
  1278. #
  1279. #send_dummy_events_to_clients = false
  1280. # Vector list of IPv4 and IPv6 CIDR ranges / subnets *in quotes* that you
  1281. # do not want continuwuity to send outbound requests to. Defaults to
  1282. # RFC1918, unroutable, loopback, multicast, and testnet addresses for
  1283. # security.
  1284. #
  1285. # Please be aware that this is *not* a guarantee. You should be using a
  1286. # firewall with zones as doing this on the application layer may have
  1287. # bypasses.
  1288. #
  1289. # Currently this does not account for proxies in use like Synapse does.
  1290. #
  1291. # To disable, set this to be an empty vector (`[]`).
  1292. #
  1293. # Defaults to:
  1294. # ["127.0.0.0/8", "10.0.0.0/8", "172.16.0.0/12",
  1295. # "192.168.0.0/16", "100.64.0.0/10", "192.0.0.0/24", "169.254.0.0/16",
  1296. # "192.88.99.0/24", "198.18.0.0/15", "192.0.2.0/24", "198.51.100.0/24",
  1297. # "203.0.113.0/24", "224.0.0.0/4", "::1/128", "fe80::/10", "fc00::/7",
  1298. # "2001:db8::/32", "ff00::/8", "fec0::/10"]
  1299. #
  1300. #ip_range_denylist =
  1301. # Optional IP address or network interface-name to bind as the source of
  1302. # URL preview requests. If not set, it will not bind to a specific
  1303. # address or interface.
  1304. #
  1305. # Interface names only supported on Linux, Android, and Fuchsia platforms;
  1306. # all other platforms can specify the IP address. To list the interfaces
  1307. # on your system, use the command `ip link show`.
  1308. #
  1309. # example: `"eth0"` or `"1.2.3.4"`
  1310. #
  1311. #url_preview_bound_interface =
  1312. # Vector list of domains allowed to send requests to for URL previews.
  1313. #
  1314. # This is a *contains* match, not an explicit match. Putting "google.com"
  1315. # will match "https://google.com" and
  1316. # "http://mymaliciousdomainexamplegoogle.com" Setting this to "*" will
  1317. # allow all URL previews. Please note that this opens up significant
  1318. # attack surface to your server, you are expected to be aware of the risks
  1319. # by doing so.
  1320. #
  1321. url_preview_domain_contains_allowlist = {{ matrix_continuwuity_config_url_preview_domain_contains_allowlist | to_json }}
  1322. # Vector list of explicit domains allowed to send requests to for URL
  1323. # previews.
  1324. #
  1325. # This is an *explicit* match, not a contains match. Putting "google.com"
  1326. # will match "https://google.com", "http://google.com", but not
  1327. # "https://mymaliciousdomainexamplegoogle.com". Setting this to "*" will
  1328. # allow all URL previews. Please note that this opens up significant
  1329. # attack surface to your server, you are expected to be aware of the risks
  1330. # by doing so.
  1331. #
  1332. url_preview_domain_explicit_allowlist = {{ matrix_continuwuity_config_url_preview_domain_explicit_allowlist | to_json }}
  1333. # Vector list of explicit domains not allowed to send requests to for URL
  1334. # previews.
  1335. #
  1336. # This is an *explicit* match, not a contains match. Putting "google.com"
  1337. # will match "https://google.com", "http://google.com", but not
  1338. # "https://mymaliciousdomainexamplegoogle.com". The denylist is checked
  1339. # first before allowlist. Setting this to "*" will not do anything.
  1340. #
  1341. #url_preview_domain_explicit_denylist = []
  1342. # Vector list of URLs allowed to send requests to for URL previews.
  1343. #
  1344. # Note that this is a *contains* match, not an explicit match. Putting
  1345. # "google.com" will match "https://google.com/",
  1346. # "https://google.com/url?q=https://mymaliciousdomainexample.com", and
  1347. # "https://mymaliciousdomainexample.com/hi/google.com" Setting this to "*"
  1348. # will allow all URL previews. Please note that this opens up significant
  1349. # attack surface to your server, you are expected to be aware of the risks
  1350. # by doing so.
  1351. #
  1352. #url_preview_url_contains_allowlist = []
  1353. # Maximum amount of bytes allowed in a URL preview body size when
  1354. # spidering. Defaults to 256KB in bytes.
  1355. #
  1356. #url_preview_max_spider_size = 256000
  1357. # Total request timeout for URL previews (seconds). This includes
  1358. # connection, request, and response body reading time.
  1359. #
  1360. #url_preview_timeout = 120
  1361. # Option to decide whether you would like to run the domain allowlist
  1362. # checks (contains and explicit) on the root domain or not. Does not apply
  1363. # to URL contains allowlist. Defaults to false.
  1364. #
  1365. # Example usecase: If this is enabled and you have "wikipedia.org" allowed
  1366. # in the explicit and/or contains domain allowlist, it will allow all
  1367. # subdomains under "wikipedia.org" such as "en.m.wikipedia.org" as the
  1368. # root domain is checked and matched. Useful if the domain contains
  1369. # allowlist is still too broad for you but you still want to allow all the
  1370. # subdomains under a root domain.
  1371. #
  1372. url_preview_check_root_domain = {{ matrix_continuwuity_config_url_preview_check_root_domain | to_json }}
  1373. # User agent that is used specifically when fetching url previews.
  1374. #
  1375. #url_preview_user_agent = "continuwuity/<version> (bot; +https://continuwuity.org)"
  1376. # Determines whether audio and video files will be downloaded for URL
  1377. # previews.
  1378. #
  1379. #url_preview_allow_audio_video = false
  1380. # List of forbidden room aliases and room IDs as strings of regex
  1381. # patterns.
  1382. #
  1383. # Regex can be used or explicit contains matches can be done by just
  1384. # specifying the words (see example).
  1385. #
  1386. # This is checked upon room alias creation, custom room ID creation if
  1387. # used, and startup as warnings if any room aliases in your database have
  1388. # a forbidden room alias/ID.
  1389. #
  1390. # example: ["19dollarfortnitecards", "b[4a]droom", "badphrase"]
  1391. #
  1392. #forbidden_alias_names = []
  1393. # List of forbidden username patterns/strings.
  1394. #
  1395. # Regex can be used or explicit contains matches can be done by just
  1396. # specifying the words (see example).
  1397. #
  1398. # This is checked upon username availability check, registration, and
  1399. # startup as warnings if any local users in your database have a forbidden
  1400. # username.
  1401. #
  1402. # example: ["administrator", "b[a4]dusernam[3e]", "badphrase"]
  1403. #
  1404. #forbidden_usernames = []
  1405. # Retry failed and incomplete messages to remote servers immediately upon
  1406. # startup. This is called bursting. If this is disabled, said messages may
  1407. # not be delivered until more messages are queued for that server. Do not
  1408. # change this option unless server resources are extremely limited or the
  1409. # scale of the server's deployment is huge. Do not disable this unless you
  1410. # know what you are doing.
  1411. #
  1412. #startup_netburst = true
  1413. # Messages are dropped and not reattempted. The `startup_netburst` option
  1414. # must be enabled for this value to have any effect. Do not change this
  1415. # value unless you know what you are doing. Set this value to -1 to
  1416. # reattempt every message without trimming the queues; this may consume
  1417. # significant disk. Set this value to 0 to drop all messages without any
  1418. # attempt at redelivery.
  1419. #
  1420. #startup_netburst_keep = 50
  1421. # Block non-admin local users from sending room invites (local and
  1422. # remote), and block non-admin users from receiving remote room invites.
  1423. #
  1424. # Admins are always allowed to send and receive all room invites.
  1425. #
  1426. #block_non_admin_invites = false
  1427. # Allow admins to enter commands in rooms other than "#admins" (admin
  1428. # room) by prefixing your message with "\!admin" or "\\!admin" followed up
  1429. # a normal continuwuity admin command. The reply will be publicly visible
  1430. # to the room, originating from the sender.
  1431. #
  1432. # example: \\!admin debug ping continuwuity.org
  1433. #
  1434. #admin_escape_commands = true
  1435. # Automatically activate the continuwuity admin room console / CLI on
  1436. # startup. This option can also be enabled with `--console` continuwuity
  1437. # argument.
  1438. #
  1439. #admin_console_automatic = false
  1440. # List of admin commands to execute on startup.
  1441. #
  1442. # This option can also be configured with the `--execute` continuwuity
  1443. # argument and can take standard shell commands and environment variables
  1444. #
  1445. # For example: `./continuwuity --execute "server admin-notice continuwuity
  1446. # has started up at $(date)"`
  1447. #
  1448. # example: admin_execute = ["debug ping continuwuity.org", "debug echo
  1449. # hi"]`
  1450. #
  1451. #admin_execute = []
  1452. # Ignore errors in startup commands.
  1453. #
  1454. # If false, continuwuity will error and fail to start if an admin execute
  1455. # command (`--execute` / `admin_execute`) fails.
  1456. #
  1457. #admin_execute_errors_ignore = false
  1458. # List of admin commands to execute on SIGUSR2.
  1459. #
  1460. # Similar to admin_execute, but these commands are executed when the
  1461. # server receives SIGUSR2 on supporting platforms.
  1462. #
  1463. #admin_signal_execute = []
  1464. # Controls the max log level for admin command log captures (logs
  1465. # generated from running admin commands). Defaults to "info" on release
  1466. # builds, else "debug" on debug builds.
  1467. #
  1468. #admin_log_capture = "info"
  1469. # The default room tag to apply on the admin room.
  1470. #
  1471. # On some clients like Element, the room tag "m.server_notice" is a
  1472. # special pinned room at the very bottom of your room list. The
  1473. # continuwuity admin room can be pinned here so you always have an
  1474. # easy-to-access shortcut dedicated to your admin room.
  1475. #
  1476. #admin_room_tag = "m.server_notice"
  1477. # A list of Matrix IDs that are qualified as server admins.
  1478. #
  1479. # Any Matrix IDs within this list are regarded as an admin
  1480. # regardless of whether they are in the admin room or not
  1481. #
  1482. #admins_list = []
  1483. # Defines whether those within the admin room are added to the
  1484. # admins_list.
  1485. #
  1486. #admins_from_room = true
  1487. # Sentry.io crash/panic reporting, performance monitoring/metrics, etc.
  1488. # This is NOT enabled by default.
  1489. #
  1490. #sentry = false
  1491. # Sentry reporting URL, if a custom one is desired.
  1492. #
  1493. #sentry_endpoint = ""
  1494. # Report your continuwuity server_name in Sentry.io crash reports and
  1495. # metrics.
  1496. #
  1497. #sentry_send_server_name = false
  1498. # Performance monitoring/tracing sample rate for Sentry.io.
  1499. #
  1500. # Note that too high values may impact performance, and can be disabled by
  1501. # setting it to 0.0 (0%) This value is read as a percentage to Sentry,
  1502. # represented as a decimal. Defaults to 15% of traces (0.15)
  1503. #
  1504. #sentry_traces_sample_rate = 0.15
  1505. # Whether to attach a stacktrace to Sentry reports.
  1506. #
  1507. #sentry_attach_stacktrace = false
  1508. # Send panics to Sentry. This is true by default, but Sentry has to be
  1509. # enabled. The global `sentry` config option must be enabled to send any
  1510. # data.
  1511. #
  1512. #sentry_send_panic = true
  1513. # Send errors to sentry. This is true by default, but sentry has to be
  1514. # enabled. This option is only effective in release-mode; forced to false
  1515. # in debug-mode.
  1516. #
  1517. #sentry_send_error = true
  1518. # Controls the tracing log level for Sentry to send things like
  1519. # breadcrumbs and transactions
  1520. #
  1521. #sentry_filter = "info"
  1522. # Enable the tokio-console. This option is only relevant to developers.
  1523. #
  1524. # For more information, see:
  1525. # https://continuwuity.org/development.html#debugging-with-tokio-console
  1526. #
  1527. #tokio_console = false
  1528. # This item is undocumented. Please contribute documentation for it.
  1529. #
  1530. #test = false
  1531. # Controls whether admin room notices like account registrations, password
  1532. # changes, account deactivations, room directory publications, etc will be
  1533. # sent to the admin room. Update notices and normal admin command
  1534. # responses will still be sent.
  1535. #
  1536. #admin_room_notices = true
  1537. # Enable database pool affinity support. On supporting systems, block
  1538. # device queue topologies are detected and the request pool is optimized
  1539. # for the hardware; db_pool_workers is determined automatically.
  1540. #
  1541. #db_pool_affinity = true
  1542. # Sets the number of worker threads in the frontend-pool of the database.
  1543. # This number should reflect the I/O capabilities of the system,
  1544. # such as the queue-depth or the number of simultaneous requests in
  1545. # flight. Defaults to 32 or four times the number of CPU cores, whichever
  1546. # is greater.
  1547. #
  1548. # Note: This value is only used if db_pool_affinity is disabled or not
  1549. # detected on the system, otherwise it is determined automatically.
  1550. #
  1551. #db_pool_workers = 32
  1552. # When db_pool_affinity is enabled and detected, the size of any worker
  1553. # group will not exceed the determined value. This is necessary when
  1554. # thread-pooling approach does not scale to the full capabilities of
  1555. # high-end hardware; using detected values without limitation could
  1556. # degrade performance.
  1557. #
  1558. # The value is multiplied by the number of cores which share a device
  1559. # queue, since group workers can be scheduled on any of those cores.
  1560. #
  1561. #db_pool_workers_limit = 64
  1562. # Determines the size of the queues feeding the database's frontend-pool.
  1563. # The size of the queue is determined by multiplying this value with the
  1564. # number of pool workers. When this queue is full, tokio tasks conducting
  1565. # requests will yield until space is available; this is good for
  1566. # flow-control by avoiding buffer-bloat, but can inhibit throughput if
  1567. # too low.
  1568. #
  1569. #db_pool_queue_mult = 4
  1570. # Sets the initial value for the concurrency of streams. This value simply
  1571. # allows overriding the default in the code. The default is 32, which is
  1572. # the same as the default in the code. Note this value is itself
  1573. # overridden by the computed stream_width_scale, unless that is disabled;
  1574. # this value can serve as a fixed-width instead.
  1575. #
  1576. #stream_width_default = 32
  1577. # Scales the stream width starting from a base value detected for the
  1578. # specific system. The base value is the database pool worker count
  1579. # determined from the hardware queue size (e.g. 32 for SSD or 64 or 128+
  1580. # for NVMe). This float allows scaling the width up or down by multiplying
  1581. # it (e.g. 1.5, 2.0, etc). The maximum result can be the size of the pool
  1582. # queue (see: db_pool_queue_mult) as any larger value will stall the tokio
  1583. # task. The value can also be scaled down (e.g. 0.5) to improve
  1584. # responsiveness for many users at the cost of throughput for each.
  1585. #
  1586. # Setting this value to 0.0 causes the stream width to be fixed at the
  1587. # value of stream_width_default. The default scale is 1.0 to match the
  1588. # capabilities detected for the system.
  1589. #
  1590. #stream_width_scale = 1.0
  1591. # Sets the initial amplification factor. This controls batch sizes of
  1592. # requests made by each pool worker, multiplying the throughput of each
  1593. # stream. This value is somewhat abstract from specific hardware
  1594. # characteristics and can be significantly larger than any thread count or
  1595. # queue size. This is because each database query may require several
  1596. # index lookups, thus many database queries in a batch may make progress
  1597. # independently while also sharing index and data blocks which may or may
  1598. # not be cached. It is worthwhile to submit huge batches to reduce
  1599. # complexity. The maximum value is 32768, though sufficient hardware is
  1600. # still advised for that.
  1601. #
  1602. #stream_amplification = 1024
  1603. # Number of sender task workers; determines sender parallelism. Default is
  1604. # '0' which means the value is determined internally, likely matching the
  1605. # number of tokio worker-threads or number of cores, etc. Override by
  1606. # setting a non-zero value.
  1607. #
  1608. #sender_workers = 0
  1609. # Enables listener sockets; can be set to false to disable listening. This
  1610. # option is intended for developer/diagnostic purposes only.
  1611. #
  1612. #listening = true
  1613. # Enables configuration reload when the server receives SIGUSR1 on
  1614. # supporting platforms.
  1615. #
  1616. #config_reload_signal = true
  1617. # Allow search engines and crawlers to index Continuwuity's built-in
  1618. # webpages served under the `/_continuwuity/` prefix.
  1619. #
  1620. #allow_web_indexing = false
  1621. [global.tls]
  1622. # Path to a valid TLS certificate file.
  1623. #
  1624. # example: "/path/to/my/certificate.crt"
  1625. #
  1626. #certs =
  1627. # Path to a valid TLS certificate private key.
  1628. #
  1629. # example: "/path/to/my/certificate.key"
  1630. #
  1631. #key =
  1632. # Whether to listen and allow for HTTP and HTTPS connections (insecure!)
  1633. #
  1634. #dual_protocol = false
  1635. [global.well_known]
  1636. # The server URL that the client well-known file will serve. This should
  1637. # not contain a port, and should just be a valid HTTPS URL.
  1638. #
  1639. # example: "https://matrix.example.com"
  1640. #
  1641. client = {{ matrix_continuwuity_config_well_known_client | to_json }}
  1642. # The server base domain of the URL with a specific port that the server
  1643. # well-known file will serve. This should contain a port at the end, and
  1644. # should not be a URL.
  1645. #
  1646. # example: "matrix.example.com:443"
  1647. #
  1648. #server =
  1649. # URL to a support page for the server, which will be served as part of
  1650. # the MSC1929 server support endpoint at /.well-known/matrix/support.
  1651. # Will be included alongside any contact information
  1652. #
  1653. #support_page =
  1654. # The ed25519 public key for the policy server available at this server's
  1655. # name. Must be unpadded base64.
  1656. #
  1657. #policy_server_public_key =
  1658. # Role string for server support contacts, to be served as part of the
  1659. # MSC1929 server support endpoint at /.well-known/matrix/support.
  1660. #
  1661. #support_role = "m.role.admin"
  1662. # Email address for server support contacts, to be served as part of the
  1663. # MSC1929 server support endpoint.
  1664. # This will be used along with support_mxid if specified.
  1665. #
  1666. #support_email =
  1667. # Matrix ID for server support contacts, to be served as part of the
  1668. # MSC1929 server support endpoint.
  1669. # This will be used along with support_email if specified.
  1670. #
  1671. # If no email or mxid is specified, all of the server's admins will be
  1672. # listed.
  1673. #
  1674. #support_mxid =
  1675. # PGP key URI for server support contacts, to be served as part of the
  1676. # MSC1929 server support endpoint.
  1677. #
  1678. #support_pgp_key =
  1679. [global.matrix_rtc]
  1680. # A list of MatrixRTC foci (transports) which will be served via the
  1681. # MSC4143 RTC transports endpoint at
  1682. # `/_matrix/client/v1/rtc/transports`. If you're setting up livekit,
  1683. # you'd want something like:
  1684. # ```toml
  1685. # [global.matrix_rtc]
  1686. # foci = [
  1687. # { type = "livekit", livekit_service_url = "https://livekit.example.com" },
  1688. # ]
  1689. # ```
  1690. #
  1691. # To disable, set this to an empty list (`[]`).
  1692. #
  1693. foci = [
  1694. {% for focus in matrix_continuwuity_config_rtc_foci %}
  1695. { {% for key, value in focus.items() %}{{ key }} = {{ value | to_json }}{% if not loop.last %}, {% endif %}{% endfor %} }{% if not loop.last %}, {% endif %}
  1696. {% endfor %}
  1697. ]
  1698. #[global.antispam]
  1699. #[global.antispam.meowlnir]
  1700. # The base URL on which to contact Meowlnir (before /_meowlnir/antispam).
  1701. #
  1702. # Example: "http://127.0.0.1:29339"
  1703. #
  1704. #base_url =
  1705. # The authentication secret defined in antispam->secret. Required for
  1706. # continuwuity to talk to Meowlnir.
  1707. #
  1708. #secret =
  1709. # The management room for which to send requests
  1710. #
  1711. #management_room =
  1712. # If enabled run all federated join attempts (both federated and local)
  1713. # through the Meowlnir anti-spam checks.
  1714. #
  1715. # By default, only join attempts for rooms with the `fi.mau.spam_checker`
  1716. # restricted join rule are checked.
  1717. #
  1718. #check_all_joins = false
  1719. #[global.antispam.draupnir]
  1720. # The base URL on which to contact Draupnir (before /api/).
  1721. #
  1722. # Example: "http://127.0.0.1:29339"
  1723. #
  1724. #base_url =
  1725. # The authentication secret defined in
  1726. # web->synapseHTTPAntispam->authorization
  1727. #
  1728. #secret =
  1729. {% if matrix_continuwuity_config_smtp_enabled %}
  1730. [global.smtp]
  1731. # A `smtp://`` URI which will be used to connect to a mail server.
  1732. # Uncommenting the [global.smtp] group and setting this option enables
  1733. # features which depend on the ability to send email,
  1734. # such as self-service password resets.
  1735. #
  1736. # For most modern mail servers, format the URI like this:
  1737. # `smtps://username:password@hostname:port`
  1738. # Note that you will need to URL-encode the username and password. If your
  1739. # username _is_ your email address, you will need to replace the `@` with
  1740. # `%40`.
  1741. #
  1742. # For a guide on the accepted URI syntax, consult Lettre's documentation:
  1743. # https://docs.rs/lettre/latest/lettre/transport/smtp/struct.AsyncSmtpTransport.html#method.from_url
  1744. #
  1745. {% if matrix_continuwuity_config_smtp_connection_uri != '' and matrix_continuwuity_config_smtp_sender != '' %}
  1746. connection_uri = {{ matrix_continuwuity_config_smtp_connection_uri | to_json }}
  1747. {% else %}
  1748. #connection_uri =
  1749. {% endif %}
  1750. # The outgoing address which will be used for sending emails.
  1751. #
  1752. # For a syntax guide, see https://datatracker.ietf.org/doc/html/rfc2822#section-3.4
  1753. #
  1754. # ...or if you don't want to read the RFC, for some reason:
  1755. # - `Name <address@domain.org>` to specify a sender name
  1756. # - `address@domain.org` to not use a name
  1757. #
  1758. {% if matrix_continuwuity_config_smtp_connection_uri != '' and matrix_continuwuity_config_smtp_sender != '' %}
  1759. sender = {{ matrix_continuwuity_config_smtp_sender | to_json }}
  1760. {% else %}
  1761. #sender =
  1762. {% endif %}
  1763. # Whether to allow public registration with an email address.
  1764. #
  1765. # Note that, if this option is enabled, anyone will be able to register an
  1766. # account with just an email address.
  1767. #
  1768. # If either this option or `require_email_for_token_registration` are set,
  1769. # users will not be allowed to remove their email address.
  1770. #
  1771. require_email_for_registration = {{ matrix_continuwuity_config_smtp_require_email_for_registration | to_json }}
  1772. # Whether to require that users who register with a registration token
  1773. # provide an email address. This option is independent of
  1774. # `require_email_for_registration`.
  1775. #
  1776. require_email_for_token_registration = {{ matrix_continuwuity_config_smtp_require_email_for_token_registration | to_json }}
  1777. {% endif %}
  1778. #[global.registration_terms]
  1779. # The language code to provide to clients along with the policy documents.
  1780. #
  1781. #language = "en"
  1782. # Policy documents, such as terms and conditions or a privacy policy,
  1783. # which users must agree to when registering an account.
  1784. #
  1785. # Example:
  1786. # ```ignore
  1787. # [global.registration_terms.documents]
  1788. # privacy_policy = { name = "Privacy Policy", url = "https://homeserver.example/en/privacy_policy.html" }
  1789. # ```
  1790. #
  1791. #documents =
  1792. #[global.oauth]
  1793. # The compatibility mode to use for OAuth.
  1794. #
  1795. # - "disabled": OAuth will be unavailable. Users will only be able to log
  1796. # in using legacy authentication.
  1797. # - "hybrid": OAuth and legacy authentication will both be available. Some
  1798. # clients may only use one or the other.
  1799. # - "exclusive": Only OAuth will be available. Clients which require
  1800. # legacy authentication will be unable to log in.
  1801. #
  1802. #compatibility_mode = "hybrid"
  1803. #[global.oauth.oidc]
  1804. # Uncommenting this section will enable Continuwuity's support for
  1805. # authenticating users using an OpenID Connect-compatible identity provider.
  1806. # This is referred to as "delegated authentication".
  1807. #
  1808. # IMPORTANT NOTE: When delegated authentication is active, Continuwuity will behave as if
  1809. # the `global.oauth.compatibility_mode` setting is set to `exclusive`.
  1810. # Matrix clients which do not support OAuth login (also referred to as "next-gen auth") will NOT be able
  1811. # to log in while delegated authentication is active.
  1812. # The OIDC issuer URL. Continuwuity will use OpenID Connect Discovery to
  1813. # automatically fetch the identity provider's metadata from this URL.
  1814. # Generally you should set this to the base domain your identity provider
  1815. # runs on.
  1816. #
  1817. #discovery_url =
  1818. # The OAuth client ID for Continuwuity to use when communicating with the
  1819. # identity provider.
  1820. #
  1821. #client_id =
  1822. # The OAuth client secret for Continuwuity to use when communicating with
  1823. # the identity provider.
  1824. #
  1825. #client_secret =
  1826. # A path to a file which Continuwuity will read the client secret from.
  1827. # If this option is set, it will override `client_secret`.
  1828. #
  1829. # The server will fail to start if the file cannot be read.
  1830. #
  1831. #client_secret_file =
  1832. # Additional scopes Continuwuity should request from the IDP. This may be
  1833. # necessary to access certain claims. Continuwuity always requests the
  1834. # `openid` scope.
  1835. #
  1836. #additional_scopes = []
  1837. # Whether the user should be prompted to choose a localpart
  1838. # when signing in for the first time. If this is `false`, Continuwuity
  1839. # will attempt to use the value of the `preferred_username_claim`
  1840. # (see below) as the user's localpart. Authentication will
  1841. # fail if this claim is missing or is not a valid localpart.
  1842. #
  1843. #prompt_for_localpart = true
  1844. # The claim to use for the user's localpart, if `prompt_for_localpart` is
  1845. # false.
  1846. #
  1847. #preferred_username_claim = "preferred_username"
  1848. # The claim which will be used to set the user's email address,
  1849. # either on initial registration or on every login depending on
  1850. # the value of `profile_key_import_mode`. Continuwuity assumes that
  1851. # the IDP has taken care of verifying that the user controls the email
  1852. # address it provides.
  1853. #
  1854. # This option does nothing if SMTP is not configured.
  1855. #
  1856. # If this option is set, and `profile_key_import_mode` is `on_login`,
  1857. # users will not be able to change their email addresses themselves.
  1858. #
  1859. #email_claim = "email"
  1860. # Defines how claims returned from the IDP should be mapped to a user's
  1861. # profile data. The profile field named in each key will be set from the
  1862. # claim named in the corresponding value when the user first registers,
  1863. # and possibly on subsequent logins as well, depending on the value of
  1864. # `profile_key_import_mode` (see below).
  1865. #
  1866. # Per-room overrides to the user's display name or avatar will be
  1867. # preserved by the import process.
  1868. #
  1869. # SECURITY NOTE: If the `avatar_url` field is set, Continuwuity will
  1870. # perform a HTTP GET to the URL in the mapped claim and use the returned
  1871. # file as the user's profile picture. Make sure your users are not able
  1872. # to set the value of the mapped claim to an arbitrary URL.
  1873. #
  1874. #profile_key_map = { displayname = "name" }
  1875. # When profile keys should be imported from the IDP's claims.
  1876. #
  1877. # - "on_registration": Listed keys will be imported once, when the user
  1878. # logs in for the first time and their shadow account is created.
  1879. # - "on_login": Listed keys will be imported every time the user logs in.
  1880. # Additionally, users will not be able to manually edit any listed keys
  1881. # through their Matrix client.
  1882. #
  1883. #profile_key_import_mode = "on_registration"