2020-08-11 14:21:26 +02:00
|
|
|
# This is the Dendrite configuration file.
|
|
|
|
#
|
|
|
|
# The configuration is split up into sections - each Dendrite component has a
|
|
|
|
# configuration section, in addition to the "global" section which applies to
|
|
|
|
# all components.
|
|
|
|
|
2022-03-03 12:40:53 +01:00
|
|
|
# The version of the configuration file.
|
2022-01-05 18:44:49 +01:00
|
|
|
version: 2
|
2020-08-11 14:21:26 +02:00
|
|
|
|
|
|
|
# Global Matrix configuration. This configuration applies to all components.
|
|
|
|
global:
|
|
|
|
# The domain name of this homeserver.
|
|
|
|
server_name: localhost
|
|
|
|
|
|
|
|
# The path to the signing private key file, used to sign requests and events.
|
2020-10-26 23:09:13 +01:00
|
|
|
# Note that this is NOT the same private key as used for TLS! To generate a
|
|
|
|
# signing key, use "./bin/generate-keys --private-key matrix_key.pem".
|
2020-08-11 14:21:26 +02:00
|
|
|
private_key: matrix_key.pem
|
|
|
|
|
2020-09-25 11:58:53 +02:00
|
|
|
# The paths and expiry timestamps (as a UNIX timestamp in millisecond precision)
|
2022-10-06 12:56:00 +02:00
|
|
|
# to old signing keys that were formerly in use on this domain name. These
|
2020-09-25 11:58:53 +02:00
|
|
|
# keys will not be used for federation request or event signing, but will be
|
|
|
|
# provided to any other homeserver that asks when trying to verify old events.
|
2022-05-12 13:05:55 +02:00
|
|
|
old_private_keys:
|
2022-10-06 12:56:00 +02:00
|
|
|
# If the old private key file is available:
|
2022-05-12 13:05:55 +02:00
|
|
|
# - private_key: old_matrix_key.pem
|
|
|
|
# expired_at: 1601024554498
|
2022-10-06 12:56:00 +02:00
|
|
|
# If only the public key (in base64 format) and key ID are known:
|
|
|
|
# - public_key: mn59Kxfdq9VziYHSBzI7+EDPDcBS2Xl7jeUdiiQcOnM=
|
|
|
|
# key_id: ed25519:mykeyid
|
|
|
|
# expired_at: 1601024554498
|
2020-09-25 11:58:53 +02:00
|
|
|
|
2020-08-11 14:21:26 +02:00
|
|
|
# How long a remote server can cache our server signing key before requesting it
|
|
|
|
# again. Increasing this number will reduce the number of requests made by other
|
|
|
|
# servers for our key but increases the period that a compromised key will be
|
|
|
|
# considered valid by other homeservers.
|
|
|
|
key_validity_period: 168h0m0s
|
|
|
|
|
2022-05-03 17:35:06 +02:00
|
|
|
# Global database connection pool, for PostgreSQL monolith deployments only. If
|
|
|
|
# this section is populated then you can omit the "database" blocks in all other
|
|
|
|
# sections. For polylith deployments, or monolith deployments using SQLite databases,
|
|
|
|
# you must configure the "database" block for each component instead.
|
2022-05-12 13:05:55 +02:00
|
|
|
database:
|
|
|
|
connection_string: postgresql://username:password@hostname/dendrite?sslmode=disable
|
2022-10-04 12:34:52 +02:00
|
|
|
max_open_conns: 90
|
2022-05-12 13:05:55 +02:00
|
|
|
max_idle_conns: 5
|
|
|
|
conn_max_lifetime: -1
|
2022-05-03 17:35:06 +02:00
|
|
|
|
2022-07-11 15:31:31 +02:00
|
|
|
# Configuration for in-memory caches. Caches can often improve performance by
|
|
|
|
# keeping frequently accessed items (like events, identifiers etc.) in memory
|
|
|
|
# rather than having to read them from the database.
|
|
|
|
cache:
|
|
|
|
# The estimated maximum size for the global cache in bytes, or in terabytes,
|
|
|
|
# gigabytes, megabytes or kilobytes when the appropriate 'tb', 'gb', 'mb' or
|
|
|
|
# 'kb' suffix is specified. Note that this is not a hard limit, nor is it a
|
|
|
|
# memory limit for the entire process. A cache that is too small may ultimately
|
|
|
|
# provide little or no benefit.
|
|
|
|
max_size_estimated: 1gb
|
|
|
|
|
|
|
|
# The maximum amount of time that a cache entry can live for in memory before
|
|
|
|
# it will be evicted and/or refreshed from the database. Lower values result in
|
|
|
|
# easier admission of new cache entries but may also increase database load in
|
|
|
|
# comparison to higher values, so adjust conservatively. Higher values may make
|
|
|
|
# it harder for new items to make it into the cache, e.g. if new rooms suddenly
|
|
|
|
# become popular.
|
|
|
|
max_age: 1h
|
|
|
|
|
2021-09-10 11:05:31 +02:00
|
|
|
# The server name to delegate server-server communications to, with optional port
|
|
|
|
# e.g. localhost:443
|
|
|
|
well_known_server_name: ""
|
|
|
|
|
2022-07-25 11:39:57 +02:00
|
|
|
# The server name to delegate client-server communications to, with optional port
|
|
|
|
# e.g. localhost:443
|
|
|
|
well_known_client_name: ""
|
|
|
|
|
2020-08-11 14:21:26 +02:00
|
|
|
# Lists of domains that the server will trust as identity servers to verify third
|
|
|
|
# party identifiers such as phone numbers and email addresses.
|
|
|
|
trusted_third_party_id_servers:
|
2022-03-03 12:40:53 +01:00
|
|
|
- matrix.org
|
|
|
|
- vector.im
|
2020-08-11 14:21:26 +02:00
|
|
|
|
2022-05-12 13:05:55 +02:00
|
|
|
# Disables federation. Dendrite will not be able to communicate with other servers
|
|
|
|
# in the Matrix federation and the federation API will not be exposed.
|
2020-12-02 16:10:03 +01:00
|
|
|
disable_federation: false
|
|
|
|
|
2022-05-12 13:05:55 +02:00
|
|
|
# Configures the handling of presence events. Inbound controls whether we receive
|
|
|
|
# presence events from other servers, outbound controls whether we send presence
|
|
|
|
# events for our local users to other servers.
|
2022-04-06 13:11:19 +02:00
|
|
|
presence:
|
|
|
|
enable_inbound: false
|
|
|
|
enable_outbound: false
|
|
|
|
|
2022-05-12 13:05:55 +02:00
|
|
|
# Configures phone-home statistics reporting. These statistics contain the server
|
|
|
|
# name, number of active users and some information on your deployment config.
|
|
|
|
# We use this information to understand how Dendrite is being used in the wild.
|
2022-05-04 19:04:28 +02:00
|
|
|
report_stats:
|
|
|
|
enabled: false
|
|
|
|
endpoint: https://matrix.org/report-usage-stats/push
|
|
|
|
|
2022-05-12 13:05:55 +02:00
|
|
|
# Server notices allows server admins to send messages to all users on the server.
|
2022-02-18 16:05:03 +01:00
|
|
|
server_notices:
|
|
|
|
enabled: false
|
2022-05-12 13:05:55 +02:00
|
|
|
# The local part, display name and avatar URL (as a mxc:// URL) for the user that
|
|
|
|
# will send the server notices. These are visible to all users on the deployment.
|
2022-02-18 16:05:03 +01:00
|
|
|
local_part: "_server"
|
2022-05-12 13:05:55 +02:00
|
|
|
display_name: "Server Alerts"
|
2022-02-18 16:05:03 +01:00
|
|
|
avatar_url: ""
|
2022-05-12 13:05:55 +02:00
|
|
|
# The room name to be used when sending server notices. This room name will
|
|
|
|
# appear in user clients.
|
2022-02-18 16:05:03 +01:00
|
|
|
room_name: "Server Alerts"
|
|
|
|
|
2022-01-05 18:44:49 +01:00
|
|
|
# Configuration for NATS JetStream
|
|
|
|
jetstream:
|
|
|
|
# A list of NATS Server addresses to connect to. If none are specified, an
|
2022-05-12 13:05:55 +02:00
|
|
|
# internal NATS server will be started automatically when running Dendrite in
|
|
|
|
# monolith mode. For polylith deployments, it is required to specify the address
|
|
|
|
# of at least one NATS Server node.
|
2020-08-11 14:21:26 +02:00
|
|
|
addresses:
|
2022-03-03 12:40:53 +01:00
|
|
|
# - localhost:4222
|
2020-08-11 14:21:26 +02:00
|
|
|
|
2022-08-02 13:58:08 +02:00
|
|
|
# Disable the validation of TLS certificates of NATS. This is
|
|
|
|
# not recommended in production since it may allow NATS traffic
|
|
|
|
# to be sent to an insecure endpoint.
|
|
|
|
disable_tls_validation: false
|
|
|
|
|
2022-05-12 13:05:55 +02:00
|
|
|
# Persistent directory to store JetStream streams in. This directory should be
|
|
|
|
# preserved across Dendrite restarts.
|
2022-01-05 18:44:49 +01:00
|
|
|
storage_path: ./
|
2020-10-27 15:11:37 +01:00
|
|
|
|
2022-05-12 13:05:55 +02:00
|
|
|
# The prefix to use for stream names for this homeserver - really only useful
|
|
|
|
# if you are running more than one Dendrite server on the same NATS deployment.
|
2022-01-05 18:44:49 +01:00
|
|
|
topic_prefix: Dendrite
|
2020-08-11 14:21:26 +02:00
|
|
|
|
|
|
|
# Configuration for Prometheus metric collection.
|
|
|
|
metrics:
|
|
|
|
enabled: false
|
|
|
|
basic_auth:
|
|
|
|
username: metrics
|
|
|
|
password: metrics
|
|
|
|
|
2022-05-12 13:05:55 +02:00
|
|
|
# Optional DNS cache. The DNS cache may reduce the load on DNS servers if there
|
|
|
|
# is no local caching resolver available for use.
|
2021-01-22 15:16:59 +01:00
|
|
|
dns_cache:
|
|
|
|
enabled: false
|
|
|
|
cache_size: 256
|
2022-05-12 13:05:55 +02:00
|
|
|
cache_lifetime: "5m" # 5 minutes; https://pkg.go.dev/time@master#ParseDuration
|
2021-01-22 15:16:59 +01:00
|
|
|
|
2020-08-11 14:21:26 +02:00
|
|
|
# Configuration for the Appservice API.
|
|
|
|
app_service_api:
|
2021-03-05 11:40:27 +01:00
|
|
|
# Disable the validation of TLS certificates of appservices. This is
|
|
|
|
# not recommended in production since it may allow appservice traffic
|
2022-05-12 13:05:55 +02:00
|
|
|
# to be sent to an insecure endpoint.
|
2021-03-05 11:40:27 +01:00
|
|
|
disable_tls_validation: false
|
|
|
|
|
2020-08-11 14:21:26 +02:00
|
|
|
# Appservice configuration files to load into this homeserver.
|
2022-05-12 13:05:55 +02:00
|
|
|
config_files:
|
|
|
|
# - /path/to/appservice_registration.yaml
|
2020-08-11 14:21:26 +02:00
|
|
|
|
|
|
|
# Configuration for the Client API.
|
|
|
|
client_api:
|
|
|
|
# Prevents new users from being able to register on this homeserver, except when
|
|
|
|
# using the registration shared secret below.
|
2022-04-29 09:31:11 +02:00
|
|
|
registration_disabled: true
|
2020-08-11 14:21:26 +02:00
|
|
|
|
2022-02-18 11:12:26 +01:00
|
|
|
# Prevents new guest accounts from being created. Guest registration is also
|
|
|
|
# disabled implicitly by setting 'registration_disabled' above.
|
|
|
|
guests_disabled: true
|
|
|
|
|
2022-05-12 13:05:55 +02:00
|
|
|
# If set, allows registration by anyone who knows the shared secret, regardless
|
|
|
|
# of whether registration is otherwise disabled.
|
2020-08-11 14:21:26 +02:00
|
|
|
registration_shared_secret: ""
|
|
|
|
|
2022-05-12 13:05:55 +02:00
|
|
|
# Whether to require reCAPTCHA for registration. If you have enabled registration
|
|
|
|
# then this is HIGHLY RECOMMENDED to reduce the risk of your homeserver being used
|
|
|
|
# for coordinated spam attacks.
|
2020-08-11 14:21:26 +02:00
|
|
|
enable_registration_captcha: false
|
|
|
|
|
2022-03-03 12:40:53 +01:00
|
|
|
# Settings for ReCAPTCHA.
|
2020-08-11 14:21:26 +02:00
|
|
|
recaptcha_public_key: ""
|
|
|
|
recaptcha_private_key: ""
|
|
|
|
recaptcha_bypass_secret: ""
|
2022-10-28 12:25:01 +02:00
|
|
|
|
|
|
|
# To use hcaptcha.com instead of ReCAPTCHA, set the following parameters, otherwise just keep them empty.
|
|
|
|
# recaptcha_siteverify_api: "https://hcaptcha.com/siteverify"
|
|
|
|
# recaptcha_api_js_url: "https://js.hcaptcha.com/1/api.js"
|
|
|
|
# recaptcha_form_field: "h-captcha-response"
|
|
|
|
# recaptcha_sitekey_class: "h-captcha"
|
|
|
|
|
2020-08-11 14:21:26 +02:00
|
|
|
|
2022-03-03 12:40:53 +01:00
|
|
|
# TURN server information that this homeserver should send to clients.
|
2020-08-11 14:21:26 +02:00
|
|
|
turn:
|
2022-08-05 14:16:54 +02:00
|
|
|
turn_user_lifetime: "5m"
|
2022-05-12 13:05:55 +02:00
|
|
|
turn_uris:
|
|
|
|
# - turn:turn.server.org?transport=udp
|
|
|
|
# - turn:turn.server.org?transport=tcp
|
2020-08-11 14:21:26 +02:00
|
|
|
turn_shared_secret: ""
|
2022-08-05 14:16:54 +02:00
|
|
|
# If your TURN server requires static credentials, then you will need to enter
|
|
|
|
# them here instead of supplying a shared secret. Note that these credentials
|
|
|
|
# will be visible to clients!
|
|
|
|
# turn_username: ""
|
|
|
|
# turn_password: ""
|
2020-08-11 14:21:26 +02:00
|
|
|
|
2022-05-12 13:05:55 +02:00
|
|
|
# Settings for rate-limited endpoints. Rate limiting kicks in after the threshold
|
|
|
|
# number of "slots" have been taken by requests from a specific host. Each "slot"
|
2022-06-07 15:24:04 +02:00
|
|
|
# will be released after the cooloff time in milliseconds. Server administrators
|
|
|
|
# and appservice users are exempt from rate limiting by default.
|
2020-09-03 11:12:11 +02:00
|
|
|
rate_limiting:
|
|
|
|
enabled: true
|
2022-08-03 10:55:21 +02:00
|
|
|
threshold: 20
|
2020-09-03 11:12:11 +02:00
|
|
|
cooloff_ms: 500
|
2022-06-07 15:24:04 +02:00
|
|
|
exempt_user_ids:
|
2022-06-08 10:13:25 +02:00
|
|
|
# - "@user:domain.com"
|
2020-09-03 11:12:11 +02:00
|
|
|
|
2020-08-11 14:21:26 +02:00
|
|
|
# Configuration for the Federation API.
|
|
|
|
federation_api:
|
|
|
|
# How many times we will try to resend a failed transaction to a specific server. The
|
2022-05-12 13:05:55 +02:00
|
|
|
# backoff is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds etc. Once
|
|
|
|
# the max retries are exceeded, Dendrite will no longer try to send transactions to
|
|
|
|
# that server until it comes back to life and connects to us again.
|
2020-08-11 14:21:26 +02:00
|
|
|
send_max_retries: 16
|
|
|
|
|
|
|
|
# Disable the validation of TLS certificates of remote federated homeservers. Do not
|
|
|
|
# enable this option in production as it presents a security risk!
|
|
|
|
disable_tls_validation: false
|
|
|
|
|
2022-09-20 18:17:44 +02:00
|
|
|
# Disable HTTP keepalives, which also prevents connection reuse. Dendrite will typically
|
|
|
|
# keep HTTP connections open to remote hosts for 5 minutes as they can be reused much
|
|
|
|
# more quickly than opening new connections each time. Disabling keepalives will close
|
|
|
|
# HTTP connections immediately after a successful request but may result in more CPU and
|
|
|
|
# memory being used on TLS handshakes for each new connection instead.
|
|
|
|
disable_http_keepalives: false
|
|
|
|
|
2021-11-24 11:45:23 +01:00
|
|
|
# Perspective keyservers to use as a backup when direct key fetches fail. This may
|
|
|
|
# be required to satisfy key requests for servers that are no longer online when
|
|
|
|
# joining some rooms.
|
|
|
|
key_perspectives:
|
2022-03-03 12:40:53 +01:00
|
|
|
- server_name: matrix.org
|
|
|
|
keys:
|
|
|
|
- key_id: ed25519:auto
|
|
|
|
public_key: Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw
|
|
|
|
- key_id: ed25519:a_RXGa
|
|
|
|
public_key: l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ
|
2021-11-24 11:45:23 +01:00
|
|
|
|
|
|
|
# This option will control whether Dendrite will prefer to look up keys directly
|
|
|
|
# or whether it should try perspective servers first, using direct fetches as a
|
|
|
|
# last resort.
|
|
|
|
prefer_direct_fetch: false
|
|
|
|
|
2020-08-11 14:21:26 +02:00
|
|
|
# Configuration for the Media API.
|
|
|
|
media_api:
|
|
|
|
# Storage path for uploaded media. May be relative or absolute.
|
|
|
|
base_path: ./media_store
|
|
|
|
|
|
|
|
# The maximum allowed file size (in bytes) for media uploads to this homeserver
|
2022-05-12 13:05:55 +02:00
|
|
|
# (0 = unlimited). If using a reverse proxy, ensure it allows requests at least
|
|
|
|
#this large (e.g. the client_max_body_size setting in nginx).
|
2020-08-11 14:21:26 +02:00
|
|
|
max_file_size_bytes: 10485760
|
|
|
|
|
|
|
|
# Whether to dynamically generate thumbnails if needed.
|
|
|
|
dynamic_thumbnails: false
|
|
|
|
|
|
|
|
# The maximum number of simultaneous thumbnail generators to run.
|
|
|
|
max_thumbnail_generators: 10
|
|
|
|
|
|
|
|
# A list of thumbnail sizes to be generated for media content.
|
|
|
|
thumbnail_sizes:
|
2022-03-03 12:40:53 +01:00
|
|
|
- width: 32
|
|
|
|
height: 32
|
|
|
|
method: crop
|
|
|
|
- width: 96
|
|
|
|
height: 96
|
|
|
|
method: crop
|
|
|
|
- width: 640
|
|
|
|
height: 480
|
|
|
|
method: scale
|
2020-08-11 14:21:26 +02:00
|
|
|
|
2022-05-12 13:05:55 +02:00
|
|
|
# Configuration for enabling experimental MSCs on this homeserver.
|
2021-01-05 12:31:10 +01:00
|
|
|
mscs:
|
2022-05-12 13:05:55 +02:00
|
|
|
mscs:
|
|
|
|
# - msc2836 # (Threading, see https://github.com/matrix-org/matrix-doc/pull/2836)
|
|
|
|
# - msc2946 # (Spaces Summary, see https://github.com/matrix-org/matrix-doc/pull/2946)
|
2020-08-11 14:21:26 +02:00
|
|
|
|
|
|
|
# Configuration for the Sync API.
|
|
|
|
sync_api:
|
2020-11-20 12:29:02 +01:00
|
|
|
# This option controls which HTTP header to inspect to find the real remote IP
|
|
|
|
# address of the client. This is likely required if Dendrite is running behind
|
|
|
|
# a reverse proxy server.
|
|
|
|
# real_ip_header: X-Real-IP
|
2022-09-27 18:06:49 +02:00
|
|
|
|
2022-09-27 18:10:47 +02:00
|
|
|
# Configuration for the full-text search engine.
|
2022-09-27 18:06:49 +02:00
|
|
|
search:
|
2022-09-27 18:10:47 +02:00
|
|
|
# Whether or not search is enabled.
|
2022-09-07 18:15:54 +02:00
|
|
|
enabled: false
|
2022-09-27 18:10:47 +02:00
|
|
|
|
|
|
|
# The path where the search index will be created in.
|
|
|
|
index_path: "./searchindex"
|
|
|
|
|
|
|
|
# The language most likely to be used on the server - used when indexing, to
|
|
|
|
# ensure the returned results match expectations. A full list of possible languages
|
|
|
|
# can be found at https://github.com/blevesearch/bleve/tree/master/analysis/lang
|
2022-09-27 18:06:49 +02:00
|
|
|
language: "en"
|
2020-11-20 12:29:02 +01:00
|
|
|
|
2020-08-11 14:21:26 +02:00
|
|
|
# Configuration for the User API.
|
|
|
|
user_api:
|
2021-03-08 14:19:02 +01:00
|
|
|
# The cost when hashing passwords on registration/login. Default: 10. Min: 4, Max: 31
|
|
|
|
# See https://pkg.go.dev/golang.org/x/crypto/bcrypt for more information.
|
2022-05-12 13:05:55 +02:00
|
|
|
# Setting this lower makes registration/login consume less CPU resources at the cost
|
|
|
|
# of security should the database be compromised. Setting this higher makes registration/login
|
|
|
|
# consume more CPU resources but makes it harder to brute force password hashes. This value
|
|
|
|
# can be lowered if performing tests or on embedded Dendrite instances (e.g WASM builds).
|
|
|
|
bcrypt_cost: 10
|
|
|
|
|
2022-03-03 12:40:53 +01:00
|
|
|
# The length of time that a token issued for a relying party from
|
2021-04-07 14:26:20 +02:00
|
|
|
# /_matrix/client/r0/user/{userId}/openid/request_token endpoint
|
2022-03-03 12:40:53 +01:00
|
|
|
# is considered to be valid in milliseconds.
|
2021-04-07 14:26:20 +02:00
|
|
|
# The default lifetime is 3600000ms (60 minutes).
|
|
|
|
# openid_token_lifetime_ms: 3600000
|
2020-08-11 14:21:26 +02:00
|
|
|
|
2022-10-26 11:04:53 +02:00
|
|
|
# Users who register on this homeserver will automatically be joined to the rooms listed under "auto_join_rooms" option.
|
|
|
|
# By default, any room aliases included in this list will be created as a publicly joinable room
|
|
|
|
# when the first user registers for the homeserver. If the room already exists,
|
|
|
|
# make certain it is a publicly joinable room, i.e. the join rule of the room must be set to 'public'.
|
|
|
|
# As Spaces are just rooms under the hood, Space aliases may also be used.
|
|
|
|
auto_join_rooms:
|
|
|
|
# - "#main:matrix.org"
|
|
|
|
|
2020-08-11 14:21:26 +02:00
|
|
|
# Configuration for Opentracing.
|
2020-08-27 11:24:56 +02:00
|
|
|
# See https://github.com/matrix-org/dendrite/tree/master/docs/tracing for information on
|
|
|
|
# how this works and how to set it up.
|
2020-08-11 14:21:26 +02:00
|
|
|
tracing:
|
|
|
|
enabled: false
|
|
|
|
jaeger:
|
|
|
|
serviceName: ""
|
|
|
|
disabled: false
|
|
|
|
rpc_metrics: false
|
|
|
|
tags: []
|
|
|
|
sampler: null
|
|
|
|
reporter: null
|
|
|
|
headers: null
|
|
|
|
baggage_restrictions: null
|
|
|
|
throttler: null
|
|
|
|
|
2022-05-12 13:05:55 +02:00
|
|
|
# Logging configuration. The "std" logging type controls the logs being sent to
|
|
|
|
# stdout. The "file" logging type controls logs being written to a log folder on
|
|
|
|
# the disk. Supported log levels are "debug", "info", "warn", "error".
|
2020-08-11 14:21:26 +02:00
|
|
|
logging:
|
2022-03-03 12:40:53 +01:00
|
|
|
- type: std
|
|
|
|
level: info
|
|
|
|
- type: file
|
|
|
|
level: info
|
|
|
|
params:
|
|
|
|
path: ./logs
|