dendrite.yaml (11597B)
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 # At a minimum, to get started, you will need to update the settings in the 8 # "global" section for your deployment, and you will need to check that the 9 # database "connection_string" line in each component section is correct. 10 # 11 # Each component with a "database" section can accept the following formats 12 # for "connection_string": 13 # SQLite: file:filename.db 14 # file:///path/to/filename.db 15 # PostgreSQL: postgresql://user:pass@hostname/database?params=... 16 # 17 # SQLite is embedded into Dendrite and therefore no further prerequisites are 18 # needed for the database when using SQLite mode. However, performance with 19 # PostgreSQL is significantly better and recommended for multi-user deployments. 20 # SQLite is typically around 20-30% slower than PostgreSQL when tested with a 21 # small number of users and likely will perform worse still with a higher volume 22 # of users. 23 # 24 # The "max_open_conns" and "max_idle_conns" settings configure the maximum 25 # number of open/idle database connections. The value 0 will use the database 26 # engine default, and a negative value will use unlimited connections. The 27 # "conn_max_lifetime" option controls the maximum length of time a database 28 # connection can be idle in seconds - a negative value is unlimited. 29 30 # The version of the configuration file. 31 version: 1 32 33 # Global Matrix configuration. This configuration applies to all components. 34 global: 35 # The domain name of this homeserver. 36 server_name: example.com 37 38 # The path to the signing private key file, used to sign requests and events. 39 private_key: matrix_key.pem 40 41 # The paths and expiry timestamps (as a UNIX timestamp in millisecond precision) 42 # to old signing private keys that were formerly in use on this domain. These 43 # keys will not be used for federation request or event signing, but will be 44 # provided to any other homeserver that asks when trying to verify old events. 45 # old_private_keys: 46 # - private_key: old_matrix_key.pem 47 # expired_at: 1601024554498 48 49 # How long a remote server can cache our server signing key before requesting it 50 # again. Increasing this number will reduce the number of requests made by other 51 # servers for our key but increases the period that a compromised key will be 52 # considered valid by other homeservers. 53 key_validity_period: 168h0m0s 54 55 # Lists of domains that the server will trust as identity servers to verify third 56 # party identifiers such as phone numbers and email addresses. 57 trusted_third_party_id_servers: 58 - matrix.org 59 - vector.im 60 61 disable_federation: true 62 63 # Configuration for Kafka/Naffka. 64 kafka: 65 # List of Kafka broker addresses to connect to. This is not needed if using 66 # Naffka in monolith mode. 67 addresses: 68 - kafka:9092 69 70 # The prefix to use for Kafka topic names for this homeserver. Change this only if 71 # you are running more than one Dendrite homeserver on the same Kafka deployment. 72 topic_prefix: Dendrite 73 74 # Whether to use Naffka instead of Kafka. This is only available in monolith 75 # mode, but means that you can run a single-process server without requiring 76 # Kafka. 77 use_naffka: false 78 79 # Naffka database options. Not required when using Kafka. 80 naffka_database: 81 connection_string: postgresql://dendrite:itsasecret@postgres/dendrite_naffka?sslmode=disable 82 max_open_conns: 10 83 max_idle_conns: 2 84 conn_max_lifetime: -1 85 86 # Configuration for Prometheus metric collection. 87 metrics: 88 # Whether or not Prometheus metrics are enabled. 89 enabled: false 90 91 # HTTP basic authentication to protect access to monitoring. 92 basic_auth: 93 username: metrics 94 password: metrics 95 96 # DNS cache options. The DNS cache may reduce the load on DNS servers 97 # if there is no local caching resolver available for use. 98 dns_cache: 99 # Whether or not the DNS cache is enabled. 100 enabled: false 101 102 # Maximum number of entries to hold in the DNS cache, and 103 # for how long those items should be considered valid in seconds. 104 cache_size: 256 105 cache_lifetime: 300 106 107 # Configuration for the Appservice API. 108 app_service_api: 109 internal_api: 110 listen: http://0.0.0.0:7777 111 connect: http://appservice_api:7777 112 database: 113 connection_string: postgresql://dendrite:itsasecret@postgres/dendrite_appservice?sslmode=disable 114 max_open_conns: 10 115 max_idle_conns: 2 116 conn_max_lifetime: -1 117 118 # Appservice configuration files to load into this homeserver. 119 config_files: [] 120 121 # Configuration for the Client API. 122 client_api: 123 internal_api: 124 listen: http://0.0.0.0:7771 125 connect: http://client_api:7771 126 external_api: 127 listen: http://0.0.0.0:8071 128 129 # Prevents new users from being able to register on this homeserver, except when 130 # using the registration shared secret below. 131 registration_disabled: false 132 133 # If set, allows registration by anyone who knows the shared secret, regardless of 134 # whether registration is otherwise disabled. 135 registration_shared_secret: "" 136 137 # Whether to require reCAPTCHA for registration. 138 enable_registration_captcha: false 139 140 # Settings for ReCAPTCHA. 141 recaptcha_public_key: "" 142 recaptcha_private_key: "" 143 recaptcha_bypass_secret: "" 144 recaptcha_siteverify_api: "" 145 146 # TURN server information that this homeserver should send to clients. 147 turn: 148 turn_user_lifetime: "" 149 turn_uris: [] 150 turn_shared_secret: "" 151 turn_username: "" 152 turn_password: "" 153 154 # Settings for rate-limited endpoints. Rate limiting will kick in after the 155 # threshold number of "slots" have been taken by requests from a specific 156 # host. Each "slot" will be released after the cooloff time in milliseconds. 157 rate_limiting: 158 enabled: true 159 threshold: 5 160 cooloff_ms: 500 161 162 # Configuration for the EDU server. 163 edu_server: 164 internal_api: 165 listen: http://0.0.0.0:7778 166 connect: http://edu_server:7778 167 168 # Configuration for the Federation API. 169 federation_api: 170 internal_api: 171 listen: http://0.0.0.0:7772 172 connect: http://federation_api:7772 173 external_api: 174 listen: http://0.0.0.0:8072 175 176 # List of paths to X.509 certificates to be used by the external federation listeners. 177 # These certificates will be used to calculate the TLS fingerprints and other servers 178 # will expect the certificate to match these fingerprints. Certificates must be in PEM 179 # format. 180 federation_certificates: [] 181 182 # Configuration for the Federation Sender. 183 federation_sender: 184 internal_api: 185 listen: http://0.0.0.0:7775 186 connect: http://federation_sender:7775 187 database: 188 connection_string: postgresql://dendrite:itsasecret@postgres/dendrite_federationsender?sslmode=disable 189 max_open_conns: 10 190 max_idle_conns: 2 191 conn_max_lifetime: -1 192 193 # How many times we will try to resend a failed transaction to a specific server. The 194 # backoff is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds etc. 195 send_max_retries: 16 196 197 # Disable the validation of TLS certificates of remote federated homeservers. Do not 198 # enable this option in production as it presents a security risk! 199 disable_tls_validation: false 200 201 # Use the following proxy server for outbound federation traffic. 202 proxy_outbound: 203 enabled: false 204 protocol: http 205 host: localhost 206 port: 8080 207 208 # Configuration for the Key Server (for end-to-end encryption). 209 key_server: 210 internal_api: 211 listen: http://0.0.0.0:7779 212 connect: http://key_server:7779 213 database: 214 connection_string: postgresql://dendrite:itsasecret@postgres/dendrite_keyserver?sslmode=disable 215 max_open_conns: 10 216 max_idle_conns: 2 217 conn_max_lifetime: -1 218 219 # Configuration for the Media API. 220 media_api: 221 internal_api: 222 listen: http://0.0.0.0:7774 223 connect: http://media_api:7774 224 external_api: 225 listen: http://0.0.0.0:8074 226 database: 227 connection_string: postgresql://dendrite:itsasecret@postgres/dendrite_mediaapi?sslmode=disable 228 max_open_conns: 10 229 max_idle_conns: 2 230 conn_max_lifetime: -1 231 232 # Storage path for uploaded media. May be relative or absolute. 233 base_path: /var/dendrite/media 234 235 # The maximum allowed file size (in bytes) for media uploads to this homeserver 236 # (0 = unlimited). 237 max_file_size_bytes: 10485760 238 239 # Whether to dynamically generate thumbnails if needed. 240 dynamic_thumbnails: false 241 242 # The maximum number of simultaneous thumbnail generators to run. 243 max_thumbnail_generators: 10 244 245 # A list of thumbnail sizes to be generated for media content. 246 thumbnail_sizes: 247 - width: 32 248 height: 32 249 method: crop 250 - width: 96 251 height: 96 252 method: crop 253 - width: 640 254 height: 480 255 method: scale 256 257 # Configuration for the Room Server. 258 room_server: 259 internal_api: 260 listen: http://0.0.0.0:7770 261 connect: http://room_server:7770 262 database: 263 connection_string: postgresql://dendrite:itsasecret@postgres/dendrite_roomserver?sslmode=disable 264 max_open_conns: 10 265 max_idle_conns: 2 266 conn_max_lifetime: -1 267 268 # Configuration for the Server Key API (for server signing keys). 269 signing_key_server: 270 internal_api: 271 listen: http://0.0.0.0:7780 272 connect: http://signing_key_server:7780 273 database: 274 connection_string: postgresql://dendrite:itsasecret@postgres/dendrite_signingkeyserver?sslmode=disable 275 max_open_conns: 10 276 max_idle_conns: 2 277 conn_max_lifetime: -1 278 279 # Perspective keyservers to use as a backup when direct key fetches fail. This may 280 # be required to satisfy key requests for servers that are no longer online when 281 # joining some rooms. 282 key_perspectives: 283 - server_name: matrix.org 284 keys: 285 - key_id: ed25519:auto 286 public_key: Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw 287 - key_id: ed25519:a_RXGa 288 public_key: l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ 289 290 # This option will control whether Dendrite will prefer to look up keys directly 291 # or whether it should try perspective servers first, using direct fetches as a 292 # last resort. 293 prefer_direct_fetch: false 294 295 # Configuration for the Sync API. 296 sync_api: 297 internal_api: 298 listen: http://0.0.0.0:7773 299 connect: http://sync_api:7773 300 external_api: 301 listen: http://0.0.0.0:8073 302 database: 303 connection_string: postgresql://dendrite:itsasecret@postgres/dendrite_syncapi?sslmode=disable 304 max_open_conns: 10 305 max_idle_conns: 2 306 conn_max_lifetime: -1 307 308 # Configuration for the User API. 309 user_api: 310 internal_api: 311 listen: http://0.0.0.0:7781 312 connect: http://user_api:7781 313 account_database: 314 connection_string: postgresql://dendrite:itsasecret@postgres/dendrite_userapi_accounts?sslmode=disable 315 max_open_conns: 10 316 max_idle_conns: 2 317 conn_max_lifetime: -1 318 device_database: 319 connection_string: postgresql://dendrite:itsasecret@postgres/dendrite_userapi_devices?sslmode=disable 320 max_open_conns: 10 321 max_idle_conns: 2 322 conn_max_lifetime: -1 323 324 # Configuration for Opentracing. 325 # See https://github.com/matrix-org/dendrite/tree/master/docs/tracing for information on 326 # how this works and how to set it up. 327 tracing: 328 enabled: false 329 jaeger: 330 serviceName: "" 331 disabled: false 332 rpc_metrics: false 333 tags: [] 334 sampler: null 335 reporter: null 336 headers: null 337 baggage_restrictions: null 338 throttler: null 339 340 # Logging configuration, in addition to the standard logging that is sent to 341 # stdout by Dendrite. 342 logging: 343 - type: file 344 level: info 345 params: 346 path: /var/log/dendrite