dendrite/server/templates/dendrite.yaml.j2
author Luke Hoersten <luke@hoersten.org>
Mon, 08 Aug 2022 16:12:44 -0500
changeset 182 b4ce6f1f15b7
parent 181 2b30d081dd9b
child 194 d1e44e23f48e
permissions -rw-r--r--
Version updates
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
# This is the Dendrite configuration file.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
#
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
# The configuration is split up into sections - each Dendrite component has a
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
# configuration section, in addition to the "global" section which applies to
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
# all components.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
# The version of the configuration file.
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
     8
version: 2
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
# Global Matrix configuration. This configuration applies to all components.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
global:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
  # The domain name of this homeserver.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
  server_name: {{dendrite_name}}
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
  # The path to the signing private key file, used to sign requests and events.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
  # Note that this is NOT the same private key as used for TLS! To generate a
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
  # signing key, use "./bin/generate-keys --private-key matrix_key.pem".
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
  private_key: matrix_key.pem
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
  # The paths and expiry timestamps (as a UNIX timestamp in millisecond precision)
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
  # to old signing private keys that were formerly in use on this domain. These
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
  # keys will not be used for federation request or event signing, but will be
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
  # provided to any other homeserver that asks when trying to verify old events.
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    24
  old_private_keys:
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    25
    {% if dendrite_old_key %}- private_key: old_matrix_key.pem
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    26
      expired_at: 1626538450
174
431c6d5e5dd4 Lots of updates.
Luke Hoersten <luke@hoersten.org>
parents: 168
diff changeset
    27
{% endif %}
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    28
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    29
  # How long a remote server can cache our server signing key before requesting it
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    30
  # again. Increasing this number will reduce the number of requests made by other
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    31
  # servers for our key but increases the period that a compromised key will be
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    32
  # considered valid by other homeservers.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    33
  key_validity_period: 168h0m0s
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    34
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    35
  # Global database connection pool, for PostgreSQL monolith deployments only. If
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    36
  # this section is populated then you can omit the "database" blocks in all other
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    37
  # sections. For polylith deployments, or monolith deployments using SQLite databases,
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    38
  # you must configure the "database" block for each component instead.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    39
  database:
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    40
    connection_string: postgresql://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}?sslmode=disable
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    41
    max_open_conns: 100
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    42
    max_idle_conns: 5
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    43
    conn_max_lifetime: -1
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    44
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    45
  # The server name to delegate server-server communications to, with optional port
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    46
  # e.g. localhost:443
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    47
  well_known_server_name: ""
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    48
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    49
  # Lists of domains that the server will trust as identity servers to verify third
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    50
  # party identifiers such as phone numbers and email addresses.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    51
  trusted_third_party_id_servers:
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    52
    - matrix.org
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    53
    - vector.im
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    54
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    55
  # Disables federation. Dendrite will not be able to communicate with other servers
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    56
  # in the Matrix federation and the federation API will not be exposed.
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    57
  disable_federation: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    58
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    59
  # Configures the handling of presence events. Inbound controls whether we receive
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    60
  # presence events from other servers, outbound controls whether we send presence
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    61
  # events for our local users to other servers.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    62
  presence:
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    63
    enable_inbound: false
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    64
    enable_outbound: false
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    65
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    66
  # Configures phone-home statistics reporting. These statistics contain the server
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    67
  # name, number of active users and some information on your deployment config.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    68
  # We use this information to understand how Dendrite is being used in the wild.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    69
  report_stats:
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    70
    enabled: false
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    71
    endpoint: https://matrix.org/report-usage-stats/push
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    72
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    73
  # Server notices allows server admins to send messages to all users on the server.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    74
  server_notices:
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    75
    enabled: false
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    76
    # The local part, display name and avatar URL (as a mxc:// URL) for the user that
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    77
    # will send the server notices. These are visible to all users on the deployment.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    78
    local_part: "_server"
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    79
    display_name: "Server Alerts"
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    80
    avatar_url: ""
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    81
    # The room name to be used when sending server notices. This room name will
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    82
    # appear in user clients.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    83
    room_name: "Server Alerts"
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    84
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    85
  # Configuration for NATS JetStream
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    86
  jetstream:
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    87
    # A list of NATS Server addresses to connect to. If none are specified, an
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    88
    # internal NATS server will be started automatically when running Dendrite in
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    89
    # monolith mode. For polylith deployments, it is required to specify the address
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    90
    # of at least one NATS Server node.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    91
    addresses:
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    92
    # - localhost:4222
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    93
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    94
    # Persistent directory to store JetStream streams in. This directory should be
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    95
    # preserved across Dendrite restarts.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    96
    storage_path: ./
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    97
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    98
    # The prefix to use for stream names for this homeserver - really only useful
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
    99
    # if you are running more than one Dendrite server on the same NATS deployment.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   100
    topic_prefix: Dendrite
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   101
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   102
  # Configuration for Prometheus metric collection.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   103
  metrics:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   104
    enabled: true
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   105
    basic_auth:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   106
      username: metrics
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   107
      password: metrics
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   108
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   109
  # Optional DNS cache. The DNS cache may reduce the load on DNS servers if there
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   110
  # is no local caching resolver available for use.
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   111
  dns_cache:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   112
    enabled: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   113
    cache_size: 256
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   114
    cache_lifetime: "5m" # 5 minutes; https://pkg.go.dev/time@master#ParseDuration
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   115
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   116
# Configuration for the Appservice API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   117
app_service_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   118
  # Disable the validation of TLS certificates of appservices. This is
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   119
  # not recommended in production since it may allow appservice traffic
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   120
  # to be sent to an insecure endpoint.
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   121
  disable_tls_validation: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   122
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   123
  # Appservice configuration files to load into this homeserver.
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   124
  config_files:
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   125
  #  - /path/to/appservice_registration.yaml
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   126
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   127
# Configuration for the Client API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   128
client_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   129
  # Prevents new users from being able to register on this homeserver, except when
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   130
  # using the registration shared secret below.
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   131
  registration_disabled: true
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   132
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   133
  # Prevents new guest accounts from being created. Guest registration is also
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   134
  # disabled implicitly by setting 'registration_disabled' above.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   135
  guests_disabled: true
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   136
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   137
  # If set, allows registration by anyone who knows the shared secret, regardless
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   138
  # of whether registration is otherwise disabled.
