Create odd-box.toml (or Config.toml) and run:
odd-box.toml
Config.toml
./odd-box # loads odd-box.toml or Config.toml in the cwd ./odd-box "/path/to/config.toml" # explicit path
Most settings can be reloaded at runtime through the admin API.
$root_dir
root_dir
$cfg_dir
$port
port_range_start
Tip (VS Code): Install Even Better TOML and keep the #:schema … tag for instant validation & IntelliSense.
#:schema …
version
"V3"
ip
127.0.0.1
http_port
tls_port
8080
4343
alpn
true
4200
default_log_format
standard
dotnet
log_level
Info
auto_start
use_loopback_ip_for_procs
env_vars
[]
lets_encrypt_account_email
odd_box_url
odd_box_password
#:schema https://raw.githubusercontent.com/OlofBlomqvist/odd-box/main/odd-box-schema-v3.1.json version = "V3" root_dir = "/srv/odd-box" ip = "0.0.0.0" http_port = 8080 tls_port = 4343 alpn = true port_range_start = 4200 default_log_format = "standard" log_level = "Info" auto_start = true use_loopback_ip_for_procs = true env_vars = [ { key = "GLOBAL_KEY", value = "value" } ] lets_encrypt_account_email = "[email protected]" odd_box_url = "admin.example.com" odd_box_password = "s3cr3t"
[[remote_target]]
host_name
capture_subdomains
*.host_name
false
forward_subdomains
foo.api.example.com
foo.backend
terminate_tls
terminate_http
enable_lets_encrypt
keep_original_host_header
Host
backends
address
port
Back‑end object keys:
https
hints
H1
H2
H2C
H2CPK
H3
[[remote_target]] host_name = "api.example.com" capture_subdomains = false forward_subdomains = true terminate_tls = true enable_lets_encrypt = true keep_original_host_header = true backends = [ { address = "10.0.0.5", port = 443, https = true, hints = ["H2","H1"] }, { address = "10.0.0.6", port = 8443, https = true } ]
[[hosted_process]]
dir
bin
args
log_format
exclude_from_start_all
start_all
[[hosted_process]] host_name = "app.local" dir = "$root_dir/apps/myapp" bin = "./start-server" args = ["--config", "$cfg_dir/app.toml"] env_vars = [ { key = "APP_ENV", value = "production" } ] log_format = "dotnet" log_level = "Debug" port = 3000 https = true auto_start = true exclude_from_start_all = false capture_subdomains = false forward_subdomains = false terminate_tls = false terminate_http = false enable_lets_encrypt = false hints = ["H1","H2"]
[[dir_server]]
enable_directory_browsing
index.html
index.md
render_markdown
.md
redirect_to_https
cache_control_max_age_in_seconds
no cache-control header
[[dir_server]] host_name = "static.example.com" dir = "/var/www/public" capture_subdomains = true enable_directory_browsing = true render_markdown = true redirect_to_https = true enable_lets_encrypt = true cache_control_max_age_in_seconds = 60