dendrite/server/templates/dendrite.yaml.j2
author Luke Hoersten <luke@hoersten.org>
Sun, 12 Dec 2021 20:07:46 -0600
changeset 178 0f99f298361d
parent 174 431c6d5e5dd4
child 180 f2f99b9b16ee
permissions -rw-r--r--
Updated versions.
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
# At a minimum, to get started, you will need to update the settings in the
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
# "global" section for your deployment, and you will need to check that the
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
# database "connection_string" line in each component section is correct.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
#
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
# Each component with a "database" section can accept the following formats
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
# for "connection_string":
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
#   SQLite:     file:filename.db
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
#               file:///path/to/filename.db
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
#   PostgreSQL: postgresql://user:pass@hostname/database?params=...
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
#
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
# SQLite is embedded into Dendrite and therefore no further prerequisites are
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
# needed for the database when using SQLite mode. However, performance with
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
# PostgreSQL is significantly better and recommended for multi-user deployments.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
# SQLite is typically around 20-30% slower than PostgreSQL when tested with a
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
# small number of users and likely will perform worse still with a higher volume
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
# of users.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
#
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    24
# The "max_open_conns" and "max_idle_conns" settings configure the maximum
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    25
# number of open/idle database connections. The value 0 will use the database
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    26
# engine default, and a negative value will use unlimited connections. The
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    27
# "conn_max_lifetime" option controls the maximum length of time a database
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    28
# connection can be idle in seconds - a negative value is unlimited.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    29
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    30
# The version of the configuration file.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    31
version: 1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    32
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    33
# Global Matrix configuration. This configuration applies to all components.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    34
global:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    35
  # The domain name of this homeserver.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    36
  server_name: {{dendrite_name}}
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    37
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    38
  # 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
    39
  # 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
    40
  # signing key, use "./bin/generate-keys --private-key matrix_key.pem".
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    41
  private_key: matrix_key.pem
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    42
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    43
  # The paths and expiry timestamps (as a UNIX timestamp in millisecond precision)
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    44
  # 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
    45
  # 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
    46
  # provided to any other homeserver that asks when trying to verify old events.
174
431c6d5e5dd4 Lots of updates.
Luke Hoersten <luke@hoersten.org>
parents: 168
diff changeset
    47
  {% if dendrite_old_key %}old_private_keys:
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    48
  - private_key: old_matrix_key.pem
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    49
    expired_at: 1626538450
174
431c6d5e5dd4 Lots of updates.
Luke Hoersten <luke@hoersten.org>
parents: 168
diff changeset
    50
{% endif %}
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    51
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    52
  # 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
    53
  # 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
    54
  # 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
    55
  # considered valid by other homeservers.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    56
  key_validity_period: 168h0m0s
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    57
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    58
  # 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
    59
  # party identifiers such as phone numbers and email addresses.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    60
  trusted_third_party_id_servers:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    61
  - matrix.org
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    62
  - vector.im
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    63
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    64
  # Disables federation. Dendrite will not be able to make any outbound HTTP requests
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    65
  # to other servers and the federation API will not be exposed.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    66
  disable_federation: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    67
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    68
  # Configuration for Kafka/Naffka.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    69
  kafka:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    70
    # List of Kafka broker addresses to connect to. This is not needed if using
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    71
    # Naffka in monolith mode.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    72
    addresses:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    73
      - localhost:2181
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    74
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    75
    # The prefix to use for Kafka topic names for this homeserver. Change this only if
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    76
    # you are running more than one Dendrite homeserver on the same Kafka deployment.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    77
    topic_prefix: Dendrite
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    78
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    79
    # Whether to use Naffka instead of Kafka. This is only available in monolith
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    80
    # mode, but means that you can run a single-process server without requiring
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    81
    # Kafka.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    82
    use_naffka: true
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    83
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    84
    # The max size a Kafka message is allowed to use.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    85
    # You only need to change this value, if you encounter issues with too large messages.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    86
    # Must be less than/equal to "max.message.bytes" configured in Kafka.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    87
    # Defaults to 8388608 bytes.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    88
    # max_message_bytes: 8388608
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    89
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    90
    # Naffka database options. Not required when using Kafka.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    91
    naffka_database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    92
      connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    93
      max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    94
      max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    95
      conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    96
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    97
  # Configuration for Prometheus metric collection.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    98
  metrics:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    99
    # Whether or not Prometheus metrics are enabled.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   100
    enabled: true
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
    # HTTP basic authentication to protect access to monitoring.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   103
    basic_auth:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   104
      username: metrics
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   105
      password: metrics
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   106
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   107
  # DNS cache options. The DNS cache may reduce the load on DNS servers
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   108
  # if there is no local caching resolver available for use.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   109
  dns_cache:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   110
    # Whether or not the DNS cache is enabled.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   111
    enabled: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   112
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   113
    # Maximum number of entries to hold in the DNS cache, and
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   114
    # for how long those items should be considered valid in seconds.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   115
    cache_size: 256
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   116
    cache_lifetime: "5m" # 5minutes; see https://pkg.go.dev/time@master#ParseDuration for more
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   117
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   118
# Configuration for the Appservice API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   119
app_service_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   120
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   121
    listen: http://localhost:7777
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   122
    connect: http://localhost:7777
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   123
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   124
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   125
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   126
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   127
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   128
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   129
  # Disable the validation of TLS certificates of appservices. This is
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   130
  # not recommended in production since it may allow appservice traffic
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   131
  # to be sent to an unverified endpoint.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   132
  disable_tls_validation: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   133
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   134
  # Appservice configuration files to load into this homeserver.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   135
  config_files: []
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   136
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   137
# Configuration for the Client API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   138
client_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   139
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   140
    listen: http://localhost:7771
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   141
    connect: http://localhost:7771
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   142
  external_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   143
    listen: http://[::]:8071
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   144
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   145
  # 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
   146
  # using the registration shared secret below.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   147
  registration_disabled: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   148
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   149
  # If set, allows registration by anyone who knows the shared secret, regardless of
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   150
  # whether registration is otherwise disabled.
