Configuration
Vein is configured with a single TOML file, vein.toml by default (override with --config). Generate a starter file with vein init, or copy vein.example.toml.
Minimal config
Section titled “Minimal config”crates.io and npm work with defaults; add an [upstream] section only when you want Vein to fetch uncached RubyGems.
[server]port = 8346 # default
[storage]path = "./cache" # defaultFull reference
Section titled “Full reference”[server]host = "0.0.0.0"port = 8346workers = 4 # Rama worker threads (default: CPU count)
[storage]path = "./cache" # local filesystem storage for cached artifacts
[database]# Preferred: a URL. SQLite:url = "sqlite://./vein.db"# path = "./vein.db" # alternative to url for SQLite# Or PostgreSQL:# url = "postgres://user:[email protected]/vein"# max_connections = 32
[database.reliability.retry]enabled = true # default: truemax_attempts = 5 # including the initial request, default: 5initial_backoff_ms = 500 # default: 500max_backoff_secs = 30 # default: 30backoff_strategy = "exponential" # "exponential" | "fibonacci" | "constant"
[logging]level = "info" # debug, info, warn, errorjson = false # true for JSON-formatted logs
[hotcache]# Six-field cron: "sec min hour day month weekday"refresh_schedule = "0 0 * * * *" # every hour; "" disables automatic refresh
[hotcache.reliability.retry]enabled = truemax_attempts = 3initial_backoff_ms = 1000max_backoff_secs = 2backoff_strategy = "constant"
# Optional - RubyGems only. crates.io and npm use fixed upstreams.# By default Vein runs in cache-only mode for RubyGems.[upstream]url = "https://rubygems.org"fallback_urls = ["https://gems.coop"] # tried in order if primary is unreachabletimeout_secs = 30connection_pool_size = 128
[upstream.reliability.retry]enabled = truemax_attempts = 3initial_backoff_ms = 100max_backoff_secs = 2backoff_strategy = "exponential"
# Supply chain protection - see /quarantine/[delay_policy]enabled = falsedefault_delay_days = 3skip_weekends = truebusiness_hours_only = truerelease_hour_utc = 9
[[delay_policy.gems]]name = "rails*"pattern = truedelay_days = 7
[[delay_policy.pinned]]name = "rails"version = "8.0.1"reason = "Security patch - verified safe"Compile-time database choice
Section titled “Compile-time database choice”The sqlite and postgres Cargo features are mutually exclusive - a single build picks one:
# SQLite (default)cargo build --release
# PostgreSQLcargo build --release --no-default-features --features postgres,tlsSee Architecture for what the database and storage layers are each responsible for, and Deployment for Docker/systemd examples that wire this file in.