-
Notifications
You must be signed in to change notification settings - Fork 1
/
example_config.toml
125 lines (91 loc) · 3.3 KB
/
example_config.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# The host where this server is hosted. Eg. `harmonyapp.io:2289` or `harmonyapp.io:4444`.
# A port must always be specified.
host = ""
# Whether to listen on `localhost` or `0.0.0.0` (useful for docker).
listen_on_localhost = true
# The port to listen on.
port = 2289
# Why this server is hosted or info about the server.
server_description = ""
# Message of the day. Can also be changed at runtime, so it is suitable for
# putting recent information (maintanance etc.).
motd = ""
# Whether to support CORS requests. Should only be used for
# development purposes, since this allows everything.
cors_dev = false
# Whether to log headers in traces. Authorization information
# will be marked as "sensitive" and won't be logged.
log_headers = false
[policy]
# Whether to disable registration and only allow it using admin generated tokens.
disable_registration = false
# Whether to disable email validation for registration.
disable_registration_email_validation = false
# Maximum amount of requests that should be processed concurrently.
# If set to 0, it will be disabled.
# Note: you'll want to increase this if your server has 100+ members.
max_concurrent_requests = 512
[policy.ratelimit]
# Whether to disable ratelimits or not (useful when testing / benching).
disable = false
# The header name to look at for client IPs. This is useful if scherzo is
# running behind a reverse proxy, where the requests will be made from one
# local address, and as such rate limiting will not work properly. By setting
# this to a header name such as "X-Forwarded-For", scherzo can use it to get
# client IP and use it for rate limiting.
#
# By default this is not set. If the header can't be found in the request,
# scherzo will silently fallback to using connection IPs.
#
# client_ip_header_name = ""
# A list of allowed IP addresses that can bypass the rate limiter.
#
# Invalid IP addresses will be silently ignored. Note that these are
# *IP addresses* and as such they don't take a port.
#
# allowed_ips = ["127.0.0.1", "0.0.0.0", "::1"]
[db]
# Path to a directory to put db backups in.
db_backup_path = "."
# Database in-memory cache limit in MiB.
db_cache_limit = 1024
# (sled only) whether to increase throughput at the cost of more storage usage.
sled_throughput_at_storage_cost = false
# HTTPS settings
[tls]
# Path to the certificate file.
cert_file = "./cert"
# Path to the (private) key file.
key_file = "./key"
# Media settings
[media]
# Max upload length for files in MiB.
max_upload_length = 50
# Where to store media files.
media_root = "./media"
# Federation settings
[federation]
# Path to the federation key. This will be generated by the server automatically.
key = "./federation_key"
# Which hosts to allow. This takes priority over `host_block_list`.
host_allow_list = []
# Which hosts to block.
host_block_list = []
# (optional) email mailserver settings
# [email]
# Server address of the mailserver.
# server = "localhost"
# Port the mailserver is on on the specified address.
# port = 25
# Name and email adress to use for sending the emails.
# from = "Harmony <[email protected]>"
# (optional) Credentials file for the mailserver.
#
# Example:
# ```
# username = "username"
# password = "password"
# ```
# credentials_file = "./email_creds.toml"
# Whether to use TLS or not while connecting to the mailserver.
# tls = false