version: 1

global:
  server_name: matrix.unbl.ink
  private_key: /usr/local/etc/dendrite/matrix_key.pem
  key_validity_period: 168h0m0s
  well_known_server_name: "matrix.unbl.ink"
  trusted_third_party_id_servers:
    - matrix.org
    - vector.im

  disable_federation: false

  kafka:
    addresses:
      - localhost:2181
    topic_prefix: Dendrite
    use_naffka: true
    naffka_database:
      connection_string: postgresql://dendrite:{{dendrite_db_pass}}@db.service/dendrite?sslmode=disable
      max_open_conns: 10
      max_idle_conns: 2
      conn_max_lifetime: -1
  metrics:
    enabled: false
    basic_auth:
      username: metrics
      password: metrics
  dns_cache:
    enabled: true
    cache_size: 256
    cache_lifetime: "5m" # 5minutes; see https://pkg.go.dev/time@master#ParseDuration for more

app_service_api:
  internal_api:
    listen: http://0.0.0.0:7777
    connect: http://0.0.0.0:7777
  database:
    connection_string: postgresql://dendrite:{{dendrite_db_pass}}@db.service/dendrite?sslmode=disable
    max_open_conns: 10
    max_idle_conns: 2
    conn_max_lifetime: -1

  disable_tls_validation: false
  config_files: []

client_api:
  internal_api:
    listen: http://0.0.0.0:7771
    connect: http://0.0.0.0:7771
  external_api:
    listen: http://[::]:8071

  registration_disabled: false
  registration_shared_secret: ""
  enable_registration_captcha: false

  recaptcha_public_key: ""
  recaptcha_private_key: ""
  recaptcha_bypass_secret: ""
  recaptcha_siteverify_api: ""

  turn:
    turn_user_lifetime: ""
    turn_uris: []
    turn_shared_secret: ""
    turn_username: ""
    turn_password: ""

  rate_limiting:
    enabled: true
    threshold: 5
    cooloff_ms: 500

edu_server:
  internal_api:
    listen: http://0.0.0.0:7778
    connect: http://0.0.0.0:7778

federation_api:
  internal_api:
    listen: http://0.0.0.0:7772
    connect: http://0.0.0.0:7772
  external_api:
    listen: http://[::]:8072

  federation_certificates: []

federation_sender:
  internal_api:
    listen: http://0.0.0.0:7775
    connect: http://0.0.0.0:7775
  database:
    connection_string: postgresql://dendrite:{{dendrite_db_pass}}@db.service/dendrite?sslmode=disable
    max_open_conns: 10
    max_idle_conns: 2
    conn_max_lifetime: -1

  send_max_retries: 16

  disable_tls_validation: false

  proxy_outbound:
    enabled: false
    protocol: http
    host: localhost
    port: 8080

key_server:
  internal_api:
    listen: http://0.0.0.0:7779
    connect: http://0.0.0.0:7779
  database:
    connection_string: postgresql://dendrite:{{dendrite_db_pass}}@db.service/dendrite?sslmode=disable
    max_open_conns: 10
    max_idle_conns: 2
    conn_max_lifetime: -1

media_api:
  internal_api:
    listen: http://0.0.0.0:7774
    connect: http://0.0.0.0:7774
  external_api:
    listen: http://[::]:8074
  database:
    connection_string: postgresql://dendrite:{{dendrite_db_pass}}@db.service/dendrite?sslmode=disable
    max_open_conns: 5
    max_idle_conns: 2
    conn_max_lifetime: -1

  base_path: /var/dendrite/media

  max_file_size_bytes: 10485760
  dynamic_thumbnails: false
  max_thumbnail_generators: 10
  thumbnail_sizes:
    - width: 32
      height: 32
      method: crop
    - width: 96
      height: 96
      method: crop
    - width: 640
      height: 480
      method: scale

mscs:
  mscs: []
  database:
    connection_string: postgresql://dendrite:{{dendrite_db_pass}}@db.service/dendrite?sslmode=disable
    max_open_conns: 5
    max_idle_conns: 2
    conn_max_lifetime: -1

room_server:
  internal_api:
    listen: http://0.0.0.0:7770
    connect: http://0.0.0.0:7770
  database:
    connection_string: postgresql://dendrite:{{dendrite_db_pass}}@db.service/dendrite?sslmode=disable
    max_open_conns: 10
    max_idle_conns: 2
    conn_max_lifetime: -1

signing_key_server:
  internal_api:
    listen: http://0.0.0.0:7780
    connect: http://0.0.0.0:7780
  database:
    connection_string: postgresql://dendrite:{{dendrite_db_pass}}@db.service/dendrite?sslmode=disable
    max_open_conns: 10
    max_idle_conns: 2
    conn_max_lifetime: -1

  key_perspectives:
    - server_name: matrix.org
      keys:
        - key_id: ed25519:auto
          public_key: Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw
        - key_id: ed25519:a_RXGa
          public_key: l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ

  prefer_direct_fetch: false

sync_api:
  internal_api:
    listen: http://0.0.0.0:7773
    connect: http://0.0.0.0:7773
  external_api:
    listen: http://[::]:8073
  database:
    connection_string: postgresql://dendrite:{{dendrite_db_pass}}@db.service/dendrite?sslmode=disable
    max_open_conns: 10
    max_idle_conns: 2
    conn_max_lifetime: -1

user_api:
  internal_api:
    listen: http://0.0.0.0:7781
    connect: http://0.0.0.0:7781
  account_database:
    connection_string: postgresql://dendrite:{{dendrite_db_pass}}@db.service/dendrite?sslmode=disable
    max_open_conns: 10
    max_idle_conns: 2
    conn_max_lifetime: -1
  device_database:
    connection_string: postgresql://dendrite:{{dendrite_db_pass}}@db.service/dendrite?sslmode=disable
    max_open_conns: 10
    max_idle_conns: 2
    conn_max_lifetime: -1

tracing:
  enabled: false
  jaeger:
    serviceName: ""
    disabled: false
    rpc_metrics: false
    tags: []
    sampler: null
    reporter: null
    headers: null
    baggage_restrictions: null
    throttler: null

logging:
  - type: file
    level: info
    params:
      path: /var/log/