168
8e61e4bb714b Minor dendrite tweaks.
Luke Hoersten <luke@hoersten.org>
parents: 163
diff changeset
   139
  registration_shared_secret: "{{dendrite_registration_secret}}"
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   140
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   141
  # Whether to require reCAPTCHA for registration. If you have enabled registration
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   142
  # then this is HIGHLY RECOMMENDED to reduce the risk of your homeserver being used
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   143
  # for coordinated spam attacks.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   144
  enable_registration_captcha: {{dendrite_recaptcha_enable}}
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   145
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   146
  # Settings for ReCAPTCHA.
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   147
  recaptcha_public_key: "{{dendrite_recaptcha_public_key}}"
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   148
  recaptcha_private_key: "{{dendrite_recaptcha_private_key}}"
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   149
  recaptcha_bypass_secret: "{{dendrite_recaptcha_bypass_secret}}"
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   150
  recaptcha_siteverify_api: "{{dendrite_recaptcha_siteverify_api}}"
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   151
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   152
  # TURN server information that this homeserver should send to clients.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   153
  turn:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   154
    turn_user_lifetime: ""
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   155
    turn_uris:
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   156
    #  - turn:turn.server.org?transport=udp
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   157
    #  - turn:turn.server.org?transport=tcp
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   158
    turn_shared_secret: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   159
    turn_username: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   160
    turn_password: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   161
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   162
  # Settings for rate-limited endpoints. Rate limiting kicks in after the threshold
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   163
  # number of "slots" have been taken by requests from a specific host. Each "slot"
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   164
  # will be released after the cooloff time in milliseconds.
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   165
  rate_limiting:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   166
    enabled: true
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   167
    threshold: 5
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   168
    cooloff_ms: 500
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   169
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   170
# Configuration for the Federation API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   171
federation_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   172
  # How many times we will try to resend a failed transaction to a specific server. The
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   173
  # backoff is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds etc. Once
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   174
  # the max retries are exceeded, Dendrite will no longer try to send transactions to
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   175
  # that server until it comes back to life and connects to us again.
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   176
  send_max_retries: 16
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   177
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   178
  # Disable the validation of TLS certificates of remote federated homeservers. Do not
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   179
  # enable this option in production as it presents a security risk!
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   180
  disable_tls_validation: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   181
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   182
  # Perspective keyservers to use as a backup when direct key fetches fail. This may
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   183
  # be required to satisfy key requests for servers that are no longer online when
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   184
  # joining some rooms.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   185
  key_perspectives:
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   186
    - server_name: matrix.org
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   187
      keys:
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   188
        - key_id: ed25519:auto
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   189
          public_key: Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   190
        - key_id: ed25519:a_RXGa
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   191
          public_key: l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   192
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   193
  # This option will control whether Dendrite will prefer to look up keys directly
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   194
  # or whether it should try perspective servers first, using direct fetches as a
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   195
  # last resort.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   196
  prefer_direct_fetch: false
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   197
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   198
# Configuration for the Media API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   199
media_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   200
  # Storage path for uploaded media. May be relative or absolute.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   201
  base_path: ./media_store
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   202
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   203
  # The maximum allowed file size (in bytes) for media uploads to this homeserver
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   204
  # (0 = unlimited). If using a reverse proxy, ensure it allows requests at least
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   205
  #this large (e.g. the client_max_body_size setting in nginx).
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   206
  max_file_size_bytes: 10485760
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   207
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   208
  # Whether to dynamically generate thumbnails if needed.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   209
  dynamic_thumbnails: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   210
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   211
  # The maximum number of simultaneous thumbnail generators to run.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   212
  max_thumbnail_generators: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   213
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   214
  # A list of thumbnail sizes to be generated for media content.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   215
  thumbnail_sizes:
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   216
    - width: 32
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   217
      height: 32
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   218
      method: crop
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   219
    - width: 96
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   220
      height: 96
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   221
      method: crop
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   222
    - width: 640
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   223
      height: 480
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   224
      method: scale
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   225
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   226
# Configuration for enabling experimental MSCs on this homeserver.
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   227
mscs:
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   228
  mscs:
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   229
  #  - msc2836  # (Threading, see https://github.com/matrix-org/matrix-doc/pull/2836)
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   230
  #  - msc2946  # (Spaces Summary, see https://github.com/matrix-org/matrix-doc/pull/2946)
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   231
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   232
# Configuration for the Sync API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   233
sync_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   234
  # This option controls which HTTP header to inspect to find the real remote IP
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   235
  # address of the client. This is likely required if Dendrite is running behind
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   236
  # a reverse proxy server.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   237
  # real_ip_header: X-Real-IP
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   238
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   239
# Configuration for the User API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   240
user_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   241
  # The cost when hashing passwords on registration/login. Default: 10. Min: 4, Max: 31
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   242
  # See https://pkg.go.dev/golang.org/x/crypto/bcrypt for more information.
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   243
  # Setting this lower makes registration/login consume less CPU resources at the cost
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   244
  # of security should the database be compromised. Setting this higher makes registration/login
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   245
  # consume more CPU resources but makes it harder to brute force password hashes. This value
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   246
  # can be lowered if performing tests or on embedded Dendrite instances (e.g WASM builds).
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   247
  bcrypt_cost: 10
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   248
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   249
  # The length of time that a token issued for a relying party from
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   250
  # /_matrix/client/r0/user/{userId}/openid/request_token endpoint
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   251
  # is considered to be valid in milliseconds.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   252
  # The default lifetime is 3600000ms (60 minutes).
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   253
  # openid_token_lifetime_ms: 3600000
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   254
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   255
# Configuration for Opentracing.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   256
# See https://github.com/matrix-org/dendrite/tree/master/docs/tracing for information on
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   257
# how this works and how to set it up.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   258
tracing:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   259
  enabled: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   260
  jaeger:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   261
    serviceName: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   262
    disabled: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   263
    rpc_metrics: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   264
    tags: []
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   265
    sampler: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   266
    reporter: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   267
    headers: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   268
    baggage_restrictions: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   269
    throttler: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   270
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   271
# Logging configuration. The "std" logging type controls the logs being sent to
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   272
# stdout. The "file" logging type controls logs being written to a log folder on
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   273
# the disk. Supported log levels are "debug", "info", "warn", "error".
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   274
logging:
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   275
  - type: std
181
2b30d081dd9b Version updates.
Luke Hoersten <luke@hoersten.org>
parents: 180
diff changeset
   276
    level: warn
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   277
  - type: file
181
2b30d081dd9b Version updates.
Luke Hoersten <luke@hoersten.org>
parents: 180
diff changeset
   278
    level: warn
180
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   279
    params:
f2f99b9b16ee Updated dendrite config.
Luke Hoersten <luke@hoersten.org>
parents: 174
diff changeset
   280
      path: ./logs