summarylogtreecommitdiffstats
path: root/default.toml
blob: ee7b05e69f0aadbdc89f10dc0939aa365ac078bc (plain)
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
####################################################################################
#                                                                                  #
# Kellnr configuration.                                                            #
# For more details, see: https://www.kellnr.io/documentation                       #
#                                                                                  #
####################################################################################



####################################################################################
#                                                                                  #
# Values used only on the first startup. Can be changed using the UI on runtime.   #
#                                                                                  #
####################################################################################
[setup]
admin_pwd = "admin"
admin_token = "Zy9HhJ02RJmg0GCrgLfaCVfU6IwDfhXD"

####################################################################################
#                                                                                  #
# Values used on each start of Kellnr. Overwrite and restart Kellnr to change.     #
#                                                                                  #
####################################################################################

[registry]
# Directory where Kellnr stores all its data, e.g. crates, indices etc.
data_dir = "/var/lib/kellnr"
# Seconds until a user is logged out automatically after inactivity in the UI
session_age_seconds = 28800
# Number of crates to cache in-memory. If set to 0, the cache is disabled. 
cache_size = 1000
# Max size of a crate that can be uploaded to Kellnr in MB
max_crate_size = 10
# Max number of internal database connections for Kellnr.
# "0" disables the limit.
max_db_connections = 0
# Enable required authentication for crate pulls.
# If set to "false", anyone can download crates from Kellnr. Upload always requires authentication.
auth_required = false

[docs]
# Enable or disable automatic rustdoc generation for uploaded crates
enabled = false
# Max size of a crate docs that can be uploaded to Kellnr in MB
max_size = 100

[proxy]
# Set to "true" to enable the crates.io proxy. The the official Kellnr documentation
# for more information.
enabled = false
# Number of threads used to keep the crates.io proxy up to date.
# A too high number can lead to exhausting the available database connection.
num_threads = 20

[log]
# Set the log level to "trace", "debug", "info", "warn", or "error".
level = "info"
# Set the log format to "compact", "pretty" or "json".
format = "compact"
# Set the log level for the underlying web framework to "trace", "debug", "info", "warn", or "error".
level_web_server = "warn"

[local]
# Address where the API and web server is started. Usually no change is needed.
ip = "0.0.0.0"
# The port where Kellnr starts listening for incoming connections
port = 8000

# Address where Kellnr will be reachable
# E.g. https://kellnr.example.com:443
# This setting is important as the cargo protocol needs Kellnr
# to know, where it is reachable from the outside, e.g. behind a reverse proxy.
[origin]
# The hostname where Kellnr is reachable from the outside
hostname = "127.0.0.1"
# If a proxy is used in front of Kellnr, the port of the proxy can be specified here
# If no proxy is used, it is the same as the "api_port"
port = 8000
# Either "https" or "http". Use in combination with a reverse proxy that provides HTTPS.
protocol = "http"

# Configure Postgresql as the database backend instead of Sqlite
[postgresql]
enabled = false
address = "localhost"
port = 5432
db = "kellnr"
user = ""
pwd = ""