# fabrica configuration — copy to /etc/fabrica/fabrica.toml (or point at it with # `fabrica --config `) and edit. Every value shown below is the built-in # default, so you only need to keep the keys you actually change. # # Resolution order, later wins: built-in defaults -> /etc/fabrica/fabrica.toml # -> $XDG_CONFIG_HOME/fabrica/fabrica.toml -> --config -> FABRICA__* env. # Environment overrides nest with double underscores, e.g. # FABRICA__SERVER__PORT=8080 # # Any *_file key reads its value from that file and wins over its inline sibling # (use it for agenix / systemd-creds / Docker secrets). Unknown keys are a hard # error, so a typo fails fast rather than being silently ignored. # # Validate with `fabrica config check`; print the effective config (secrets # redacted) with `fabrica config show`. [instance] name = "fabrica" # shown in the header and page titles url = "https://git.example.com" # canonical external URL, no trailing slash description = "A small, private forge." # one line, shown on the landing page default_branch = "main" # default branch for new repositories allow_anonymous = true # anonymous browse + clone of public repos default_visibility = "private" # new repos: public | internal | private allow_registration = false # allow web self-registration (sign-up) [server] address = "0.0.0.0" port = 8080 behind_proxy = false # trust X-Forwarded-For / X-Forwarded-Proto graceful_shutdown_secs = 20 # drain in-flight requests for this long on shutdown max_body_bytes = 1048576 # non-pack routes only [ssh] enabled = true address = "0.0.0.0" port = 2222 host_key_path = "/var/lib/fabrica/ssh/host_ed25519" # generated on first run if absent clone_host = "git.example.com" # what the UI shows in clone URLs, may differ from bind clone_port = 22 [storage] data_dir = "/var/lib/fabrica" # secrets, host key, SQLite db, scratch repo_dir = "/var/lib/fabrica/repos" # bare repos, sharded by id prefix lfs_dir = "/var/lib/fabrica/lfs" # git-LFS objects (local backend only) # Where uploads (avatars, release assets, LFS objects) live. Bare repos are # always local — only uploads may be offloaded to S3. backend = "local" # "local" (default) or "s3" # S3-compatible object storage (AWS S3, MinIO, Cloudflare R2, Backblaze B2, …). # Required when backend = "s3". # [storage.s3] # bucket = "fabrica" # region = "us-east-1" # many non-AWS stores accept "auto" # endpoint = "https://.r2.cloudflarestorage.com" # omit for AWS # access_key_id = "..." # secret_access_key = "..." # path_style = false # true for MinIO and most non-AWS stores # prefix = "" # optional key prefix, e.g. "fabrica/" [database] url = "sqlite:///var/lib/fabrica/fabrica.db" max_connections = 16 # SQLite is opened with journal_mode=WAL, synchronous=NORMAL, foreign_keys=ON, # busy_timeout=5000. Postgres URLs (postgres://…) are detected automatically. [auth] # secret = "…" # HS256 key; prefer secret_file below secret_file = "/var/lib/fabrica/secret" # generated on first run, mode 0600 session_ttl_days = 30 token_ttl_days = 90 invite_ttl_hours = 72 # activation/reset link lifetime cookie_name = "fabrica_session" cookie_secure = true # set false only if instance.url is plain http (dev) argon2_m_cost = 19456 # KiB argon2_t_cost = 2 # iterations argon2_p_cost = 1 # lanes [mail] backend = "smtp" # smtp | stdout | none from = "fabrica@example.com" host = "smtp.example.com" # required when backend = "smtp" port = 587 username = "fabrica" # password = "…" # prefer password_file below password_file = "/run/secrets/fabrica-smtp" encryption = "starttls" # starttls | tls | none timeout_secs = 15 [ui] theme = "dark" # file stem in themes_dir, or an embedded theme name themes_dir = "/var/lib/fabrica/themes" assets_dir = "/var/lib/fabrica/assets" allow_theme_choice = true # show the theme picker; choice persists in a cookie show_runs = false # CI nav slot, inert until CI ships diff_context_lines = 3 max_highlight_bytes = 1048576 # skip highlighting blobs larger than this max_diff_bytes = 5242880 # refuse to render diffs larger than this tree_history_limit = 1000 # commits walked when annotating a tree listing [git] binary = "git" # must be >= 2.41 and on PATH transport_timeout_secs = 3600 max_pack_size_bytes = 536870912 # reject pushes with a larger received pack [search] concurrency = 4 # repos searched at once in a global search timeout_secs = 10 # total budget; partial results are returned past it max_results = 200 # cap before truncating with a notice [log] level = "info" # trace | debug | info | warn | error (RUST_LOG also honoured) format = "pretty" # pretty | json