# vim:ft=yaml
enable_registration: true
enable_registration_without_verification: true
suppress_key_server_warning: true

## TLS ##
#tls_certificate_path: "/data/example.com.tls.crt"
#tls_private_key_path: "/data/example.com.tls.key"

## Server ##
server_name: "matrix.gnatsocks.com"
pid_file: /homeserver.pid
web_client: false
soft_file_limit: 0
log_config: "/data/log.config"
registration_shared_secret: "CHANGE_ME"

## Ports ##
listeners:
  - port: 8448
    bind_addresses: ['::']
    type: http
    tls: false
    x_forwarded: false
    resources:
      - names: [client]
        compress: true
      - names: [federation]
        compress: false
  - port: 8008
    tls: false
    bind_addresses: ['::']
    type: http
    x_forwarded: false
    resources:
      - names: [client]
        compress: true
      - names: [federation]
        compress: false

## Database ##
database:
  name: "sqlite3"
  args:
    database: "/data/homeserver.db"

## Performance ##
event_cache_size: "10K"

## Ratelimiting ##
rc_messages_per_second: 0.2
rc_message_burst_count: 10.0
federation_rc_window_size: 1000
federation_rc_sleep_limit: 10
federation_rc_sleep_delay: 500
federation_rc_reject_limit: 50
federation_rc_concurrent: 3

## Files ##
media_store_path: "/data/media"
max_upload_size: "50M"
max_image_pixels: "32M"
dynamic_thumbnails: false

thumbnail_sizes:
  - width: 32
    height: 32
    method: crop
  - width: 96
    height: 96
    method: crop
  - width: 320
    height: 240
    method: scale
  - width: 640
    height: 480
    method: scale
  - width: 800
    height: 600
    method: scale

url_preview_enabled: false
max_spider_size: "10M"

## Captcha ##
recaptcha_public_key: "YOUR_PUBLIC_KEY"
recaptcha_private_key: "YOUR_PRIVATE_KEY"
enable_registration_captcha: false
recaptcha_siteverify_api: "https://www.google.com/recaptcha/api/siteverify"

## Turn ##
turn_uris: []
turn_shared_secret: "YOUR_SHARED_SECRET"
turn_user_lifetime: "1h"
turn_allow_guests: true

## Registration ##
registration:
  enable_registration: true
  enable_registration_without_verification: true
  suppress_key_server_warning: true
  registration_shared_secret: "3d8ecf4df90cc158da4ee8f486bda2cc58ca412efdcad49b817776e42dfc8735"

bcrypt_rounds: 12
allow_guest_access: false
enable_group_creation: true

## Metrics ##
enable_metrics: true
report_stats: true

## API Configuration ##
macaroon_secret_key: "14b2aa3727f08a2d5a3d563d75079e99a27a96db2ecfdf3ba797b66383f6288c"

## Signing Keys ##
signing_key_path: "/data/example.com.signing.key"
old_signing_keys: {}
key_refresh_interval: "1d"

trusted_key_servers:
  - server_name: matrix.org
    verify_keys:
      "ed25519:auto": "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"

password_config:
  enabled: true
