xoxys.matrix/templates/opt/matrix/config/homeserver.yml.j2

224 lines
5.5 KiB
Plaintext
Raw Permalink Normal View History

2019-01-19 00:30:45 +00:00
#jinja2: lstrip_blocks: True
2019-08-12 15:17:48 +00:00
{{ ansible_managed | comment }}
2019-01-19 00:30:45 +00:00
## Server ##
server_name: "{{ matrix_server_url }}"
2019-01-19 00:30:45 +00:00
pid_file: /var/run/homeserver.pid
2019-08-12 15:17:48 +00:00
public_baseurl: "{{ matrix_client_url }}"
2019-01-19 00:30:45 +00:00
presence:
enabled: {{ matrix_presence_enabled | bool | lower }}
2019-08-12 15:17:48 +00:00
require_auth_for_profile_requests: false
allow_public_rooms_without_auth: true
allow_public_rooms_over_federation: true
matrix_default_room_version: "{{ matrix_default_room_version }}"
2019-08-12 15:17:48 +00:00
filter_timeline_limit: {{ matrix_filter_timeline_limit }}
block_non_admin_invites: false
enable_search: true
2019-01-19 00:30:45 +00:00
listeners:
{% if matrix_https_bind_addresses is defined and matrix_https_bind_addresses | length > 0 %}
- type: http
port: {{ matrix_https_bind_port }}
2019-01-21 20:06:06 +00:00
bind_addresses:
{{ matrix_https_bind_addresses | to_nice_yaml | indent(6) }}
2019-08-12 15:24:01 +00:00
{% if matrix_tls_enabled %}
2019-01-19 00:30:45 +00:00
tls: true
2019-08-12 15:24:01 +00:00
{% endif %}
2019-01-19 00:30:45 +00:00
x_forwarded: false
resources:
2019-08-12 15:17:48 +00:00
- names: [client, federation]
2019-01-19 00:30:45 +00:00
compress: false
2021-04-03 14:48:40 +00:00
{% endif %}
{% if matrix_http_bind_addresses is defined and matrix_http_bind_addresses | length > 0 %}
2019-01-19 00:30:45 +00:00
- type: http
port: {{ matrix_http_bind_port }}
2019-01-19 00:30:45 +00:00
tls: false
2019-01-21 21:01:50 +00:00
bind_addresses:
{{ matrix_http_bind_addresses | to_nice_yaml | indent(6) }}
2019-08-12 15:17:48 +00:00
x_forwarded: true
2019-01-19 00:30:45 +00:00
resources:
2019-08-12 15:17:48 +00:00
- names: [client, federation]
2019-01-19 00:30:45 +00:00
compress: false
2021-04-03 14:48:40 +00:00
{% endif %}
2019-08-12 15:24:01 +00:00
{% if matrix_tls_enabled %}
2019-08-12 15:17:48 +00:00
## TLS ##
tls_certificate_path: "{{ matrix_tls_cert_path }}"
tls_private_key_path: "{{ matrix_tls_key_path }}"
federation_verify_certificates: true
federation_client_minimum_tls_version: 1.2
federation_certificate_verification_whitelist: []
2019-08-12 15:24:01 +00:00
{% endif %}
2019-01-19 00:30:45 +00:00
## Caching ##
event_cache_size: "{{ matrix_event_cache_size }}"
caches:
global_factor: {{ matrix_caches_global_factor }}
2019-08-12 15:17:48 +00:00
## Database ##
2019-01-19 00:30:45 +00:00
database:
2019-10-27 14:40:17 +00:00
{% if matrix_db_type == "pgsql" %}
2019-01-19 00:30:45 +00:00
name: psycopg2
txn_limit: {{ matrix_db_txn_limit }}
2019-01-19 02:14:11 +00:00
args:
2019-10-27 14:40:17 +00:00
user: {{ matrix_db_user }}
password: {{ matrix_db_password }}
dbname: {{ matrix_db_name }}
host: {{ matrix_db_server }}
port: {{ matrix_db_port }}
sslmode: {{ matrix_db_ssl_mode }}
sslrootcert: {{ matrix_db_ssl_root_cert }}
2019-01-19 02:14:11 +00:00
cp_min: 5
cp_max: 10
2019-01-19 00:30:45 +00:00
{% else %}
name: "sqlite3"
args:
database: "{{ matrix_data_dir }}/homeserver.db"
{% endif %}
2019-08-12 15:17:48 +00:00
## Logging ##
2019-01-19 00:30:45 +00:00
# A yaml python logging config file
2019-01-19 14:06:56 +00:00
log_config: "{{ matrix_conf_dir }}/logging.config"
2019-01-19 00:30:45 +00:00
## Ratelimiting ##
2019-08-12 15:17:48 +00:00
rc_message:
per_second: 0.2
burst_count: 10
rc_registration:
per_second: 0.17
burst_count: 3
rc_login:
address:
2019-11-06 20:55:41 +00:00
per_second: {{ matrix_rc_login_address.per_second | default(0.17) }}
burst_count: {{ matrix_rc_login_address.burst_count | default(3) }}
2019-08-12 15:17:48 +00:00
account:
2019-11-06 20:55:41 +00:00
per_second: {{ matrix_rc_login_account.per_second | default(0.17) }}
burst_count: {{ matrix_rc_login_account.burst_count | default(3) }}
2019-08-12 15:17:48 +00:00
failed_attempts:
per_second: 0.17
burst_count: 3
rc_federation:
window_size: 1000
sleep_limit: 10
sleep_delay: 500
reject_limit: 50
concurrent: 3
2019-01-19 00:30:45 +00:00
## Media Store ##
2019-01-19 00:30:45 +00:00
media_store_path: "{{ matrix_data_dir }}/media_store"
2019-08-12 15:17:48 +00:00
max_upload_size: 10M
max_image_pixels: 32M
2019-01-19 00:30:45 +00:00
dynamic_thumbnails: false
thumbnail_sizes:
2019-08-12 15:17:48 +00:00
- 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' if matrix_url_preview_enabled else 'false' }}
2019-08-11 22:41:13 +00:00
{% if matrix_url_preview_ip_blacklist is defined %}
2019-01-21 20:03:18 +00:00
url_preview_ip_range_blacklist:
2019-08-12 15:38:20 +00:00
{{ matrix_url_preview_ip_blacklist | to_nice_yaml | indent(2) }}
2019-01-21 20:03:18 +00:00
{% endif %}
{% if matrix_url_preview_url_blacklist is defined %}
url_preview_url_blacklist:
2019-08-12 15:38:20 +00:00
{{ matrix_url_preview_url_blacklist | to_nice_yaml | indent(2) }}
2019-01-21 20:03:18 +00:00
{% endif %}
2019-01-19 00:30:45 +00:00
2019-01-21 20:03:18 +00:00
max_spider_size: "{{ matrix_url_preview_max_spider_size }}"
2019-01-19 00:30:45 +00:00
## Captcha ##
2019-08-12 15:17:48 +00:00
enable_registration_captcha: false
2019-01-19 00:30:45 +00:00
## Registration ##
2019-08-12 15:17:48 +00:00
enable_registration: false
2019-01-19 00:30:45 +00:00
bcrypt_rounds: 12
2019-08-12 15:17:48 +00:00
allow_guest_access: false
default_identity_server: https://matrix.org
2019-01-19 00:30:45 +00:00
## Metrics ###
enable_metrics: false
2019-08-12 15:17:48 +00:00
report_stats: false
2019-01-19 00:30:45 +00:00
## API Configuration ##
2019-08-12 15:50:21 +00:00
macaroon_secret_key: "{{ matrix_macaroon_secret_key }}"
form_secret: "{{ matrix_form_secret }}"
2019-01-19 00:30:45 +00:00
## Signing Keys ##
signing_key_path: "{{ matrix_conf_dir }}/{{ matrix_server_url }}.signing.key"
2019-08-12 15:17:48 +00:00
key_refresh_interval: 1d
2019-01-19 00:30:45 +00:00
suppress_key_server_warning: {{ matrix_suppress_key_server_warning | bool | lower }}
2019-08-12 15:17:48 +00:00
trusted_key_servers:
- server_name: "matrix.org"
2019-08-11 23:27:42 +00:00
2019-01-19 00:30:45 +00:00
password_config:
2019-08-12 15:17:48 +00:00
enabled: true
{% if matrix_ldap_auth_enabled %}
2019-01-19 00:30:45 +00:00
2019-08-12 15:17:48 +00:00
password_providers:
- module: "ldap_auth_provider.LdapAuthProvider"
config:
enabled: true
uri: "{{ matrix_ldap_auth_server }}"
start_tls: "{{ matrix_ldap_auth_use_starttls }}"
base: "{{ matrix_ldap_auth_basedn }}"
attributes:
uid: "{{ matrix_ldap_auth_uid_attr }}"
mail: "{{ matrix_ldap_auth_mail_attr }}"
name: "{{ matrix_ldap_auth_name_attr }}"
{% if matrix_ldap_auth_binddn is defined %}
bind_dn: "{{ matrix_ldap_auth_binddn }}"
{% endif %}
{% if matrix_ldap_auth_bind_password is defined %}
bind_password: "{{ matrix_ldap_auth_bind_password }}"
{% endif %}
{% if matrix_ldap_auth_filter is defined %}
filter: "{{ matrix_ldap_auth_filter }}"
{% endif %}
{% endif %}
2019-01-19 00:30:45 +00:00
## Rooms ##
2019-01-19 00:30:45 +00:00
enable_group_creation: false
2019-08-12 15:17:48 +00:00
enable_room_list_search: true
2019-01-19 00:30:45 +00:00
alias_creation_rules:
2019-08-12 15:17:48 +00:00
- user_id: "*"
alias: "*"
room_id: "*"
action: allow
room_list_publication_rules:
- user_id: "*"
alias: "*"
room_id: "*"
action: allow
## Opentracing ##
opentracing:
enabled: false