16 # Note that this is NOT the same private key as used for TLS! To generate a |
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". |
17 # signing key, use "./bin/generate-keys --private-key matrix_key.pem". |
18 private_key: matrix_key.pem |
18 private_key: matrix_key.pem |
19 |
19 |
20 # The paths and expiry timestamps (as a UNIX timestamp in millisecond precision) |
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 |
21 # to old signing keys that were formerly in use on this domain name. These |
22 # keys will not be used for federation request or event signing, but will be |
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. |
23 # provided to any other homeserver that asks when trying to verify old events. |
24 old_private_keys: |
24 old_private_keys: |
25 {% if dendrite_old_key %}- private_key: old_matrix_key.pem |
25 {% if dendrite_old_key %}- private_key: old_matrix_key.pem |
26 expired_at: 1626538450 |
26 expired_at: 1626538450 |
32 # considered valid by other homeservers. |
32 # considered valid by other homeservers. |
33 key_validity_period: 168h0m0s |
33 key_validity_period: 168h0m0s |
34 |
34 |
35 # Global database connection pool, for PostgreSQL monolith deployments only. If |
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 |
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, |
37 # sections. For monolith deployments using SQLite databases, |
38 # you must configure the "database" block for each component instead. |
38 # you must configure the "database" block for each component instead. |
39 database: |
39 database: |
40 connection_string: postgresql://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}?sslmode=disable |
40 connection_string: postgresql://{{dendrite_db_user}}:{{dendrite_db_pass}}@localhost/{{dendrite_db}}?sslmode=disable |
41 max_open_conns: 90 |
41 max_open_conns: 90 |
42 max_idle_conns: 5 |
42 max_idle_conns: 5 |
43 conn_max_lifetime: -1 |
43 conn_max_lifetime: -1 |
44 |
44 |
|
45 # Configuration for in-memory caches. Caches can often improve performance by |
|
46 # keeping frequently accessed items (like events, identifiers etc.) in memory |
|
47 # rather than having to read them from the database. |
|
48 cache: |
|
49 # The estimated maximum size for the global cache in bytes, or in terabytes, |
|
50 # gigabytes, megabytes or kilobytes when the appropriate 'tb', 'gb', 'mb' or |
|
51 # 'kb' suffix is specified. Note that this is not a hard limit, nor is it a |
|
52 # memory limit for the entire process. A cache that is too small may ultimately |
|
53 # provide little or no benefit. |
|
54 max_size_estimated: 1gb |
|
55 |
|
56 # The maximum amount of time that a cache entry can live for in memory before |
|
57 # it will be evicted and/or refreshed from the database. Lower values result in |
|
58 # easier admission of new cache entries but may also increase database load in |
|
59 # comparison to higher values, so adjust conservatively. Higher values may make |
|
60 # it harder for new items to make it into the cache, e.g. if new rooms suddenly |
|
61 # become popular. |
|
62 max_age: 1h |
|
63 |
45 # The server name to delegate server-server communications to, with optional port |
64 # The server name to delegate server-server communications to, with optional port |
46 # e.g. localhost:443 |
65 # e.g. localhost:443 |
47 well_known_server_name: "" |
66 well_known_server_name: "" |
|
67 |
|
68 # The base URL to delegate client-server communications to e.g. https://localhost |
|
69 well_known_client_name: "" |
48 |
70 |
49 # Lists of domains that the server will trust as identity servers to verify third |
71 # Lists of domains that the server will trust as identity servers to verify third |
50 # party identifiers such as phone numbers and email addresses. |
72 # party identifiers such as phone numbers and email addresses. |
51 trusted_third_party_id_servers: |
73 trusted_third_party_id_servers: |
52 - matrix.org |
74 - matrix.org |
66 # Configures phone-home statistics reporting. These statistics contain the server |
88 # Configures phone-home statistics reporting. These statistics contain the server |
67 # name, number of active users and some information on your deployment config. |
89 # 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. |
90 # We use this information to understand how Dendrite is being used in the wild. |
69 report_stats: |
91 report_stats: |
70 enabled: false |
92 enabled: false |
71 endpoint: https://matrix.org/report-usage-stats/push |
93 endpoint: https://panopticon.matrix.org/push |
72 |
94 |
73 # Server notices allows server admins to send messages to all users on the server. |
95 # Server notices allows server admins to send messages to all users on the server. |
74 server_notices: |
96 server_notices: |
75 enabled: false |
97 enabled: false |
76 # The local part, display name and avatar URL (as a mxc:// URL) for the user that |
98 # The local part, display name and avatar URL (as a mxc:// URL) for the user that |
84 |
106 |
85 # Configuration for NATS JetStream |
107 # Configuration for NATS JetStream |
86 jetstream: |
108 jetstream: |
87 # A list of NATS Server addresses to connect to. If none are specified, an |
109 # 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 |
110 # internal NATS server will be started automatically when running Dendrite in |
89 # monolith mode. For polylith deployments, it is required to specify the address |
111 # monolith mode. |
90 # of at least one NATS Server node. |
|
91 addresses: |
112 addresses: |
92 # - localhost:4222 |
113 # - localhost:4222 |
|
114 |
|
115 # Disable the validation of TLS certificates of NATS. This is |
|
116 # not recommended in production since it may allow NATS traffic |
|
117 # to be sent to an insecure endpoint. |
|
118 disable_tls_validation: false |
93 |
119 |
94 # Persistent directory to store JetStream streams in. This directory should be |
120 # Persistent directory to store JetStream streams in. This directory should be |
95 # preserved across Dendrite restarts. |
121 # preserved across Dendrite restarts. |
96 storage_path: ./ |
122 storage_path: ./ |
97 |
123 |
147 recaptcha_public_key: "{{dendrite_recaptcha_public_key}}" |
173 recaptcha_public_key: "{{dendrite_recaptcha_public_key}}" |
148 recaptcha_private_key: "{{dendrite_recaptcha_private_key}}" |
174 recaptcha_private_key: "{{dendrite_recaptcha_private_key}}" |
149 recaptcha_bypass_secret: "{{dendrite_recaptcha_bypass_secret}}" |
175 recaptcha_bypass_secret: "{{dendrite_recaptcha_bypass_secret}}" |
150 recaptcha_siteverify_api: "{{dendrite_recaptcha_siteverify_api}}" |
176 recaptcha_siteverify_api: "{{dendrite_recaptcha_siteverify_api}}" |
151 |
177 |
|
178 |
152 # TURN server information that this homeserver should send to clients. |
179 # TURN server information that this homeserver should send to clients. |
153 turn: |
180 turn: |
154 turn_user_lifetime: "" |
181 turn_user_lifetime: "5m" |
155 turn_uris: |
182 turn_uris: |
156 # - turn:turn.server.org?transport=udp |
183 # - turn:turn.server.org?transport=udp |
157 # - turn:turn.server.org?transport=tcp |
184 # - turn:turn.server.org?transport=tcp |
158 turn_shared_secret: "" |
185 turn_shared_secret: "" |
159 turn_username: "" |
186 # If your TURN server requires static credentials, then you will need to enter |
160 turn_password: "" |
187 # them here instead of supplying a shared secret. Note that these credentials |
|
188 # will be visible to clients! |
|
189 # turn_username: "" |
|
190 # turn_password: "" |
161 |
191 |
162 # Settings for rate-limited endpoints. Rate limiting kicks in after the threshold |
192 # 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" |
193 # number of "slots" have been taken by requests from a specific host. Each "slot" |
164 # will be released after the cooloff time in milliseconds. |
194 # will be released after the cooloff time in milliseconds. Server administrators |
|
195 # and appservice users are exempt from rate limiting by default. |
165 rate_limiting: |
196 rate_limiting: |
166 enabled: true |
197 enabled: true |
167 threshold: 5 |
198 threshold: 20 |
168 cooloff_ms: 500 |
199 cooloff_ms: 500 |
|
200 exempt_user_ids: |
|
201 # - "@user:domain.com" |
169 |
202 |
170 # Configuration for the Federation API. |
203 # Configuration for the Federation API. |
171 federation_api: |
204 federation_api: |
172 # How many times we will try to resend a failed transaction to a specific server. The |
205 # How many times we will try to resend a failed transaction to a specific server. The |
173 # backoff is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds etc. Once |
206 # backoff is 2**x seconds, so 1 = 2 seconds, 2 = 4 seconds, 3 = 8 seconds etc. Once |
176 send_max_retries: 16 |
209 send_max_retries: 16 |
177 |
210 |
178 # Disable the validation of TLS certificates of remote federated homeservers. Do not |
211 # Disable the validation of TLS certificates of remote federated homeservers. Do not |
179 # enable this option in production as it presents a security risk! |
212 # enable this option in production as it presents a security risk! |
180 disable_tls_validation: false |
213 disable_tls_validation: false |
|
214 |
|
215 # Disable HTTP keepalives, which also prevents connection reuse. Dendrite will typically |
|
216 # keep HTTP connections open to remote hosts for 5 minutes as they can be reused much |
|
217 # more quickly than opening new connections each time. Disabling keepalives will close |
|
218 # HTTP connections immediately after a successful request but may result in more CPU and |
|
219 # memory being used on TLS handshakes for each new connection instead. |
|
220 disable_http_keepalives: false |
181 |
221 |
182 # Perspective keyservers to use as a backup when direct key fetches fail. This may |
222 # 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 |
223 # be required to satisfy key requests for servers that are no longer online when |
184 # joining some rooms. |
224 # joining some rooms. |
185 key_perspectives: |
225 key_perspectives: |
224 method: scale |
264 method: scale |
225 |
265 |
226 # Configuration for enabling experimental MSCs on this homeserver. |
266 # Configuration for enabling experimental MSCs on this homeserver. |
227 mscs: |
267 mscs: |
228 mscs: |
268 mscs: |
229 - msc2836 # (Threading, see https://github.com/matrix-org/matrix-doc/pull/2836) |
269 # - msc2836 # (Threading, see https://github.com/matrix-org/matrix-doc/pull/2836) |
230 - msc2946 # (Spaces Summary, see https://github.com/matrix-org/matrix-doc/pull/2946) |
|
231 |
270 |
232 # Configuration for the Sync API. |
271 # Configuration for the Sync API. |
233 sync_api: |
272 sync_api: |
234 # This option controls which HTTP header to inspect to find the real remote IP |
273 # 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 |
274 # address of the client. This is likely required if Dendrite is running behind |
236 # a reverse proxy server. |
275 # a reverse proxy server. |
237 # real_ip_header: X-Real-IP |
276 # real_ip_header: X-Real-IP |
|
277 |
|
278 # Configuration for the full-text search engine. |
|
279 search: |
|
280 # Whether or not search is enabled. |
|
281 enabled: false |
|
282 |
|
283 # The path where the search index will be created in. |
|
284 index_path: "./searchindex" |
|
285 |
|
286 # The language most likely to be used on the server - used when indexing, to |
|
287 # ensure the returned results match expectations. A full list of possible languages |
|
288 # can be found at https://github.com/blevesearch/bleve/tree/master/analysis/lang |
|
289 language: "en" |
238 |
290 |
239 # Configuration for the User API. |
291 # Configuration for the User API. |
240 user_api: |
292 user_api: |
241 # The cost when hashing passwords on registration/login. Default: 10. Min: 4, Max: 31 |
293 # 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. |
294 # See https://pkg.go.dev/golang.org/x/crypto/bcrypt for more information. |
249 # The length of time that a token issued for a relying party from |
301 # The length of time that a token issued for a relying party from |
250 # /_matrix/client/r0/user/{userId}/openid/request_token endpoint |
302 # /_matrix/client/r0/user/{userId}/openid/request_token endpoint |
251 # is considered to be valid in milliseconds. |
303 # is considered to be valid in milliseconds. |
252 # The default lifetime is 3600000ms (60 minutes). |
304 # The default lifetime is 3600000ms (60 minutes). |
253 # openid_token_lifetime_ms: 3600000 |
305 # openid_token_lifetime_ms: 3600000 |
|
306 |
|
307 # Users who register on this homeserver will automatically be joined to the rooms listed under "auto_join_rooms" option. |
|
308 # By default, any room aliases included in this list will be created as a publicly joinable room |
|
309 # when the first user registers for the homeserver. If the room already exists, |
|
310 # make certain it is a publicly joinable room, i.e. the join rule of the room must be set to 'public'. |
|
311 # As Spaces are just rooms under the hood, Space aliases may also be used. |
|
312 auto_join_rooms: |
|
313 # - "#main:matrix.org" |
254 |
314 |
255 # Configuration for Opentracing. |
315 # Configuration for Opentracing. |
256 # See https://github.com/matrix-org/dendrite/tree/master/docs/tracing for information on |
316 # See https://github.com/matrix-org/dendrite/tree/master/docs/tracing for information on |
257 # how this works and how to set it up. |
317 # how this works and how to set it up. |
258 tracing: |
318 tracing: |