2024-01-18 07:08:25 +01:00
# =============================================================================
# This is the official example config for conduwuit.
# If you use it for your server, you will need to adjust it to your own needs.
# At the very least, change the server_name field!
2024-04-12 02:17:30 +02:00
#
# This documentation can also be found at https://conduwuit.puppyirl.gay/configuration.html
2024-01-18 07:08:25 +01:00
# =============================================================================
[ global ]
# The server_name is the pretty name of this server. It is used as a suffix for user
# and room ids. Examples: matrix.org, conduit.rs
# The Conduit server needs all /_matrix/ requests to be reachable at
# https://your.server.name/ on port 443 (client-server) and 8448 (federation).
# If that's not possible for you, you can create /.well-known files to redirect
# requests (delegation). See
# https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixclient
# and
# https://spec.matrix.org/v1.9/server-server-api/#getwell-knownmatrixserver
# for more information
# YOU NEED TO EDIT THIS
#server_name = "your.server.name"
2024-03-06 01:19:06 +01:00
# Servers listed here will be used to gather public keys of other servers (notary trusted key servers).
#
# The default behaviour for conduwuit is to attempt to query trusted key servers before querying the individual servers.
# This is done for performance reasons, but if you would like to query individual servers before the notary servers
# configured below, set to
#
# (Currently, conduwuit doesn't support batched key requests, so this list should only contain Synapse servers)
# Defaults to `matrix.org`
2024-01-25 04:29:30 +01:00
# trusted_servers = ["matrix.org"]
2024-01-18 07:08:25 +01:00
2024-04-24 08:19:50 +02:00
# Sentry.io crash/panic reporting, performance monitoring/metrics, etc. This is NOT enabled by default.
# conduwuit's default Sentry reporting endpoint is o4506996327251968.ingest.us.sentry.io
2024-03-29 23:21:17 +01:00
#
2024-04-24 08:19:50 +02:00
# Defaults to *false*
2024-03-29 23:21:17 +01:00
#sentry = false
2024-04-24 08:19:50 +02:00
# Sentry reporting URL if a custom one is desired
#
# Defaults to conduwuit's default Sentry endpoint: "https://fe2eb4536aa04949e28eff3128d64757@o4506996327251968.ingest.us.sentry.io/4506996334657536"
#sentry_endpoint = ""
2024-03-29 23:21:17 +01:00
# Report your Conduwuit server_name in Sentry.io crash reports and metrics
#
# Defaults to false
#sentry_send_server_name = false
2024-03-30 00:59:02 +01:00
# Performance monitoring/tracing sample rate for Sentry.io
#
# Note that too high values may impact performance, and can be disabled by setting it to 0.0
#
# Defaults to 0.15
#sentry_traces_sample_rate = 0.15
2024-01-18 07:08:25 +01:00
### Database configuration
2024-05-15 17:53:30 +02:00
# This is the only directory where conduwuit will save its data, including media.
# Note: this was previously "/var/lib/matrix-conduit"
database_path = "/var/lib/conduwuit"
2024-01-18 07:08:25 +01:00
# Database backend: Only rocksdb and sqlite are supported. Please note that sqlite
# will perform significantly worse than rocksdb as it is not intended to be used the
# way it is by conduwuit. sqlite only exists for historical reasons.
database_backend = "rocksdb"
### Network
2024-02-26 04:03:44 +01:00
# The port(s) conduwuit will be running on. You need to set up a reverse proxy such as
2024-01-18 07:08:25 +01:00
# Caddy or Nginx so all requests to /_matrix on port 443 and 8448 will be
# forwarded to the conduwuit instance running on this port
# Docker users: Don't change this, you'll need to map an external port to this.
2024-02-26 04:03:44 +01:00
# To listen on multiple ports, specify a vector e.g. [8080, 8448]
2024-06-03 07:17:00 +02:00
#
# default if unspecified is 8008
2024-01-18 07:08:25 +01:00
port = 6167
# default address (IPv4 or IPv6) conduwuit will listen on. Generally you want this to be
# localhost (127.0.0.1 / ::1). If you are using Docker or a container NAT networking setup, you
2024-04-07 00:42:00 +02:00
# likely need this to be 0.0.0.0.
2024-06-03 07:17:00 +02:00
# To listen multiple addresses, specify a vector e.g. ["127.0.0.1", "::1"]
#
# default if unspecified is both IPv4 and IPv6 localhost: ["127.0.0.1", "::1"]
2024-01-18 07:08:25 +01:00
address = "127.0.0.1"
# Max request size for file uploads
max_request_size = 20_000_000 # in bytes
# Uncomment unix_socket_path to listen on a UNIX socket at the specified path.
# If listening on a UNIX socket, you must remove/comment the 'address' key if defined and add your
# reverse proxy to the 'conduwuit' group, unless world RW permissions are specified with unix_socket_perms (666 minimum).
#unix_socket_path = "/run/conduwuit/conduwuit.sock"
#unix_socket_perms = 660
# Set this to true for conduwuit to compress HTTP response bodies using zstd.
2024-03-09 21:49:51 +01:00
# This option does nothing if conduwuit was not built with `zstd_compression` feature.
2024-03-30 05:47:26 +01:00
# Please be aware that enabling HTTP compression may weaken TLS.
2024-01-18 07:08:25 +01:00
# Most users should not need to enable this.
# See https://breachattack.com/ and https://wikipedia.org/wiki/BREACH before deciding to enable this.
zstd_compression = false
2024-03-30 05:47:26 +01:00
# Set this to true for conduwuit to compress HTTP response bodies using gzip.
# This option does nothing if conduwuit was not built with `gzip_compression` feature.
# Please be aware that enabling HTTP compression may weaken TLS.
# Most users should not need to enable this.
# See https://breachattack.com/ and https://wikipedia.org/wiki/BREACH before deciding to enable this.
gzip_compression = false
# Set this to true for conduwuit to compress HTTP response bodies using brotli.
# This option does nothing if conduwuit was not built with `brotli_compression` feature.
# Please be aware that enabling HTTP compression may weaken TLS.
# Most users should not need to enable this.
# See https://breachattack.com/ and https://wikipedia.org/wiki/BREACH before deciding to enable this.
brotli_compression = false
2024-01-22 04:59:06 +01:00
# Vector list of IPv4 and IPv6 CIDR ranges / subnets *in quotes* that you do not want conduwuit to send outbound requests to.
# Defaults to RFC1918, unroutable, loopback, multicast, and testnet addresses for security.
#
# To disable, set this to be an empty vector (`[]`).
2024-03-03 05:52:59 +01:00
# Please be aware that this is *not* a guarantee. You should be using a firewall with zones as doing this on the application layer may have bypasses.
2024-01-22 04:59:06 +01:00
#
# Currently this does not account for proxies in use like Synapse does.
ip_range_denylist = [
"127.0.0.0/8" ,
"10.0.0.0/8" ,
"172.16.0.0/12" ,
"192.168.0.0/16" ,
"100.64.0.0/10" ,
"192.0.0.0/24" ,
"169.254.0.0/16" ,
"192.88.99.0/24" ,
"198.18.0.0/15" ,
"192.0.2.0/24" ,
"198.51.100.0/24" ,
"203.0.113.0/24" ,
"224.0.0.0/4" ,
"::1/128" ,
"fe80::/10" ,
"fc00::/7" ,
"2001:db8::/32" ,
"ff00::/8" ,
"fec0::/10" ,
]
2024-01-18 07:08:25 +01:00
2024-02-10 05:16:06 +01:00
2024-01-18 07:08:25 +01:00
### Moderation / Privacy / Security
# Set to true to allow user type "guest" registrations. Element attempts to register guest users automatically.
2024-04-14 02:33:24 +02:00
# Defaults to false
2024-01-18 07:08:25 +01:00
allow_guest_registration = false
2024-04-14 02:19:10 +02:00
# Set to true to log guest registrations in the admin room.
# Defaults to false as it may be noisy or unnecessary.
log_guest_registrations = false
2024-04-14 02:33:24 +02:00
# Set to true to allow guest registrations/users to auto join any rooms specified in `auto_join_rooms`
# Defaults to false
allow_guests_auto_join_rooms = false
2024-01-25 04:29:30 +01:00
# Vector list of servers that conduwuit will refuse to download remote media from.
# No default.
# prevent_media_downloads_from = ["example.com", "example.local"]
2024-01-18 07:08:25 +01:00
2024-03-03 04:17:34 +01:00
# Enables registration. If set to false, no users can register on this
2024-01-25 04:29:30 +01:00
# server.
# If set to true without a token configured, users can register with no form of 2nd-
# step only if you set
2024-01-18 07:08:25 +01:00
# `yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse` to
2024-01-25 04:29:30 +01:00
# true in your config. If you would like
# registration only via token reg, please configure the `registration_token` key.
2024-01-18 07:08:25 +01:00
allow_registration = false
# Please note that an open registration homeserver with no second-step verification
# is highly prone to abuse and potential defederation by homeservers, including
# matrix.org.
# A static registration token that new users will have to provide when creating
# an account. If unset and `allow_registration` is true, registration is open
# without any condition. YOU NEED TO EDIT THIS.
registration_token = "change this token for something specific to your server"
# controls whether federation is allowed or not
2024-01-27 22:28:57 +01:00
# defaults to true
# allow_federation = true
2024-01-18 07:08:25 +01:00
2024-01-25 04:29:30 +01:00
# controls whether users are allowed to create rooms.
# appservices and admins are always allowed to create rooms
# defaults to true
# allow_room_creation = true
2024-03-03 03:45:08 +01:00
# controls whether non-admin local users are forbidden from sending room invites (local and remote),
2024-03-03 03:54:16 +01:00
# and if non-admin users can receive remote room invites. admins are always allowed to send and receive all room invites.
2024-03-03 03:45:08 +01:00
# defaults to false
2024-03-16 23:34:54 +01:00
# block_non_admin_invites = false
2024-06-14 00:22:21 +02:00
# Allows admins to enter commands in rooms other than #admins by prefixing with \!admin. The reply
# will be publicly visible to the room, originating from the sender.
# defaults to true
#admin_escape_commands = true
2024-03-16 23:34:54 +01:00
# List of forbidden username patterns/strings. Values in this list are matched as *contains*.
# This is checked upon username availability check, registration, and startup as warnings if any local users in your database
# have a forbidden username.
# No default.
# forbidden_usernames = []
# List of forbidden room aliases and room IDs as patterns/strings. Values in this list are matched as *contains*.
# This is checked upon room alias creation, custom room ID creation if used, and startup as warnings if any room aliases
# in your database have a forbidden room alias/ID.
# No default.
2024-03-19 02:17:05 +01:00
# forbidden_alias_names = []
2024-03-03 03:45:08 +01:00
2024-04-16 04:02:08 +02:00
# List of forbidden server names that we will block all client room joins, incoming federated room directory requests, incoming federated invites for, and incoming federated joins. This check is applied on the room ID, room alias, sender server name, and sender user's server name.
# Basically "global" ACLs. For our user (client) checks, admin users are allowed.
# No default.
# forbidden_remote_server_names = []
# List of forbidden server names that we will block all outgoing federated room directory requests for. Useful for preventing our users from wandering into bad servers or spaces.
# No default.
# forbidden_remote_room_directory_server_names = []
2024-01-18 07:08:25 +01:00
# Set this to true to allow your server's public room directory to be federated.
# Set this to false to protect against /publicRooms spiders, but will forbid external users
# from viewing your server's public room directory. If federation is disabled entirely
# (`allow_federation`), this is inherently false.
allow_public_room_directory_over_federation = false
# Set this to true to allow your server's public room directory to be queried without client
# authentication (access token) through the Client APIs. Set this to false to protect against /publicRooms spiders.
allow_public_room_directory_without_auth = false
2024-03-31 04:58:20 +02:00
# Set this to true to lock down your server's public room directory and only allow admins to publish rooms to the room directory.
# Unpublishing is still allowed by all users with this enabled.
#
# Defaults to false
lockdown_public_room_directory = false
2024-01-18 07:08:25 +01:00
# Set this to true to allow federating device display names / allow external users to see your device display name.
# If federation is disabled entirely (`allow_federation`), this is inherently false. For privacy, this is best disabled.
allow_device_name_federation = false
2024-02-10 05:16:06 +01:00
# Vector list of domains allowed to send requests to for URL previews. Defaults to none.
# Note: this is a *contains* match, not an explicit match. Putting "google.com" will match "https://google.com" and "http://mymaliciousdomainexamplegoogle.com"
# Setting this to "*" will allow all URL previews. Please note that this opens up significant attack surface to your server, you are expected to be aware of the risks by doing so.
url_preview_domain_contains_allowlist = [ ]
# Vector list of explicit domains allowed to send requests to for URL previews. Defaults to none.
2024-04-15 03:12:48 +02:00
# Note: This is an *explicit* match, not a contains match. Putting "google.com" will match "https://google.com", "http://google.com", but not "https://mymaliciousdomainexamplegoogle.com"
2024-02-10 05:16:06 +01:00
# Setting this to "*" will allow all URL previews. Please note that this opens up significant attack surface to your server, you are expected to be aware of the risks by doing so.
url_preview_domain_explicit_allowlist = [ ]
# Vector list of URLs allowed to send requests to for URL previews. Defaults to none.
2024-02-10 18:28:49 +01:00
# Note that this is a *contains* match, not an explicit match. Putting "google.com" will match "https://google.com/", "https://google.com/url?q=https://mymaliciousdomainexample.com", and "https://mymaliciousdomainexample.com/hi/google.com"
2024-02-10 05:16:06 +01:00
# Setting this to "*" will allow all URL previews. Please note that this opens up significant attack surface to your server, you are expected to be aware of the risks by doing so.
url_preview_url_contains_allowlist = [ ]
2024-04-15 03:12:48 +02:00
# Vector list of explicit domains not allowed to send requests to for URL previews. Defaults to none.
# Note: This is an *explicit* match, not a contains match. Putting "google.com" will match "https://google.com", "http://google.com", but not "https://mymaliciousdomainexamplegoogle.com"
# The denylist is checked first before allowlist. Setting this to "*" will not do anything.
url_preview_domain_explicit_denylist = [ ]
2024-03-30 20:29:56 +01:00
# Maximum amount of bytes allowed in a URL preview body size when spidering. Defaults to 384KB (384_000 bytes)
url_preview_max_spider_size = 384_000
2024-02-10 19:29:12 +01:00
2024-02-11 17:42:55 +01:00
# Option to decide whether you would like to run the domain allowlist checks (contains and explicit) on the root domain or not. Does not apply to URL contains allowlist. Defaults to false.
# Example: If this is enabled and you have "wikipedia.org" allowed in the explicit and/or contains domain allowlist, it will allow all subdomains under "wikipedia.org" such as "en.m.wikipedia.org" as the root domain is checked and matched.
# Useful if the domain contains allowlist is still too broad for you but you still want to allow all the subdomains under a root domain.
url_preview_check_root_domain = false
2024-04-08 04:38:33 +02:00
# Config option to allow or disallow incoming federation requests that obtain the profiles
# of our local users from `/_matrix/federation/v1/query/profile`
#
# This is inherently false if `allow_federation` is disabled
#
# Defaults to true
allow_profile_lookup_federation_requests = true
2024-05-08 04:39:55 +02:00
# Config option to automatically deactivate the account of any user who attempts to join a:
# - banned room
# - forbidden room alias
# - room alias or ID with a forbidden server name
#
# This may be useful if all your banned lists consist of toxic rooms or servers that no good faith user would ever attempt to join, and
# to automatically remediate the problem without any admin user intervention.
#
# This will also make the user leave all rooms. Federation (e.g. remote room invites) are ignored here.
#
# Defaults to false as rooms can be banned for non-moderation-related reasons
#auto_deactivate_banned_room_attempts = false
2024-01-18 07:08:25 +01:00
### Misc
# max log level for conduwuit. allows debug, info, warn, or error
2024-03-12 01:15:40 +01:00
# see also: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives
2024-04-15 01:12:39 +02:00
# **Caveat**:
# For release builds, the tracing crate is configured to only implement levels higher than error to avoid unnecessary overhead in the compiled binary from trace macros.
# For debug builds, this restriction is not applied.
#
2024-04-16 12:39:31 +02:00
# Defaults to "info"
#log = "info"
2024-01-18 07:08:25 +01:00
# controls whether encrypted rooms and events are allowed (default true)
#allow_encryption = false
2024-03-12 00:24:27 +01:00
# if enabled, conduwuit will send a simple GET request periodically to `https://pupbrain.dev/check-for-updates/stable`
2024-01-18 07:08:25 +01:00
# for any new announcements made. Despite the name, this is not an update check
2024-03-12 00:24:27 +01:00
# endpoint, it is simply an announcement check endpoint.
# Defaults to false.
#allow_check_for_updates = false
2024-01-18 07:08:25 +01:00
# Set to false to disable users from joining or creating room versions that aren't 100% officially supported by conduwuit.
2024-03-03 05:52:59 +01:00
# conduwuit officially supports room versions 6 - 10. conduwuit has experimental/unstable support for 3 - 5, and 11.
2024-01-18 07:08:25 +01:00
# Defaults to true.
#allow_unstable_room_versions = true
2024-02-21 05:08:53 +01:00
# Option to control adding arbitrary text to the end of the user's displayname upon registration with a space before the text.
# This was the lightning bolt emoji option, just replaced with support for adding your own custom text or emojis.
# To disable, set this to "" (an empty string)
# Defaults to "🏳️⚧️" (trans pride flag)
#new_user_displayname_suffix = "🏳️⚧️"
2024-03-06 01:19:06 +01:00
# Option to control whether conduwuit will query your list of trusted notary key servers (`trusted_servers`) for
# remote homeserver signing keys it doesn't know *first*, or query the individual servers first before falling back to the trusted
# key servers.
#
# The former/default behaviour makes federated/remote rooms joins generally faster because we're querying a single (or list of) server
# that we know works, is reasonably fast, and is reliable for just about all the homeserver signing keys in the room. Querying individual
# servers may take longer depending on the general infrastructure of everyone in there, how many dead servers there are, etc.
#
# However, this does create an increased reliance on one single or multiple large entities as `trusted_servers` should generally
# contain long-term and large servers who know a very large number of homeservers.
#
# If you don't know what any of this means, leave this and `trusted_servers` alone to their defaults.
#
# Defaults to true as this is the fastest option for federation.
#query_trusted_key_servers_first = true
2024-03-20 16:19:41 +01:00
# List/vector of room **IDs** that conduwuit will make newly registered users join.
2024-03-21 02:16:03 +01:00
# The room IDs specified must be rooms that you have joined at least once on the server, and must be public.
2024-03-20 16:19:41 +01:00
#
# No default.
#auto_join_rooms = []
2024-04-01 04:01:20 +02:00
# Retry failed and incomplete messages to remote servers immediately upon startup. This is called bursting.
# If this is disabled, said messages may not be delivered until more messages are queued for that server.
# Do not change this option unless server resources are extremely limited or the scale of the server's
# deployment is huge. Do not disable this unless you know what you are doing.
#startup_netburst = true
# Limit the startup netburst to the most recent (default: 50) messages queued for each remote server. All older
# messages are dropped and not reattempted. The `startup_netburst` option must be enabled for this value to have
# any effect. Do not change this value unless you know what you are doing. Set this value to -1 to reattempt
# every message without trimming the queues; this may consume significant disk. Set this value to 0 to drop all
# messages without any attempt at redelivery.
#startup_netburst_keep = 50
2024-03-07 00:01:39 +01:00
2024-04-27 07:35:01 +02:00
# If the 'perf_measurements' feature is enabled, enables collecting folded stack trace profile of tracing spans using
# tracing_flame. The resulting profile can be visualized with inferno[1], speedscope[2], or a number of other tools.
# [1]: https://github.com/jonhoo/inferno
# [2]: www.speedscope.app
# tracing_flame = false
# If 'tracing_flame' is enabled, sets a filter for which events will be included in the profile.
# Supported syntax is documented at https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives
# tracing_flame_filter = "trace,h2=off"
# If 'tracing_flame' is enabled, set the path to write the generated profile.
# tracing_flame_output_path = "./tracing.folded"
2024-03-07 00:01:39 +01:00
### Generic database options
2024-01-18 07:08:25 +01:00
# Set this to any float value to multiply conduwuit's in-memory LRU caches with.
# May be useful if you have significant memory to spare to increase performance.
# Defaults to 1.0.
#conduit_cache_capacity_modifier = 1.0
# Set this to any float value in megabytes for conduwuit to tell the database engine that this much memory is available for database-related caches.
# May be useful if you have significant memory to spare to increase performance.
2024-03-20 00:27:09 +01:00
# Defaults to 256.0
#db_cache_capacity_mb = 256.0
2024-01-18 07:08:25 +01:00
### RocksDB options
# Set this to true to use RocksDB config options that are tailored to HDDs (slower device storage)
2024-03-06 05:44:03 +01:00
#
# It is worth noting that by default, conduwuit will use RocksDB with Direct IO enabled. *Generally* speaking this improves performance as it bypasses buffered I/O (system page cache).
# However there is a potential chance that Direct IO may cause issues with database operations if your setup is uncommon. This has been observed with FUSE filesystems, and possibly ZFS filesystem.
# RocksDB generally deals/corrects these issues but it cannot account for all setups.
# If you experience any weird RocksDB issues, try enabling this option as it turns off Direct IO and feel free to report in the conduwuit Matrix room if this option fixes your DB issues.
# See https://github.com/facebook/rocksdb/wiki/Direct-IO for more information.
#
2024-03-03 05:52:59 +01:00
# Defaults to false
2024-01-18 07:08:25 +01:00
#rocksdb_optimize_for_spinning_disks = false
2024-04-28 22:09:26 +02:00
# Enables direct-io to increase database performance. This is enabled by default. Set this option to false if the
# database resides on a filesystem which does not support direct-io.
#rocksdb_direct_io = true
2024-03-14 03:22:07 +01:00
# RocksDB log level. This is not the same as conduwuit's log level. This is the log level for the RocksDB engine/library
# which show up in your database folder/path as `LOG` files. Defaults to error. conduwuit will typically log RocksDB errors as normal.
2024-03-07 00:01:39 +01:00
#rocksdb_log_level = "error"
2024-01-18 07:08:25 +01:00
# Max RocksDB `LOG` file size before rotating in bytes. Defaults to 4MB.
#rocksdb_max_log_file_size = 4194304
# Time in seconds before RocksDB will forcibly rotate logs. Defaults to 0.
#rocksdb_log_time_to_roll = 0
2024-04-26 06:07:38 +02:00
# Amount of threads that RocksDB will use for parallelism on database operatons such as cleanup, sync, flush, compaction, etc. Set to 0 to use all your logical threads.
2024-03-05 03:29:17 +01:00
#
2024-04-26 06:07:38 +02:00
# Defaults to your CPU logical thread count.
2024-03-05 02:42:09 +01:00
#rocksdb_parallelism_threads = 0
2024-04-25 08:29:09 +02:00
# Enables idle IO priority for compaction thread. This prevents any unexpected lag in the server's operation and
# is usually a good idea. Enabled by default.
#rocksdb_compaction_ioprio_idle = true
# Enables idle CPU priority for compaction thread. This is not enabled by default to prevent compaction from
# falling too far behind on busy systems.
#rocksdb_compaction_prio_idle = false
2024-03-14 06:39:24 +01:00
# Maximum number of LOG files RocksDB will keep. This must *not* be set to 0. It must be at least 1.
# Defaults to 3 as these are not very useful.
2024-03-07 00:20:02 +01:00
#rocksdb_max_log_files = 3
2024-03-13 17:31:13 +01:00
# Type of RocksDB database compression to use.
2024-04-26 23:23:41 +02:00
# Available options are "zstd", "zlib", "bz2", "lz4", or "none"
2024-03-14 03:22:07 +01:00
# It is best to use ZSTD as an overall good balance between speed/performance, storage, IO amplification, and CPU usage.
# For more performance but less compression (more storage used) and less CPU usage, use LZ4.
# See https://github.com/facebook/rocksdb/wiki/Compression for more details.
#
2024-04-26 23:23:41 +02:00
# "none" will disable compression.
#
2024-03-13 17:31:13 +01:00
# Defaults to "zstd"
#rocksdb_compression_algo = "zstd"
2024-03-14 03:22:07 +01:00
# Level of compression the specified compression algorithm for RocksDB to use.
# Default is 32767, which is internally read by RocksDB as the default magic number and
# translated to the library's default compression level as they all differ.
# See their `kDefaultCompressionLevel`.
#
#rocksdb_compression_level = 32767
2024-03-14 03:38:30 +01:00
# Level of compression the specified compression algorithm for the bottommost level/data for RocksDB to use.
# Default is 32767, which is internally read by RocksDB as the default magic number and
# translated to the library's default compression level as they all differ.
# See their `kDefaultCompressionLevel`.
#
# Since this is the bottommost level (generally old and least used data), it may be desirable to have a very
# high compression level here as it's lesss likely for this data to be used. Research your chosen compression algorithm.
#
#rocksdb_bottommost_compression_level = 32767
2024-03-14 03:22:07 +01:00
# Whether to enable RocksDB "bottommost_compression".
# At the expense of more CPU usage, this will further compress the database to reduce more storage.
# It is recommended to use ZSTD compression with this for best compression results.
# See https://github.com/facebook/rocksdb/wiki/Compression for more details.
#
# Defaults to false as this uses more CPU when compressing.
#rocksdb_bottommost_compression = false
2024-03-25 02:08:42 +01:00
# Database recovery mode (for RocksDB WAL corruption)
2024-03-23 05:27:33 +01:00
#
2024-03-25 02:08:42 +01:00
# Use this option when the server reports corruption and refuses to start. Set mode 2 (PointInTime)
# to cleanly recover from this corruption. The server will continue from the last good state,
# several seconds or minutes prior to the crash. Clients may have to run "clear-cache & reload" to
# account for the rollback. Upon success, you may reset the mode back to default and restart again.
# Please note in some cases the corruption error may not be cleared for at least 30 minutes of
# operation in PointInTime mode.
2024-03-23 05:27:33 +01:00
#
2024-03-25 02:08:42 +01:00
# As a very last ditch effort, if PointInTime does not fix or resolve anything, you can try mode
# 3 (SkipAnyCorruptedRecord) but this will leave the server in a potentially inconsistent state.
2024-03-23 05:27:33 +01:00
#
2024-03-25 02:08:42 +01:00
# The default mode 1 (TolerateCorruptedTailRecords) will automatically drop the last entry in the
# database if corrupted during shutdown, but nothing more. It is extraordinarily unlikely this will
# desynchronize clients. To disable any form of silent rollback set mode 0 (AbsoluteConsistency).
2024-03-23 05:27:33 +01:00
#
# The options are:
# 0 = AbsoluteConsistency
# 1 = TolerateCorruptedTailRecords (default)
# 2 = PointInTime (use me if trying to recover)
# 3 = SkipAnyCorruptedRecord (you now voided your Conduwuit warranty)
#
# See https://github.com/facebook/rocksdb/wiki/WAL-Recovery-Modes for more information
#
# Defaults to 1 (TolerateCorruptedTailRecords)
#rocksdb_recovery_mode = 1
2024-01-18 07:08:25 +01:00
2024-03-25 07:59:28 +01:00
### Domain Name Resolution and Caching
# Maximum entries stored in DNS memory-cache. The size of an entry may vary so please take care if
# raising this value excessively. Only decrease this when using an external DNS cache. Please note
# that systemd does *not* count as an external cache, even when configured to do so.
2024-04-27 02:58:16 +02:00
#dns_cache_entries = 32768
2024-03-25 07:59:28 +01:00
# Minimum time-to-live in seconds for entries in the DNS cache. The default may appear high to most
# administrators; this is by design. Only decrease this if you are using an external DNS cache.
2024-04-18 01:49:19 +02:00
#dns_min_ttl = 10800
2024-03-25 07:59:28 +01:00
# Minimum time-to-live in seconds for NXDOMAIN entries in the DNS cache. This value is critical for
# the server to federate efficiently. NXDOMAIN's are assumed to not be returning to the federation
# and aggressively cached rather than constantly rechecked.
2024-04-27 00:06:35 +02:00
#
# Defaults to 3 days as these are *very rarely* false negatives.
#dns_min_ttl_nxdomain = 259200
2024-03-25 07:59:28 +01:00
# The number of seconds to wait for a reply to a DNS query. Please note that recursive queries can
# take up to several seconds for some domains, so this value should not be too low.
2024-04-18 01:49:19 +02:00
#dns_timeout = 10
2024-03-25 07:59:28 +01:00
# Number of retries after a timeout.
2024-04-18 01:49:19 +02:00
#dns_attempts = 10
2024-03-25 07:59:28 +01:00
2024-04-16 14:41:55 +02:00
# Fallback to TCP on DNS errors. Set this to false if unsupported by nameserver.
#dns_tcp_fallback = true
2024-03-27 02:32:10 +01:00
# Enable to query all nameservers until the domain is found. Referred to as "trust_negative_responses" in hickory_resolver.
# This can avoid useless DNS queries if the first nameserver responds with NXDOMAIN or an empty NOERROR response.
#
# The default is to query one nameserver and stop (false).
2024-04-18 01:49:19 +02:00
#query_all_nameservers = true
2024-03-27 02:32:10 +01:00
2024-04-29 20:47:31 +02:00
# Enables using *only* TCP for querying your specified nameservers instead of UDP.
#
# You very likely do *not* want this. hickory-resolver already falls back to TCP on UDP errors.
# Defaults to false
#query_over_tcp_only = false
2024-04-29 20:25:11 +02:00
# DNS A/AAAA record lookup strategy
#
# Takes a number of one of the following options:
# 1 - Ipv4Only (Only query for A records, no AAAA/IPv6)
# 2 - Ipv6Only (Only query for AAAA records, no A/IPv4)
# 3 - Ipv4AndIpv6 (Query for A and AAAA records in parallel, uses whatever returns a successful response first)
# 4 - Ipv6thenIpv4 (Query for AAAA record, if that fails then query the A record)
# 5 - Ipv4thenIpv6 (Query for A record, if that fails then query the AAAA record)
#
# If you don't have IPv6 networking, then for better performance it may be suitable to set this to Ipv4Only (1) as
# you will never ever use the AAAA record contents even if the AAAA record is successful instead of the A record.
#
# Defaults to 5 - Ipv4ThenIpv6 as this is the most compatible and IPv4 networking is currently the most prevalent.
#ip_lookup_strategy = 5
2024-03-25 07:59:28 +01:00
2024-03-22 04:16:33 +01:00
### Request Timeouts, Connection Timeouts, and Connection Pooling
## Request Timeouts are HTTP response timeouts
## Connection Timeouts are TCP connection timeouts
##
## Connection Pooling Timeouts are timeouts for keeping an open idle connection alive.
## Connection pooling and keepalive is very useful for federation or other places where for performance reasons,
## we want to keep connections open that we will re-use frequently due to TCP and TLS 1.3 overhead/expensiveness.
##
## Generally these defaults are the best, but if you find a reason to need to change these they are here.
2024-04-20 23:10:57 +02:00
# Default/base connection timeout.
2024-03-22 04:16:33 +01:00
# This is used only by URL previews and update/news endpoint checks
#
# Defaults to 10 seconds
#request_conn_timeout = 10
2024-04-20 23:10:57 +02:00
# Default/base request timeout. The time waiting to receive more data from another server.
# This is used only by URL previews, update/news, and misc endpoint checks
2024-03-22 04:16:33 +01:00
#
# Defaults to 35 seconds
#request_timeout = 35
2024-04-20 23:10:57 +02:00
# Default/base request total timeout. The time limit for a whole request. This is set very high to not
# cancel healthy requests while serving as a backstop.
2024-03-22 04:16:33 +01:00
# This is used only by URL previews and update/news endpoint checks
#
2024-04-20 23:10:57 +02:00
# Defaults to 320 seconds
#request_total_timeout = 320
2024-03-22 04:16:33 +01:00
# Default/base idle connection pool timeout
# This is used only by URL previews and update/news endpoint checks
#
# Defaults to 5 seconds
#request_idle_timeout = 5
2024-04-20 23:10:57 +02:00
# Default/base max idle connections per host
# This is used only by URL previews and update/news endpoint checks
#
# Defaults to 1 as generally the same open connection can be re-used
#request_idle_per_host = 1
2024-03-22 04:16:33 +01:00
# Federation well-known resolution connection timeout
#
# Defaults to 6 seconds
#well_known_conn_timeout = 6
# Federation HTTP well-known resolution request timeout
#
# Defaults to 10 seconds
#well_known_timeout = 10
2024-04-20 23:10:57 +02:00
# Federation client request timeout
2024-03-22 04:16:33 +01:00
# You most definitely want this to be high to account for extremely large room joins, slow homeservers, your own resources etc.
#
# Defaults to 300 seconds
2024-03-23 05:27:33 +01:00
#federation_timeout = 300
2024-03-22 04:16:33 +01:00
2024-04-20 23:10:57 +02:00
# Federation client idle connection pool timeout
#
# Defaults to 25 seconds
#federation_idle_timeout = 25
# Federation client max idle connections per host
2024-03-22 04:16:33 +01:00
#
# Defaults to 1 as generally the same open connection can be re-used
#federation_idle_per_host = 1
2024-04-20 23:10:57 +02:00
# Federation sender request timeout
# The time it takes for the remote server to process sent transactions can take a while.
2024-03-22 04:16:33 +01:00
#
2024-04-20 23:10:57 +02:00
# Defaults to 180 seconds
#sender_timeout = 180
# Federation sender idle connection pool timeout
#
# Defaults to 180 seconds
#sender_idle_timeout = 180
2024-03-22 04:16:33 +01:00
2024-04-22 19:55:48 +02:00
# Federation sender transaction retry backoff limit
#
# Defaults to 86400 seconds
#sender_retry_backoff_limit = 86400
2024-03-22 04:16:33 +01:00
# Appservice URL request connection timeout
#
2024-05-02 23:00:54 +02:00
# Defaults to 35 seconds as generally appservices are hosted within the same network
#appservice_timeout = 35
2024-03-22 04:16:33 +01:00
# Appservice URL idle connection pool timeout
#
# Defaults to 300 seconds
#appservice_idle_timeout = 300
# Notification gateway pusher idle connection pool timeout
#
# Defaults to 15 seconds
#pusher_idle_timeout = 15
2024-03-17 17:16:04 +01:00
### Presence / Typing Indicators / Read Receipts
2024-01-18 07:08:25 +01:00
2024-04-05 06:36:49 +02:00
# Config option to control local (your server only) presence updates/requests. Defaults to true.
2024-01-18 07:08:25 +01:00
# Note that presence on conduwuit is very fast unlike Synapse's.
2024-02-10 17:43:58 +01:00
# If using outgoing presence, this MUST be enabled.
2024-04-05 06:36:49 +02:00
#
#allow_local_presence = true
2024-01-18 07:08:25 +01:00
2024-03-30 05:49:14 +01:00
# Config option to control incoming federated presence updates/requests. Defaults to true.
2024-01-18 07:08:25 +01:00
# This option receives presence updates from other servers, but does not send any unless `allow_outgoing_presence` is true.
# Note that presence on conduwuit is very fast unlike Synapse's.
2024-04-05 06:36:49 +02:00
#
2024-03-30 05:49:14 +01:00
#allow_incoming_presence = true
2024-01-18 07:08:25 +01:00
2024-04-05 06:36:49 +02:00
# Config option to control outgoing presence updates/requests. Defaults to true.
2024-01-18 07:08:25 +01:00
# This option sends presence updates to other servers, but does not receive any unless `allow_incoming_presence` is true.
# Note that presence on conduwuit is very fast unlike Synapse's.
2024-02-10 17:43:58 +01:00
# If using outgoing presence, you MUST enable `allow_local_presence` as well.
2024-01-21 19:28:51 +01:00
#
2024-04-05 06:36:49 +02:00
#allow_outgoing_presence = true
2024-01-18 07:08:25 +01:00
2024-04-26 03:22:48 +02:00
# Config option to enable the presence idle timer for remote users. Disabling is offered as an optimization for
# servers participating in many large rooms or when resources are limited. Disabling it may cause incorrect
# presence states (i.e. stuck online) to be seen for some remote users. Defaults to true.
#presence_timeout_remote_users = true
2024-01-18 07:08:25 +01:00
# Config option to control how many seconds before presence updates that you are idle. Defaults to 5 minutes.
#presence_idle_timeout_s = 300
# Config option to control how many seconds before presence updates that you are offline. Defaults to 30 minutes.
2024-02-24 22:38:00 +01:00
#presence_offline_timeout_s = 1800
2024-03-17 17:16:04 +01:00
# Config option to control whether we should receive remote incoming read receipts.
# Defaults to true.
#allow_incoming_read_receipts = true
2024-02-24 22:38:00 +01:00
2024-04-11 00:22:50 +02:00
# Config option to control whether we should send read receipts to remote servers.
# Defaults to true.
#allow_outgoing_read_receipts = true
2024-03-30 02:35:02 +01:00
# Config option to control outgoing typing updates to federation. Defaults to true.
#allow_outgoing_typing = true
# Config option to control incoming typing updates from federation. Defaults to true.
#allow_incoming_typing = true
# Config option to control maximum time federation user can indicate typing.
#typing_federation_timeout_s = 30
# Config option to control minimum time local client can indicate typing. This does not override
# a client's request to stop typing. It only enforces a minimum value in case of no stop request.
#typing_client_timeout_min_s = 15
# Config option to control maximum time local client can indicate typing.
#typing_client_timeout_max_s = 45
2024-02-24 22:38:00 +01:00
2024-06-07 06:05:37 +02:00
### TURN / VoIP
# vector list of TURN URIs/servers to use
#
# No default
#turn_uris = ["turn:example.turn.uri?transport=udp", "turn:example.turn.uri?transport=tcp"]
# TURN secret to use for generating the HMAC-SHA1 hash apart of username and password generation
#
# this is more secure, but if needed you can use traditional username/password below.
#
# no default
#turn_secret = ""
# TURN username to provide the client
#
# no default
#turn_username = ""
# TURN password to provide the client
#
# no default
#turn_password = ""
# TURN TTL
#
# Default is 86400 seconds
#turn_ttl = 86400
# allow guests/unauthenticated users to access TURN credentials
#
# this is the equivalent of Synapse's `turn_allow_guests` config option. this allows
# any unauthenticated user to call `/_matrix/client/v3/voip/turnServer`.
#
# defaults to false
#turn_allow_guests = false
2024-02-24 22:38:00 +01:00
# Other options not in [global]:
#
#
# Enables running conduwuit with direct TLS support
# It is strongly recommended you use a reverse proxy instead. This is primarily relevant for test suites like complement that require a private CA setup.
# [global.tls]
# certs = "/path/to/my/certificate.crt"
2024-02-24 23:25:43 +01:00
# key = "/path/to/my/private_key.key"
#
# Whether to listen and allow for HTTP and HTTPS connections (insecure!)
# This config option is only available if conduwuit was built with `axum_dual_protocol` feature (not default feature)
# Defaults to false
2024-03-16 23:34:54 +01:00
#dual_protocol = false
2024-04-12 02:17:30 +02:00
# If you are using delegation via well-known files and you cannot serve them from your reverse proxy, you can
# uncomment these to serve them directly from conduwuit. This requires proxying all requests to conduwuit, not just `/_matrix` to work.
#
#[global.well_known]
#server = "matrix.example.com:443"
#client = "https://matrix.example.com"
#
# A single contact and/or support page for /.well-known/matrix/support
# All options here are strings. Currently only supports 1 single contact.
# No default.
#
2024-04-12 04:07:53 +02:00
#support_page = ""
#support_role = ""
#support_email = ""
#support_mxid = ""