dendrite.yaml.new (14768B)
1 # This is the Dendrite configuration file. 2 # 3 # The configuration is split up into sections - each Dendrite component has a 4 # configuration section, in addition to the "global" section which applies to 5 # all components. 6 7 # The version of the configuration file. 8 version: 2 9 10 # Global Matrix configuration. This configuration applies to all components. 11 global: 12 # The domain name of this homeserver. 13 server_name: localhost 14 15 # The path to the signing private key file, used to sign requests and events. 16 # Note that this is NOT the same private key as used for TLS! To generate a 17 # signing key, use "./bin/generate-keys --private-key matrix_key.pem". 18 private_key: matrix_key.pem 19 20 # The paths and expiry timestamps (as a UNIX timestamp in millisecond precision) 21 # to old signing keys that were formerly in use on this domain name. These 22 # keys will not be used for federation request or event signing, but will be 23 # provided to any other homeserver that asks when trying to verify old events. 24 old_private_keys: 25 # If the old private key file is available: 26 # - private_key: old_matrix_key.pem 27 # expired_at: 1601024554498 28 # If only the public key (in base64 format) and key ID are known: 29 # - public_key: mn59Kxfdq9VziYHSBzI7+EDPDcBS2Xl7jeUdiiQcOnM= 30 # key_id: ed25519:mykeyid 31 # expired_at: 1601024554498 32 33 # How long a remote server can cache our server signing key before requesting it 34 # again. Increasing this number will reduce the number of requests made by other 35 # servers for our key but increases the period that a compromised key will be 36 # considered valid by other homeservers. 37 key_validity_period: 168h0m0s 38 39 # Global database connection pool, for PostgreSQL monolith deployments only. If 40 # this section is populated then you can omit the "database" blocks in all other 41 # sections. For monolith deployments using SQLite databases, 42 # you must configure the "database" block for each component instead. 43 database: 44 connection_string: postgresql://username:password@hostname/dendrite?sslmode=disable 45 max_open_conns: 90 46 max_idle_conns: 5 47 conn_max_lifetime: -1 48 49 # Configuration for in-memory caches. Caches can often improve performance by 50 # keeping frequently accessed items (like events, identifiers etc.) in memory 51 # rather than having to read them from the database. 52 cache: 53 # The estimated maximum size for the global cache in bytes, or in terabytes, 54 # gigabytes, megabytes or kilobytes when the appropriate 'tb', 'gb', 'mb' or 55 # 'kb' suffix is specified. Note that this is not a hard limit, nor is it a 56 # memory limit for the entire process. A cache that is too small may ultimately 57 # provide little or no benefit. 58 max_size_estimated: 1gb 59 60 # The maximum amount of time that a cache entry can live for in memory before 61 # it will be evicted and/or refreshed from the database. Lower values result in 62 # easier admission of new cache entries but may also increase database load in 63 # comparison to higher values, so adjust conservatively. Higher values may make 64 # it harder for new items to make it into the cache, e.g. if new rooms suddenly 65 # become popular. 66 max_age: 1h 67 68 # The server name to delegate server-server communications to, with optional port 69 # e.g. localhost:443 70 well_known_server_name: "" 71 72 # The base URL to delegate client-server communications to e.g. https://localhost 73 well_known_client_name: "" 74 75 # The server name to delegate sliding sync communications to, with optional port. 76 # Requires `well_known_client_name` to also be configured. 77 well_known_sliding_sync_proxy: "" 78 79 # Lists of domains that the server will trust as identity servers to verify third 80 # party identifiers such as phone numbers and email addresses. 81 trusted_third_party_id_servers: 82 - matrix.org 83 - vector.im 84 85 # Disables federation. Dendrite will not be able to communicate with other servers 86 # in the Matrix federation and the federation API will not be exposed. 87 disable_federation: false 88 89 # Configures the handling of presence events. Inbound controls whether we receive 90 # presence events from other servers, outbound controls whether we send presence 91 # events for our local users to other servers. 92 presence: 93 enable_inbound: false 94 enable_outbound: false 95 96 # Configures phone-home statistics reporting. These statistics contain the server 97 # name, number of active users and some information on your deployment config. 98 # We use this information to understand how Dendrite is being used in the wild. 99 report_stats: 100 enabled: false 101 endpoint: https://panopticon.matrix.org/push 102 103 # Server notices allows server admins to send messages to all users on the server. 104 server_notices: 105 enabled: false 106 # The local part, display name and avatar URL (as a mxc:// URL) for the user that 107 # will send the server notices. These are visible to all users on the deployment. 108 local_part: "_server" 109 display_name: "Server Alerts" 110 avatar_url: "" 111 # The room name to be used when sending server notices. This room name will 112 # appear in user clients. 113 room_name: "Server Alerts" 114 115 # Configuration for NATS JetStream 116 jetstream: 117 # A list of NATS Server addresses to connect to. If none are specified, an 118 # internal NATS server will be started automatically when running Dendrite in 119 # monolith mode. 120 addresses: 121 # - localhost:4222 122 123 # Disable the validation of TLS certificates of NATS. This is 124 # not recommended in production since it may allow NATS traffic 125 # to be sent to an insecure endpoint. 126 disable_tls_validation: false 127 128 # Persistent directory to store JetStream streams in. This directory should be 129 # preserved across Dendrite restarts. 130 storage_path: ./ 131 132 # The prefix to use for stream names for this homeserver - really only useful 133 # if you are running more than one Dendrite server on the same NATS deployment. 134 topic_prefix: Dendrite 135 136 # Configuration for Prometheus metric collection. 137 metrics: 138 enabled: false 139 basic_auth: 140 username: metrics 141 password: metrics 142 143 # Optional DNS cache. The DNS cache may reduce the load on DNS servers if there 144 # is no local caching resolver available for use. 145 dns_cache: 146 enabled: false 147 cache_size: 256 148 cache_lifetime: "5m" # 5 minutes; https://pkg.go.dev/time@master#ParseDuration 149 150 # Configuration for the Appservice API. 151 app_service_api: 152 # Disable the validation of TLS certificates of appservices. This is 153 # not recommended in production since it may allow appservice traffic 154 # to be sent to an insecure endpoint. 155 disable_tls_validation: false 156 157 # Appservice configuration files to load into this homeserver. 158 config_files: 159 # - /path/to/appservice_registration.yaml 160 161 # Configuration for the Client API. 162 client_api: 163 # Prevents new users from being able to register on this homeserver, except when 164 # using the registration shared secret below. 165 registration_disabled: true 166 167 # Prevents new guest accounts from being created. Guest registration is also 168 # disabled implicitly by setting 'registration_disabled' above. 169 guests_disabled: true 170 171 # If set, allows registration by anyone who knows the shared secret, regardless 172 # of whether registration is otherwise disabled. 173 registration_shared_secret: "" 174 175 # Whether to require reCAPTCHA for registration. If you have enabled registration 176 # then this is HIGHLY RECOMMENDED to reduce the risk of your homeserver being used 177 # for coordinated spam attacks. 178 enable_registration_captcha: false 179 180 # Settings for ReCAPTCHA. 181 recaptcha_public_key: "" 182 recaptcha_private_key: "" 183 recaptcha_bypass_secret: "" 184 185 # To use hcaptcha.com instead of ReCAPTCHA, set the following parameters, otherwise just keep them empty. 186 # recaptcha_siteverify_api: "https://hcaptcha.com/siteverify" 187 # recaptcha_api_js_url: "https://js.hcaptcha.com/1/api.js" 188 # recaptcha_form_field: "h-captcha-response" 189 # recaptcha_sitekey_class: "h-captcha" 190 191 192 # TURN server information that this homeserver should send to clients. 193 turn: 194 turn_user_lifetime: "5m" 195 turn_uris: 196 # - turn:turn.server.org?transport=udp 197 # - turn:turn.server.org?transport=tcp 198 turn_shared_secret: "" 199 # If your TURN server requires static credentials, then you will need to enter 200 # them here instead of supplying a shared secret. Note that these credentials 201 # will be visible to clients! 202 # turn_username: "" 203 # turn_password: "" 204 205 # Settings for rate-limited endpoints. Rate limiting kicks in after the threshold 206 # number of "slots" have been taken by requests from a specific host. Each "slot" 207 # will be released after the cooloff time in milliseconds. Server administrators 208 # and appservice users are exempt from rate limiting by default. 209 rate_limiting: 210 enabled: true 211 threshold: 20 212 cooloff_ms: 500 213 exempt_user_ids: 214 # - "@user:domain.com" 215 216 # Configuration for the Federation API. 217 federation_api: 218 # How many times we will try to resend a failed transaction to a specific server. The 219 # backoff is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds etc. Once 220 # the max retries are exceeded, Dendrite will no longer try to send transactions to 221 # that server until it comes back to life and connects to us again. 222 send_max_retries: 16 223 224 # Disable the validation of TLS certificates of remote federated homeservers. Do not 225 # enable this option in production as it presents a security risk! 226 disable_tls_validation: false 227 228 # Disable HTTP keepalives, which also prevents connection reuse. Dendrite will typically 229 # keep HTTP connections open to remote hosts for 5 minutes as they can be reused much 230 # more quickly than opening new connections each time. Disabling keepalives will close 231 # HTTP connections immediately after a successful request but may result in more CPU and 232 # memory being used on TLS handshakes for each new connection instead. 233 disable_http_keepalives: false 234 235 # Perspective keyservers to use as a backup when direct key fetches fail. This may 236 # be required to satisfy key requests for servers that are no longer online when 237 # joining some rooms. 238 key_perspectives: 239 - server_name: matrix.org 240 keys: 241 - key_id: ed25519:auto 242 public_key: Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw 243 - key_id: ed25519:a_RXGa 244 public_key: l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ 245 246 # This option will control whether Dendrite will prefer to look up keys directly 247 # or whether it should try perspective servers first, using direct fetches as a 248 # last resort. 249 prefer_direct_fetch: false 250 251 # Configuration for the Media API. 252 media_api: 253 # Storage path for uploaded media. May be relative or absolute. 254 base_path: ./media_store 255 256 # The maximum allowed file size (in bytes) for media uploads to this homeserver 257 # (0 = unlimited). If using a reverse proxy, ensure it allows requests at least 258 #this large (e.g. the client_max_body_size setting in nginx). 259 max_file_size_bytes: 10485760 260 261 # Whether to dynamically generate thumbnails if needed. 262 dynamic_thumbnails: false 263 264 # The maximum number of simultaneous thumbnail generators to run. 265 max_thumbnail_generators: 10 266 267 # A list of thumbnail sizes to be generated for media content. 268 thumbnail_sizes: 269 - width: 32 270 height: 32 271 method: crop 272 - width: 96 273 height: 96 274 method: crop 275 - width: 640 276 height: 480 277 method: scale 278 279 # Configuration for enabling experimental MSCs on this homeserver. 280 mscs: 281 mscs: 282 # - msc2836 # (Threading, see https://github.com/matrix-org/matrix-doc/pull/2836) 283 284 # Configuration for the Sync API. 285 sync_api: 286 # This option controls which HTTP header to inspect to find the real remote IP 287 # address of the client. This is likely required if Dendrite is running behind 288 # a reverse proxy server. 289 # real_ip_header: X-Real-IP 290 291 # Configuration for the full-text search engine. 292 search: 293 # Whether or not search is enabled. 294 enabled: false 295 296 # The path where the search index will be created in. 297 index_path: "./searchindex" 298 299 # The language most likely to be used on the server - used when indexing, to 300 # ensure the returned results match expectations. A full list of possible languages 301 # can be found at https://github.com/blevesearch/bleve/tree/master/analysis/lang 302 language: "en" 303 304 # Configuration for the User API. 305 user_api: 306 # The cost when hashing passwords on registration/login. Default: 10. Min: 4, Max: 31 307 # See https://pkg.go.dev/golang.org/x/crypto/bcrypt for more information. 308 # Setting this lower makes registration/login consume less CPU resources at the cost 309 # of security should the database be compromised. Setting this higher makes registration/login 310 # consume more CPU resources but makes it harder to brute force password hashes. This value 311 # can be lowered if performing tests or on embedded Dendrite instances (e.g WASM builds). 312 bcrypt_cost: 10 313 314 # The length of time that a token issued for a relying party from 315 # /_matrix/client/r0/user/{userId}/openid/request_token endpoint 316 # is considered to be valid in milliseconds. 317 # The default lifetime is 3600000ms (60 minutes). 318 # openid_token_lifetime_ms: 3600000 319 320 # Users who register on this homeserver will automatically be joined to the rooms listed under "auto_join_rooms" option. 321 # By default, any room aliases included in this list will be created as a publicly joinable room 322 # when the first user registers for the homeserver. If the room already exists, 323 # make certain it is a publicly joinable room, i.e. the join rule of the room must be set to 'public'. 324 # As Spaces are just rooms under the hood, Space aliases may also be used. 325 auto_join_rooms: 326 # - "#main:matrix.org" 327 328 # The number of workers to start for the DeviceListUpdater. Defaults to 8. 329 # This only needs updating if the "InputDeviceListUpdate" stream keeps growing indefinitely. 330 # worker_count: 8 331 332 # Configuration for Opentracing. 333 # See https://github.com/matrix-org/dendrite/tree/master/docs/tracing for information on 334 # how this works and how to set it up. 335 tracing: 336 enabled: false 337 jaeger: 338 serviceName: "" 339 disabled: false 340 rpc_metrics: false 341 tags: [] 342 sampler: null 343 reporter: null 344 headers: null 345 baggage_restrictions: null 346 throttler: null 347 348 # Logging configuration. The "std" logging type controls the logs being sent to 349 # stdout. The "file" logging type controls logs being written to a log folder on 350 # the disk. Supported log levels are "debug", "info", "warn", "error". 351 logging: 352 - type: std 353 level: info 354 - type: file 355 level: info 356 params: 357 path: /var/log/dendrite