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