Skip to content
homeserver.yaml.example 4.1 KiB
Newer Older
ecobytes collective's avatar
ecobytes collective committed
# vim:ft=yaml

# See https://github.com/matrix-org/synapse/blob/master/docs/sample_config.yaml

## TLS ##



## Server ##

server_name: "matrix.allmende.io"
pid_file: /homeserver.pid
web_client: False
soft_file_limit: 0
log_config: "/data/log.config"
public_baseurl: https://matrix.allmende.io/

federation_ip_range_blacklist:
  - '127.0.0.0/8'
  - '10.0.0.0/8'
  - '172.16.0.0/12'
  - '192.168.0.0/16'
  - '100.64.0.0/10'
  - '169.254.0.0/16'
  - '::1/128'
  - 'fe80::/64'
  - 'fc00::/7'

## Ports ##

listeners:


  - port: 8008
    tls: false
    bind_addresses: ['::']
    type: http
    x_forwarded: true

    resources:
      - names: [client, consent]
        compress: true
      - names: [federation]
        compress: false

## Database ##


database:
  name: "psycopg2"
  args:
    user: "matrix"
    password: "POSTGRES_PASSWORD"
    database: "matrix"
    host: "data"
    port: "5432"
    cp_min: 5
    cp_max: 10


## Performance ##

event_cache_size: "10K"

## Ratelimiting ##

# Using defaults

## Files ##

media_store_path: "/data/media"
uploads_path: "/data/uploads"
max_upload_size: "50M"
max_image_pixels: "32M"
dynamic_thumbnails: false

# List of thumbnail to precalculate when an image is uploaded.
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: True
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:matrix.allmende.io:3478?transport=udp"
    - "turn:matrix.allmende.io:3478?transport=tcp"
    - "turn:matrix.allmende.io:3479?transport=udp"
    - "turn:matrix.allmende.io:3479?transport=tcp"
    - "turn:matrix.allmende.io:5349?transport=udp"
    - "turn:matrix.allmende.io:5349?transport=tcp"
    - "turn:matrix.allmende.io:5350?transport=udp"
    - "turn:matrix.allmende.io:5350?transport=tcp"

turn_shared_secret: "TURN_SHARED_SECRET"
turn_user_lifetime: "1h"
turn_allow_guests: True


## Registration ##

enable_registration: True
registration_shared_secret: "REGISTRATION_SHARED_SECRET"
bcrypt_rounds: 12
allow_guest_access: True
enable_group_creation: true

# The list of identity servers trusted to verify third party
# identifiers by this server.
#
# Also defines the ID server which will be called when an account is
# deactivated (one will be picked arbitrarily).
trusted_third_party_id_servers:
    - matrix.org
    - vector.im

## Metrics ###


enable_metrics: True
report_stats: True


## API Configuration ##

room_invite_state_types:
    - "m.room.join_rules"
    - "m.room.canonical_alias"
    - "m.room.avatar"
    - "m.room.encryption"
    - "m.room.name"


app_service_config_files:
    - "/data/appservices/gitter-registration.yaml"
    - "/data/appservices/appservice-dimension-jQtnPd3WGyuFQGvalwL714Za8.yaml"
    - "/data/appservices/mautrix.yaml"



macaroon_secret_key: "MACROON_SECRET_KEY"
expire_access_token: False

## Signing Keys ##

signing_key_path: "/data/matrix.allmende.io.signing.key"
old_signing_keys: {}
key_refresh_interval: "1d" # 1 Day.

# The trusted servers to download signing keys from.
trusted_key_servers:
  - server_name: "matrix.org"
    verify_keys:
      "ed25519:auto": "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"

password_config:
  enabled: true

email:
  enable_notifs: true
  smtp_host: "email.ecobytes.net"
  smtp_port: "587"
  notif_from: "%(app) <user@host>"
  smtp_user: ""
  smtp_pass: ""

  app_name: Matrix

  notif_for_new_users: true

  riot_base_url: "https://riot.allmende.io"

trust_identity_server_for_password_resets: true

# If set to 'false', requires authentication to access the server's public rooms
# directory through the client API. Defaults to 'true'.
#
allow_public_rooms_without_auth: true

# If set to 'false', forbids any other homeserver to fetch the server's public
# rooms directory via federation. Defaults to 'true'.
#
allow_public_rooms_over_federation: true