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