2018-02-03 14:30:08 -05:00
|
|
|
# vim:ft=yaml
|
|
|
|
|
|
|
|
## TLS ##
|
|
|
|
|
2019-02-11 17:15:08 -05:00
|
|
|
{% if not SYNAPSE_NO_TLS %}
|
2019-02-05 08:42:21 -05:00
|
|
|
|
2018-02-03 14:30:08 -05:00
|
|
|
tls_certificate_path: "/data/{{ SYNAPSE_SERVER_NAME }}.tls.crt"
|
|
|
|
tls_private_key_path: "/data/{{ SYNAPSE_SERVER_NAME }}.tls.key"
|
2019-02-05 08:42:21 -05:00
|
|
|
|
|
|
|
{% endif %}
|
2018-02-03 14:30:08 -05:00
|
|
|
|
|
|
|
## Server ##
|
|
|
|
|
|
|
|
server_name: "{{ SYNAPSE_SERVER_NAME }}"
|
|
|
|
pid_file: /homeserver.pid
|
2018-02-08 14:43:45 -05:00
|
|
|
web_client: False
|
2018-02-03 14:30:08 -05:00
|
|
|
soft_file_limit: 0
|
2019-06-27 08:52:40 -04:00
|
|
|
log_config: "{{ SYNAPSE_LOG_CONFIG }}"
|
2018-02-03 14:30:08 -05:00
|
|
|
|
|
|
|
## Ports ##
|
|
|
|
|
|
|
|
listeners:
|
|
|
|
{% if not SYNAPSE_NO_TLS %}
|
|
|
|
-
|
|
|
|
port: 8448
|
2018-10-25 10:36:07 -04:00
|
|
|
bind_addresses: ['::']
|
2018-02-03 14:30:08 -05:00
|
|
|
type: http
|
|
|
|
tls: true
|
|
|
|
x_forwarded: false
|
|
|
|
resources:
|
2018-02-08 14:43:45 -05:00
|
|
|
- names: [client]
|
2018-02-03 14:30:08 -05:00
|
|
|
compress: true
|
|
|
|
- names: [federation] # Federation APIs
|
|
|
|
compress: false
|
|
|
|
{% endif %}
|
|
|
|
|
2021-04-14 08:54:49 -04:00
|
|
|
# Allow configuring in case we want to reverse proxy 8008
|
|
|
|
# using another process in the same container
|
2023-07-11 14:08:06 -04:00
|
|
|
{% if SYNAPSE_USE_UNIX_SOCKET %}
|
|
|
|
# Unix sockets don't care about TLS or IP addresses or ports
|
|
|
|
- path: '/run/main_public.sock'
|
|
|
|
type: http
|
|
|
|
{% else %}
|
2021-04-14 08:54:49 -04:00
|
|
|
- port: {{ SYNAPSE_HTTP_PORT or 8008 }}
|
2018-02-03 14:30:08 -05:00
|
|
|
tls: false
|
2018-10-25 10:36:07 -04:00
|
|
|
bind_addresses: ['::']
|
2018-02-03 14:30:08 -05:00
|
|
|
type: http
|
|
|
|
x_forwarded: false
|
2023-07-11 14:08:06 -04:00
|
|
|
{% endif %}
|
2018-02-03 14:30:08 -05:00
|
|
|
resources:
|
2018-02-08 14:43:45 -05:00
|
|
|
- names: [client]
|
2018-02-03 14:30:08 -05:00
|
|
|
compress: true
|
|
|
|
- names: [federation]
|
|
|
|
compress: false
|
|
|
|
|
|
|
|
## Database ##
|
|
|
|
|
2018-02-04 09:04:26 -05:00
|
|
|
{% if POSTGRES_PASSWORD %}
|
2018-02-04 06:20:29 -05:00
|
|
|
database:
|
|
|
|
name: "psycopg2"
|
|
|
|
args:
|
2018-02-08 14:42:57 -05:00
|
|
|
user: "{{ POSTGRES_USER or "synapse" }}"
|
2018-02-04 09:04:26 -05:00
|
|
|
password: "{{ POSTGRES_PASSWORD }}"
|
2018-02-08 14:42:57 -05:00
|
|
|
database: "{{ POSTGRES_DB or "synapse" }}"
|
2023-07-11 14:08:06 -04:00
|
|
|
{% if not SYNAPSE_USE_UNIX_SOCKET %}
|
|
|
|
{# Synapse will use a default unix socket for Postgres when host/port is not specified (behavior from `psycopg2`). #}
|
2018-02-04 09:04:26 -05:00
|
|
|
host: "{{ POSTGRES_HOST or "db" }}"
|
|
|
|
port: "{{ POSTGRES_PORT or "5432" }}"
|
2023-07-11 14:08:06 -04:00
|
|
|
{% endif %}
|
2023-10-27 13:29:20 -04:00
|
|
|
cp_min: {{ POSTGRES_CP_MIN or 5 }}
|
|
|
|
cp_max: {{ POSTGRES_CP_MAX or 10 }}
|
2018-02-03 14:30:08 -05:00
|
|
|
{% else %}
|
|
|
|
database:
|
|
|
|
name: "sqlite3"
|
|
|
|
args:
|
|
|
|
database: "/data/homeserver.db"
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
## Performance ##
|
|
|
|
|
|
|
|
event_cache_size: "{{ SYNAPSE_EVENT_CACHE_SIZE or "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"
|
2020-10-09 11:58:23 -04:00
|
|
|
max_upload_size: "{{ SYNAPSE_MAX_UPLOAD_SIZE or "50M" }}"
|
2018-02-03 14:30:08 -05:00
|
|
|
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: False
|
|
|
|
max_spider_size: "10M"
|
|
|
|
|
|
|
|
## Captcha ##
|
|
|
|
|
2018-02-05 15:28:15 -05:00
|
|
|
{% if SYNAPSE_RECAPTCHA_PUBLIC_KEY %}
|
|
|
|
recaptcha_public_key: "{{ SYNAPSE_RECAPTCHA_PUBLIC_KEY }}"
|
|
|
|
recaptcha_private_key: "{{ SYNAPSE_RECAPTCHA_PRIVATE_KEY }}"
|
|
|
|
enable_registration_captcha: True
|
|
|
|
recaptcha_siteverify_api: "https://www.google.com/recaptcha/api/siteverify"
|
|
|
|
{% else %}
|
2018-02-03 14:30:08 -05:00
|
|
|
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"
|
2018-02-05 15:28:15 -05:00
|
|
|
{% endif %}
|
2018-02-03 14:30:08 -05:00
|
|
|
|
|
|
|
## Turn ##
|
|
|
|
|
2018-02-05 15:53:53 -05:00
|
|
|
{% if SYNAPSE_TURN_URIS %}
|
|
|
|
turn_uris:
|
2018-02-05 17:13:27 -05:00
|
|
|
{% for uri in SYNAPSE_TURN_URIS.split(',') %} - "{{ uri }}"
|
2018-02-05 15:53:53 -05:00
|
|
|
{% endfor %}
|
|
|
|
turn_shared_secret: "{{ SYNAPSE_TURN_SECRET }}"
|
|
|
|
turn_user_lifetime: "1h"
|
|
|
|
turn_allow_guests: True
|
|
|
|
{% else %}
|
2018-02-03 14:30:08 -05:00
|
|
|
turn_uris: []
|
|
|
|
turn_shared_secret: "YOUR_SHARED_SECRET"
|
|
|
|
turn_user_lifetime: "1h"
|
|
|
|
turn_allow_guests: True
|
2018-02-05 15:53:53 -05:00
|
|
|
{% endif %}
|
2018-02-03 14:30:08 -05:00
|
|
|
|
|
|
|
## Registration ##
|
|
|
|
|
|
|
|
enable_registration: {{ "True" if SYNAPSE_ENABLE_REGISTRATION else "False" }}
|
|
|
|
registration_shared_secret: "{{ SYNAPSE_REGISTRATION_SHARED_SECRET }}"
|
|
|
|
bcrypt_rounds: 12
|
|
|
|
allow_guest_access: {{ "True" if SYNAPSE_ALLOW_GUEST else "False" }}
|
2018-02-08 14:53:12 -05:00
|
|
|
enable_group_creation: true
|
2018-02-03 14:30:08 -05:00
|
|
|
|
|
|
|
|
|
|
|
## Metrics ###
|
|
|
|
|
2018-02-08 14:46:11 -05:00
|
|
|
{% if SYNAPSE_REPORT_STATS.lower() == "yes" %}
|
|
|
|
enable_metrics: True
|
|
|
|
report_stats: True
|
|
|
|
{% else %}
|
2018-02-03 14:30:08 -05:00
|
|
|
enable_metrics: False
|
|
|
|
report_stats: False
|
2018-02-08 14:46:11 -05:00
|
|
|
{% endif %}
|
2018-02-03 14:30:08 -05:00
|
|
|
|
|
|
|
## API Configuration ##
|
|
|
|
|
2018-02-05 17:13:27 -05:00
|
|
|
{% if SYNAPSE_APPSERVICES %}
|
|
|
|
app_service_config_files:
|
|
|
|
{% for appservice in SYNAPSE_APPSERVICES %} - "{{ appservice }}"
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
|
2018-02-03 14:30:08 -05:00
|
|
|
macaroon_secret_key: "{{ SYNAPSE_MACAROON_SECRET_KEY }}"
|
|
|
|
|
|
|
|
## Signing Keys ##
|
|
|
|
|
|
|
|
signing_key_path: "/data/{{ SYNAPSE_SERVER_NAME }}.signing.key"
|
|
|
|
old_signing_keys: {}
|
|
|
|
key_refresh_interval: "1d" # 1 Day.
|
|
|
|
|
|
|
|
# The trusted servers to download signing keys from.
|
2021-01-19 11:19:32 -05:00
|
|
|
trusted_key_servers:
|
|
|
|
- server_name: matrix.org
|
|
|
|
verify_keys:
|
|
|
|
"ed25519:auto": "Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw"
|
2018-02-03 14:30:08 -05:00
|
|
|
|
|
|
|
password_config:
|
|
|
|
enabled: true
|