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.
 
 

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