168
8e61e4bb714b Minor dendrite tweaks.
Luke Hoersten <luke@hoersten.org>
parents: 163
diff changeset
   151
  registration_shared_secret: "{{dendrite_registration_secret}}"
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   152
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   153
  # Whether to require reCAPTCHA for registration.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   154
  enable_registration_captcha: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   155
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   156
  # Settings for ReCAPTCHA.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   157
  recaptcha_public_key: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   158
  recaptcha_private_key: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   159
  recaptcha_bypass_secret: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   160
  recaptcha_siteverify_api: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   161
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   162
  # TURN server information that this homeserver should send to clients.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   163
  turn:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   164
    turn_user_lifetime: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   165
    turn_uris: []
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   166
    turn_shared_secret: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   167
    turn_username: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   168
    turn_password: ""
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
  # Settings for rate-limited endpoints. Rate limiting will kick in after the
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   171
  # threshold number of "slots" have been taken by requests from a specific
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   172
  # host. Each "slot" will be released after the cooloff time in milliseconds.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   173
  rate_limiting:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   174
    enabled: true
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   175
    threshold: 5
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   176
    cooloff_ms: 500
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
# Configuration for the EDU server.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   179
edu_server:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   180
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   181
    listen: http://localhost:7778
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   182
    connect: http://localhost:7778
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   183
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   184
# Configuration for the Federation API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   185
federation_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   186
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   187
    listen: http://localhost:7772
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   188
    connect: http://localhost:7772
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   189
  external_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   190
    listen: http://[::]:8072
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   191
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   192
  # List of paths to X.509 certificates to be used by the external federation listeners.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   193
  # These certificates will be used to calculate the TLS fingerprints and other servers
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   194
  # will expect the certificate to match these fingerprints. Certificates must be in PEM
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   195
  # format.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   196
  federation_certificates: []
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 Federation Sender.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   199
federation_sender:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   200
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   201
    listen: http://localhost:7775
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   202
    connect: http://localhost:7775
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   203
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   204
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   205
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   206
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   207
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   208
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   209
  # How many times we will try to resend a failed transaction to a specific server. The
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   210
  # backoff is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds etc.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   211
  send_max_retries: 16
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   212
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   213
  # Disable the validation of TLS certificates of remote federated homeservers. Do not
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   214
  # enable this option in production as it presents a security risk!
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   215
  disable_tls_validation: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   216
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   217
  # Use the following proxy server for outbound federation traffic.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   218
  proxy_outbound:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   219
    enabled: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   220
    protocol: http
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   221
    host: localhost
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   222
    port: 8080
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   223
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   224
# Configuration for the Key Server (for end-to-end encryption).
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   225
key_server:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   226
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   227
    listen: http://localhost:7779
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   228
    connect: http://localhost:7779
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   229
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   230
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   231
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   232
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   233
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   234
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   235
# Configuration for the Media API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   236
media_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   237
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   238
    listen: http://localhost:7774
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   239
    connect: http://localhost:7774
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   240
  external_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   241
    listen: http://[::]:8074
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   242
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   243
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   244
    max_open_conns: 5
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   245
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   246
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   247
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   248
  # Storage path for uploaded media. May be relative or absolute.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   249
  base_path: ./media_store
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   250
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   251
  # The maximum allowed file size (in bytes) for media uploads to this homeserver
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   252
  # (0 = unlimited). If using a reverse proxy, ensure it allows requests at
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   253
  # least this large (e.g. client_max_body_size in nginx.)
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   254
  max_file_size_bytes: 10485760
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   255
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   256
  # Whether to dynamically generate thumbnails if needed.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   257
  dynamic_thumbnails: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   258
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   259
  # The maximum number of simultaneous thumbnail generators to run.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   260
  max_thumbnail_generators: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   261
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   262
  # A list of thumbnail sizes to be generated for media content.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   263
  thumbnail_sizes:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   264
  - width: 32
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   265
    height: 32
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   266
    method: crop
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   267
  - width: 96
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   268
    height: 96
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   269
    method: crop
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   270
  - width: 640
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   271
    height: 480
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   272
    method: scale
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   273
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   274
# Configuration for experimental MSC's
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   275
mscs:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   276
  # A list of enabled MSC's
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   277
  # Currently valid values are:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   278
  # - msc2836    (Threading, see https://github.com/matrix-org/matrix-doc/pull/2836)
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   279
  # - msc2946    (Spaces Summary, see https://github.com/matrix-org/matrix-doc/pull/2946)
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   280
  mscs: []
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   281
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   282
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   283
    max_open_conns: 5
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   284
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   285
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   286
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   287
# Configuration for the Room Server.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   288
room_server:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   289
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   290
    listen: http://localhost:7770
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   291
    connect: http://localhost:7770
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   292
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   293
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   294
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   295
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   296
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   297
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   298
# Configuration for the Signing Key Server (for server signing keys).
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   299
signing_key_server:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   300
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   301
    listen: http://localhost:7780
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   302
    connect: http://localhost:7780
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   303
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   304
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   305
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   306
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   307
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   308
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   309
  # Perspective keyservers to use as a backup when direct key fetches fail. This may
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   310
  # be required to satisfy key requests for servers that are no longer online when
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   311
  # joining some rooms.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   312
  key_perspectives:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   313
  - server_name: matrix.org
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   314
    keys:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   315
    - key_id: ed25519:auto
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   316
      public_key: Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   317
    - key_id: ed25519:a_RXGa
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   318
      public_key: l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   319
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   320
  # This option will control whether Dendrite will prefer to look up keys directly
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   321
  # or whether it should try perspective servers first, using direct fetches as a
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   322
  # last resort.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   323
  prefer_direct_fetch: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   324
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   325
# Configuration for the Sync API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   326
sync_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   327
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   328
    listen: http://localhost:7773
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   329
    connect: http://localhost:7773
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   330
  external_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   331
    listen: http://[::]:8073
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   332
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   333
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   334
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   335
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   336
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   337
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   338
  # 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
   339
  # 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
   340
  # a reverse proxy server.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   341
  # real_ip_header: X-Real-IP
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   342
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   343
# Configuration for the User API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   344
user_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   345
  # 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
   346
  # See https://pkg.go.dev/golang.org/x/crypto/bcrypt for more information.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   347
  # Setting this lower makes registration/login consume less CPU resources at the cost of security
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   348
  # should the database be compromised. Setting this higher makes registration/login consume more
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   349
  # CPU resources but makes it harder to brute force password hashes.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   350
  # This value can be low if performing tests or on embedded Dendrite instances (e.g WASM builds)
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   351
  # bcrypt_cost: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   352
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   353
    listen: http://localhost:7781
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   354
    connect: http://localhost:7781
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   355
  account_database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   356
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   357
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   358
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   359
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   360
  device_database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   361
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   362
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   363
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   364
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   365
  # 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
   366
  # /_matrix/client/r0/user/{userId}/openid/request_token endpoint
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   367
  # is considered to be valid in milliseconds.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   368
  # The default lifetime is 3600000ms (60 minutes).
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   369
  # openid_token_lifetime_ms: 3600000
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   370
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   371
# Configuration for Opentracing.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   372
# 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
   373
# how this works and how to set it up.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   374
tracing:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   375
  enabled: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   376
  jaeger:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   377
    serviceName: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   378
    disabled: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   379
    rpc_metrics: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   380
    tags: []
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   381
    sampler: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   382
    reporter: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   383
    headers: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   384
    baggage_restrictions: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   385
    throttler: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   386
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   387
# Logging configuration, in addition to the standard logging that is sent to
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   388
# stdout by Dendrite.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   389
logging:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   390
- type: file
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   391
  level: info
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   392
  params:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   393
    path: ./logs