author | Luke Hoersten <luke@hoersten.org> |
Sun, 06 Nov 2022 22:03:27 -0600 | |
changeset 202 | 252069788104 |
parent 194 | d1e44e23f48e |
child 203 | 4be395f0d127 |
permissions | -rw-r--r-- |
163 | 1 |
# This is the Dendrite configuration file. |
2 |
# |
|
3 |
# The configuration is split up into sections - each Dendrite component has a |
|
4 |
# configuration section, in addition to the "global" section which applies to |
|
5 |
# all components. |
|
6 |
||
7 |
# The version of the configuration file. |
|
180 | 8 |
version: 2 |
163 | 9 |
|
10 |
# Global Matrix configuration. This configuration applies to all components. |
|
11 |
global: |
|
12 |
# The domain name of this homeserver. |
|
13 |
server_name: {{dendrite_name}} |
|
14 |
||
15 |
# The path to the signing private key file, used to sign requests and events. |
|
16 |
# Note that this is NOT the same private key as used for TLS! To generate a |
|
17 |
# signing key, use "./bin/generate-keys --private-key matrix_key.pem". |
|
18 |
private_key: matrix_key.pem |
|
19 |
||
20 |
# The paths and expiry timestamps (as a UNIX timestamp in millisecond precision) |
|
21 |
# to old signing private keys that were formerly in use on this domain. These |
|
22 |
# keys will not be used for federation request or event signing, but will be |
|
23 |
# provided to any other homeserver that asks when trying to verify old events. |
|
180 | 24 |
old_private_keys: |
25 |
{% if dendrite_old_key %}- private_key: old_matrix_key.pem |
|
26 |
expired_at: 1626538450 |
|
174 | 27 |
{% endif %} |
163 | 28 |
|
29 |
# How long a remote server can cache our server signing key before requesting it |
|
30 |
# again. Increasing this number will reduce the number of requests made by other |
|
31 |
# servers for our key but increases the period that a compromised key will be |
|
32 |
# considered valid by other homeservers. |
|
33 |
key_validity_period: 168h0m0s |
|
34 |
||
180 | 35 |
# Global database connection pool, for PostgreSQL monolith deployments only. If |
36 |
# this section is populated then you can omit the "database" blocks in all other |
|
37 |
# sections. For polylith deployments, or monolith deployments using SQLite databases, |
|
38 |
# you must configure the "database" block for each component instead. |
|
39 |
database: |
|
40 |
connection_string: postgresql://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}?sslmode=disable |
|
41 |
max_open_conns: 100 |
|
42 |
max_idle_conns: 5 |
|
43 |
conn_max_lifetime: -1 |
|
44 |
||
45 |
# The server name to delegate server-server communications to, with optional port |
|
46 |
# e.g. localhost:443 |
|
47 |
well_known_server_name: "" |
|
48 |
||
163 | 49 |
# Lists of domains that the server will trust as identity servers to verify third |
50 |
# party identifiers such as phone numbers and email addresses. |
|
51 |
trusted_third_party_id_servers: |
|
180 | 52 |
- matrix.org |
53 |
- vector.im |
|
163 | 54 |
|
180 | 55 |
# Disables federation. Dendrite will not be able to communicate with other servers |
56 |
# in the Matrix federation and the federation API will not be exposed. |
|
163 | 57 |
disable_federation: false |
58 |
||
180 | 59 |
# Configures the handling of presence events. Inbound controls whether we receive |
60 |
# presence events from other servers, outbound controls whether we send presence |
|
61 |
# events for our local users to other servers. |
|
62 |
presence: |
|
63 |
enable_inbound: false |
|
64 |
enable_outbound: false |
|
163 | 65 |
|
180 | 66 |
# Configures phone-home statistics reporting. These statistics contain the server |
67 |
# name, number of active users and some information on your deployment config. |
|
68 |
# We use this information to understand how Dendrite is being used in the wild. |
|
69 |
report_stats: |
|
70 |
enabled: false |
|
71 |
endpoint: https://matrix.org/report-usage-stats/push |
|
163 | 72 |
|
180 | 73 |
# Server notices allows server admins to send messages to all users on the server. |
74 |
server_notices: |
|
75 |
enabled: false |
|
76 |
# The local part, display name and avatar URL (as a mxc:// URL) for the user that |
|
77 |
# will send the server notices. These are visible to all users on the deployment. |
|
78 |
local_part: "_server" |
|
79 |
display_name: "Server Alerts" |
|
80 |
avatar_url: "" |
|
81 |
# The room name to be used when sending server notices. This room name will |
|
82 |
# appear in user clients. |
|
83 |
room_name: "Server Alerts" |
|
163 | 84 |
|
180 | 85 |
# Configuration for NATS JetStream |
86 |
jetstream: |
|
87 |
# A list of NATS Server addresses to connect to. If none are specified, an |
|
88 |
# internal NATS server will be started automatically when running Dendrite in |
|
89 |
# monolith mode. For polylith deployments, it is required to specify the address |
|
90 |
# of at least one NATS Server node. |
|
91 |
addresses: |
|
92 |
# - localhost:4222 |
|
163 | 93 |
|
180 | 94 |
# Persistent directory to store JetStream streams in. This directory should be |
95 |
# preserved across Dendrite restarts. |
|
96 |
storage_path: ./ |
|
97 |
||
98 |
# The prefix to use for stream names for this homeserver - really only useful |
|
99 |
# if you are running more than one Dendrite server on the same NATS deployment. |
|
100 |
topic_prefix: Dendrite |
|
163 | 101 |
|
102 |
# Configuration for Prometheus metric collection. |
|
103 |
metrics: |
|
104 |
enabled: true |
|
105 |
basic_auth: |
|
106 |
username: metrics |
|
107 |
password: metrics |
|
108 |
||
180 | 109 |
# Optional DNS cache. The DNS cache may reduce the load on DNS servers if there |
110 |
# is no local caching resolver available for use. |
|
163 | 111 |
dns_cache: |
112 |
enabled: false |
|
113 |
cache_size: 256 |
|
180 | 114 |
cache_lifetime: "5m" # 5 minutes; https://pkg.go.dev/time@master#ParseDuration |
163 | 115 |
|
116 |
# Configuration for the Appservice API. |
|
117 |
app_service_api: |
|
118 |
# Disable the validation of TLS certificates of appservices. This is |
|
119 |
# not recommended in production since it may allow appservice traffic |
|
180 | 120 |
# to be sent to an insecure endpoint. |
163 | 121 |
disable_tls_validation: false |
122 |
||
123 |
# Appservice configuration files to load into this homeserver. |
|
180 | 124 |
config_files: |
125 |
# - /path/to/appservice_registration.yaml |
|
163 | 126 |
|
127 |
# Configuration for the Client API. |
|
128 |
client_api: |
|
129 |
# Prevents new users from being able to register on this homeserver, except when |
|
130 |
# using the registration shared secret below. |
|
180 | 131 |
registration_disabled: true |
163 | 132 |
|
180 | 133 |
# Prevents new guest accounts from being created. Guest registration is also |
134 |
# disabled implicitly by setting 'registration_disabled' above. |
|
135 |
guests_disabled: true |
|
136 |
||
137 |
# If set, allows registration by anyone who knows the shared secret, regardless |
|
138 |
# of whether registration is otherwise disabled. |
|
168 | 139 |
registration_shared_secret: "{{dendrite_registration_secret}}" |
163 | 140 |
|
180 | 141 |
# Whether to require reCAPTCHA for registration. If you have enabled registration |
142 |
# then this is HIGHLY RECOMMENDED to reduce the risk of your homeserver being used |
|
143 |
# for coordinated spam attacks. |
|
144 |
enable_registration_captcha: {{dendrite_recaptcha_enable}} |
|
163 | 145 |
|
146 |
# Settings for ReCAPTCHA. |
|
180 | 147 |
recaptcha_public_key: "{{dendrite_recaptcha_public_key}}" |
148 |
recaptcha_private_key: "{{dendrite_recaptcha_private_key}}" |
|
149 |
recaptcha_bypass_secret: "{{dendrite_recaptcha_bypass_secret}}" |
|
150 |
recaptcha_siteverify_api: "{{dendrite_recaptcha_siteverify_api}}" |
|
163 | 151 |
|
152 |
# TURN server information that this homeserver should send to clients. |
|
153 |
turn: |
|
154 |
turn_user_lifetime: "" |
|
180 | 155 |
turn_uris: |
156 |
# - turn:turn.server.org?transport=udp |
|
157 |
# - turn:turn.server.org?transport=tcp |
|
163 | 158 |
turn_shared_secret: "" |
159 |
turn_username: "" |
|
160 |
turn_password: "" |
|
161 |
||
180 | 162 |
# Settings for rate-limited endpoints. Rate limiting kicks in after the threshold |
163 |
# number of "slots" have been taken by requests from a specific host. Each "slot" |
|
164 |
# will be released after the cooloff time in milliseconds. |
|
163 | 165 |
rate_limiting: |
166 |
enabled: true |
|
167 |
threshold: 5 |
|
168 |
cooloff_ms: 500 |
|
169 |
||
170 |
# Configuration for the Federation API. |
|
171 |
federation_api: |
|
172 |
# How many times we will try to resend a failed transaction to a specific server. The |
|
180 | 173 |
# backoff is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds etc. Once |
174 |
# the max retries are exceeded, Dendrite will no longer try to send transactions to |
|
175 |
# that server until it comes back to life and connects to us again. |
|
163 | 176 |
send_max_retries: 16 |
177 |
||
178 |
# Disable the validation of TLS certificates of remote federated homeservers. Do not |
|
179 |
# enable this option in production as it presents a security risk! |
|
180 |
disable_tls_validation: false |
|
181 |
||
180 | 182 |
# Perspective keyservers to use as a backup when direct key fetches fail. This may |
183 |
# be required to satisfy key requests for servers that are no longer online when |
|
184 |
# joining some rooms. |
|
185 |
key_perspectives: |
|
186 |
- server_name: matrix.org |
|
187 |
keys: |
|
188 |
- key_id: ed25519:auto |
|
189 |
public_key: Noi6WqcDj0QmPxCNQqgezwTlBKrfqehY1u2FyWP9uYw |
|
190 |
- key_id: ed25519:a_RXGa |
|
191 |
public_key: l8Hft5qXKn1vfHrg3p4+W8gELQVo8N13JkluMfmn2sQ |
|
163 | 192 |
|
180 | 193 |
# This option will control whether Dendrite will prefer to look up keys directly |
194 |
# or whether it should try perspective servers first, using direct fetches as a |
|
195 |
# last resort. |
|
196 |
prefer_direct_fetch: false |
|
163 | 197 |
|
198 |
# Configuration for the Media API. |
|
199 |
media_api: |
|
200 |
# Storage path for uploaded media. May be relative or absolute. |
|
201 |
base_path: ./media_store |
|
202 |
||
203 |
# The maximum allowed file size (in bytes) for media uploads to this homeserver |
|
180 | 204 |
# (0 = unlimited). If using a reverse proxy, ensure it allows requests at least |
205 |
#this large (e.g. the client_max_body_size setting in nginx). |
|
163 | 206 |
max_file_size_bytes: 10485760 |
207 |
||
208 |
# Whether to dynamically generate thumbnails if needed. |
|
209 |
dynamic_thumbnails: false |
|
210 |
||
211 |
# The maximum number of simultaneous thumbnail generators to run. |
|
212 |
max_thumbnail_generators: 10 |
|
213 |
||
214 |
# A list of thumbnail sizes to be generated for media content. |
|
215 |
thumbnail_sizes: |
|
180 | 216 |
- width: 32 |
217 |
height: 32 |
|
218 |
method: crop |
|
219 |
- width: 96 |
|
220 |
height: 96 |
|
221 |
method: crop |
|
222 |
- width: 640 |
|
223 |
height: 480 |
|
224 |
method: scale |
|
163 | 225 |
|
180 | 226 |
# Configuration for enabling experimental MSCs on this homeserver. |
227 |
mscs: |
|
228 |
mscs: |
|
194
d1e44e23f48e
Enabled experimental spaces and threading features in dendrite.
Luke Hoersten <luke@hoersten.org>
parents:
181
diff
changeset
|
229 |
- msc2836 # (Threading, see https://github.com/matrix-org/matrix-doc/pull/2836) |
d1e44e23f48e
Enabled experimental spaces and threading features in dendrite.
Luke Hoersten <luke@hoersten.org>
parents:
181
diff
changeset
|
230 |
- msc2946 # (Spaces Summary, see https://github.com/matrix-org/matrix-doc/pull/2946) |
163 | 231 |
|
232 |
# Configuration for the Sync API. |
|
233 |
sync_api: |
|
234 |
# This option controls which HTTP header to inspect to find the real remote IP |
|
235 |
# address of the client. This is likely required if Dendrite is running behind |
|
236 |
# a reverse proxy server. |
|
237 |
# real_ip_header: X-Real-IP |
|
238 |
||
239 |
# Configuration for the User API. |
|
240 |
user_api: |
|
241 |
# The cost when hashing passwords on registration/login. Default: 10. Min: 4, Max: 31 |
|
242 |
# See https://pkg.go.dev/golang.org/x/crypto/bcrypt for more information. |
|
180 | 243 |
# Setting this lower makes registration/login consume less CPU resources at the cost |
244 |
# of security should the database be compromised. Setting this higher makes registration/login |
|
245 |
# consume more CPU resources but makes it harder to brute force password hashes. This value |
|
246 |
# can be lowered if performing tests or on embedded Dendrite instances (e.g WASM builds). |
|
247 |
bcrypt_cost: 10 |
|
248 |
||
163 | 249 |
# The length of time that a token issued for a relying party from |
250 |
# /_matrix/client/r0/user/{userId}/openid/request_token endpoint |
|
251 |
# is considered to be valid in milliseconds. |
|
252 |
# The default lifetime is 3600000ms (60 minutes). |
|
253 |
# openid_token_lifetime_ms: 3600000 |
|
254 |
||
255 |
# Configuration for Opentracing. |
|
256 |
# See https://github.com/matrix-org/dendrite/tree/master/docs/tracing for information on |
|
257 |
# how this works and how to set it up. |
|
258 |
tracing: |
|
259 |
enabled: false |
|
260 |
jaeger: |
|
261 |
serviceName: "" |
|
262 |
disabled: false |
|
263 |
rpc_metrics: false |
|
264 |
tags: [] |
|
265 |
sampler: null |
|
266 |
reporter: null |
|
267 |
headers: null |
|
268 |
baggage_restrictions: null |
|
269 |
throttler: null |
|
270 |
||
180 | 271 |
# Logging configuration. The "std" logging type controls the logs being sent to |
272 |
# stdout. The "file" logging type controls logs being written to a log folder on |
|
273 |
# the disk. Supported log levels are "debug", "info", "warn", "error". |
|
163 | 274 |
logging: |
180 | 275 |
- type: std |
181 | 276 |
level: warn |
180 | 277 |
- type: file |
181 | 278 |
level: warn |
180 | 279 |
params: |
280 |
path: ./logs |