dendrite/server/templates/dendrite.yaml.j2
author Luke Hoersten <luke@hoersten.org>
Sun, 18 Jul 2021 20:26:54 -0500
changeset 165 00e0af8e76a4
parent 163 40b78af86337
child 168 8e61e4bb714b
permissions -rw-r--r--
Fixed backup script error.
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.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    47
  old_private_keys:
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
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    50
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    51
  # 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
    52
  # 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
    53
  # 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
    54
  # considered valid by other homeservers.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    55
  key_validity_period: 168h0m0s
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    56
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    57
  # 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
    58
  # party identifiers such as phone numbers and email addresses.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    59
  trusted_third_party_id_servers:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    60
  - matrix.org
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    61
  - vector.im
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    62
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    63
  # 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
    64
  # to other servers and the federation API will not be exposed.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    65
  disable_federation: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    66
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    67
  # Configuration for Kafka/Naffka.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    68
  kafka:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    69
    # 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
    70
    # Naffka in monolith mode.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    71
    addresses:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    72
      - localhost:2181
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    73
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    74
    # 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
    75
    # 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
    76
    topic_prefix: Dendrite
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    77
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    78
    # 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
    79
    # 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
    80
    # Kafka.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    81
    use_naffka: true
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    82
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    83
    # The max size a Kafka message is allowed to use.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    84
    # 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
    85
    # Must be less than/equal to "max.message.bytes" configured in Kafka.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    86
    # Defaults to 8388608 bytes.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    87
    # max_message_bytes: 8388608
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    88
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    89
    # Naffka database options. Not required when using Kafka.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    90
    naffka_database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    91
      connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    92
      max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    93
      max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    94
      conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    95
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    96
  # Configuration for Prometheus metric collection.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    97
  metrics:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    98
    # Whether or not Prometheus metrics are enabled.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    99
    enabled: true
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   100
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   101
    # HTTP basic authentication to protect access to monitoring.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   102
    basic_auth:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   103
      username: metrics
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   104
      password: metrics
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   105
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   106
  # 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
   107
  # if there is no local caching resolver available for use.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   108
  dns_cache:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   109
    # Whether or not the DNS cache is enabled.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   110
    enabled: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   111
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   112
    # Maximum number of entries to hold in the DNS cache, and
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   113
    # for how long those items should be considered valid in seconds.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   114
    cache_size: 256
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   115
    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
   116
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   117
# Configuration for the Appservice API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   118
app_service_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   119
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   120
    listen: http://localhost:7777
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   121
    connect: http://localhost:7777
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   122
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   123
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   124
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   125
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   126
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   127
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   128
  # Disable the validation of TLS certificates of appservices. This is
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   129
  # not recommended in production since it may allow appservice traffic
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   130
  # to be sent to an unverified endpoint.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   131
  disable_tls_validation: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   132
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   133
  # Appservice configuration files to load into this homeserver.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   134
  config_files: []
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   135
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   136
# Configuration for the Client API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   137
client_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   138
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   139
    listen: http://localhost:7771
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   140
    connect: http://localhost:7771
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   141
  external_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   142
    listen: http://[::]:8071
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   143
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   144
  # 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
   145
  # using the registration shared secret below.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   146
  registration_disabled: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   147
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   148
  # 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
   149
  # whether registration is otherwise disabled.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   150
  registration_shared_secret: ""
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
  # Whether to require reCAPTCHA for registration.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   153
  enable_registration_captcha: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   154
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   155
  # Settings for ReCAPTCHA.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   156
  recaptcha_public_key: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   157
  recaptcha_private_key: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   158
  recaptcha_bypass_secret: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   159
  recaptcha_siteverify_api: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   160
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   161
  # TURN server information that this homeserver should send to clients.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   162
  turn:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   163
    turn_user_lifetime: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   164
    turn_uris: []
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   165
    turn_shared_secret: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   166
    turn_username: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   167
    turn_password: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   168
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   169
  # Settings for rate-limited endpoints. Rate limiting will kick in after the
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   170
  # threshold number of "slots" have been taken by requests from a specific
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   171
  # host. Each "slot" will be released after the cooloff time in milliseconds.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   172
  rate_limiting:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   173
    enabled: true
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   174
    threshold: 5
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   175
    cooloff_ms: 500
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   176
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   177
# Configuration for the EDU server.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   178
edu_server:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   179
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   180
    listen: http://localhost:7778
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   181
    connect: http://localhost:7778
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   182
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   183
# Configuration for the Federation API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   184
federation_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   185
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   186
    listen: http://localhost:7772
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   187
    connect: http://localhost:7772
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   188
  external_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   189
    listen: http://[::]:8072
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   190
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   191
  # 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
   192
  # 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
   193
  # 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
   194
  # format.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   195
  federation_certificates: []
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   196
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   197
# Configuration for the Federation Sender.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   198
federation_sender:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   199
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   200
    listen: http://localhost:7775
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   201
    connect: http://localhost:7775
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   202
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   203
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   204
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   205
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   206
    conn_max_lifetime: -1
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
  # 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
   209
  # 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
   210
  send_max_retries: 16
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   211
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   212
  # Disable the validation of TLS certificates of remote federated homeservers. Do not
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   213
  # enable this option in production as it presents a security risk!
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   214
  disable_tls_validation: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   215
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   216
  # Use the following proxy server for outbound federation traffic.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   217
  proxy_outbound:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   218
    enabled: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   219
    protocol: http
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   220
    host: localhost
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   221
    port: 8080
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   222
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   223
# Configuration for the Key Server (for end-to-end encryption).
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   224
key_server:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   225
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   226
    listen: http://localhost:7779
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   227
    connect: http://localhost:7779
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   228
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   229
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   230
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   231
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   232
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   233
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   234
# Configuration for the Media API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   235
media_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   236
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   237
    listen: http://localhost:7774
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   238
    connect: http://localhost:7774
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   239
  external_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   240
    listen: http://[::]:8074
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   241
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   242
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   243
    max_open_conns: 5
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   244
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   245
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   246
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   247
  # Storage path for uploaded media. May be relative or absolute.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   248
  base_path: ./media_store
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   249
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   250
  # 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
   251
  # (0 = unlimited). If using a reverse proxy, ensure it allows requests at
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   252
  # least this large (e.g. client_max_body_size in nginx.)
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   253
  max_file_size_bytes: 10485760
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
  # Whether to dynamically generate thumbnails if needed.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   256
  dynamic_thumbnails: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   257
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   258
  # The maximum number of simultaneous thumbnail generators to run.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   259
  max_thumbnail_generators: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   260
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   261
  # A list of thumbnail sizes to be generated for media content.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   262
  thumbnail_sizes:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   263
  - width: 32
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   264
    height: 32
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   265
    method: crop
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   266
  - width: 96
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   267
    height: 96
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   268
    method: crop
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   269
  - width: 640
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   270
    height: 480
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   271
    method: scale
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   272
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   273
# Configuration for experimental MSC's
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   274
mscs:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   275
  # A list of enabled MSC's
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   276
  # Currently valid values are:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   277
  # - msc2836    (Threading, see https://github.com/matrix-org/matrix-doc/pull/2836)
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   278
  # - 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
   279
  mscs: []
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   280
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   281
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   282
    max_open_conns: 5
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   283
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   284
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   285
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   286
# Configuration for the Room Server.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   287
room_server:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   288
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   289
    listen: http://localhost:7770
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   290
    connect: http://localhost:7770
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   291
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   292
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   293
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   294
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   295
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   296
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   297
# Configuration for the Signing Key Server (for server signing keys).
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   298
signing_key_server:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   299
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   300
    listen: http://localhost:7780
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   301
    connect: http://localhost:7780
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   302
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   303
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   304
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   305
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   306
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   307
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   308
  # 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
   309
  # 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
   310
  # joining some rooms.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   311
  key_perspectives:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   312
  - server_name: matrix.org
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   313
    keys:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   314
    - key_id: ed25519:auto
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   315
      public_key: Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   316
    - key_id: ed25519:a_RXGa
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   317
      public_key: l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   318
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   319
  # 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
   320
  # 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
   321
  # last resort.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   322
  prefer_direct_fetch: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   323
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   324
# Configuration for the Sync API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   325
sync_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   326
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   327
    listen: http://localhost:7773
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   328
    connect: http://localhost:7773
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   329
  external_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   330
    listen: http://[::]:8073
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   331
  database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   332
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   333
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   334
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   335
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   336
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   337
  # 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
   338
  # 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
   339
  # a reverse proxy server.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   340
  # real_ip_header: X-Real-IP
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   341
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   342
# Configuration for the User API.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   343
user_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   344
  # 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
   345
  # 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
   346
  # 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
   347
  # 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
   348
  # CPU resources but makes it harder to brute force password hashes.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   349
  # 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
   350
  # bcrypt_cost: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   351
  internal_api:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   352
    listen: http://localhost:7781
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   353
    connect: http://localhost:7781
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   354
  account_database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   355
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   356
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   357
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   358
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   359
  device_database:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   360
    connection_string: "postgres://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}"
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   361
    max_open_conns: 10
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   362
    max_idle_conns: 2
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   363
    conn_max_lifetime: -1
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   364
  # 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
   365
  # /_matrix/client/r0/user/{userId}/openid/request_token endpoint
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   366
  # is considered to be valid in milliseconds.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   367
  # The default lifetime is 3600000ms (60 minutes).
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   368
  # openid_token_lifetime_ms: 3600000
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   369
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   370
# Configuration for Opentracing.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   371
# 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
   372
# how this works and how to set it up.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   373
tracing:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   374
  enabled: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   375
  jaeger:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   376
    serviceName: ""
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   377
    disabled: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   378
    rpc_metrics: false
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   379
    tags: []
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   380
    sampler: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   381
    reporter: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   382
    headers: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   383
    baggage_restrictions: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   384
    throttler: null
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   385
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   386
# Logging configuration, in addition to the standard logging that is sent to
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   387
# stdout by Dendrite.
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   388
logging:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   389
- type: file
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   390
  level: info
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   391
  params:
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
   392
    path: ./logs