# copy to knot-static.toml (or point --config / KNOT_STATIC_CONFIG at it).
# the master key that seals sealed_key_file is read from the environment, as
# base64 of 32 bytes, from the variable master_key_env names.
[knot]
hostname = "git.example.com"
owner = "did:plc:..."
[repo]
scan_path = "/var/lib/knot-static/src"
# default_branch = "main"
# object_format = "sha1" # or "sha256"
[secrets]
sealed_key_file = "/var/lib/knot-static/keys.sealed"
# master_key_env = "KNOT_MASTER_KEY"
[output]
root = "/var/lib/knot-static/out"
[activate]
# nginx_binary = "nginx"
listen = "127.0.0.1:8080"
# the tls proxy in front. without it every client looks like the loopback,
# and no per-client limit counts the loopback
real_ip_from = ["127.0.0.1"]
reload_command = "p=$(cat /var/lib/knot-static/out/runtime/nginx.pid 2>/dev/null); [ -z \"$p\" ] || kill -HUP $p"
# old generations kept to roll back to
# keep_generations = 2
[crawl]
urls = ["https://index.tangled.network"]
[firehose]
# where the firehose server listens. with it set, nginx hands it
# subscribeRepos and pushes stop asking for a crawl: run
# `knot-static crawl` once after the server starts
# socket = "/run/knot-static/firehose.sock"
[writes]
# xrpc writes and https pushes, through fcgiwrap
enabled = true
# gzipped fetches go through the cgi too, so set this even with enabled = false
fastcgi_socket = "unix:/run/knot-static/fcgiwrap.sock"
# cgi_binary defaults to this binary
cgi_binary = "/usr/local/bin/knot-static"
[serve]
# clients that pull packs at trusted_rate instead of the limits below.
# "0" means no limit
trusted = ["2001:db8::/48"]
trusted_rate = "0"
# per-client limits. these are the defaults, and "off" (or 0) leaves a limit out
[serve.limits]
pack_rate = "2m" # pack reply rate per connection
pack_rate_after = "32m" # full speed up to here, then pack_rate
packs_in_flight = 16 # pack replies at once on the whole knot, then 429
reads = "20r/s" # requests per client on the one-file routes
reads_burst = 50 # requests past the rate get delayed, not refused
read_connections = 32 # connections per client on those routes
blob_connections = 2 # getBlob downloads at once per client
blob_rate = "10m"
blob_rate_after = "8m"
inflate_rate_all = "50r/s" # gzipped fetches on the whole knot. each holds an
# fcgiwrap worker, past this they wait up to 30 s
# and then get refused
# [atproto]
# plc_directory = "https://plc.directory"
# the index page and its og.png card. these are the defaults. each one expands
# {hostname}, {owner} (the owner's handle, or its did until post-activate
# learns it), {owner_did}, {knot_did}, {repos}, {users}, {kaomoji} and
# {generation}
[index]
# title = "{hostname}"
# [label](https://...) is a link
# subtitle = "a [static knot](https://tangled.org/ptr.pet/yumak) for [tangled](https://tangled.org)"
# description = "a knot for tangled"
# og_title = "{hostname}"
# *text* is pink on the card
# og_subtitle = "a static knot for *tangled*"
# up to 3 lines
# og_description = "*{repos}* repos across *{users}* owners\nserved straight from nginx *{kaomoji}*"
# the card's alt text, the og_* lines joined when unset
# og_alt = "..."
# owners and repos link to <links>/<owner>/<name>, "https://{hostname}" for a
# frontend on this host
# links = "https://tangled.org"