Skip to content

Configuration Reference

offrig resolves configuration from three layers (later layers override earlier ones; override the global config path with OFFRIG_CONFIG):

  1. ~/.config/offrig/config.toml — User-global Rigs, default_rig, trusted [secrets.*] resolvers, and [shim.routing].
  2. <worktree>/offrig.toml — Checked-in repository Environment, [deps], [sync], [resources], and [run]. Strictly sandboxed by the local trust boundary.
  3. <worktree>/offrig.local.toml — Gitignored user-local overrides for a single Worktree (trusted for secret resolvers and per-repo Rig selection).
default_rig = "homelab"
[rigs.local]
provider = "local"
idle_minutes = 30
allow_host_docker = false
[rigs.homelab]
provider = "ssh"
host = "dev@build-01.ts.net"
socket = "/var/run/docker.sock"
idle_minutes = 15
allow_host_docker = false
[rigs.daytona]
provider = "daytona"
api_url = "https://app.daytona.io/api"
target = "us"
auto_stop_minutes = 15
auto_archive_days = 7
[rigs.daytona.api_key]
env = "DAYTONA_API_KEY"
[rigs.vm]
provider = "boat"
api_url = "https://boat.dev/api/v1"
machine_type = "large" # small | default | large | xlarge
no_env = true
idle_minutes = 30
[rigs.vm.api_key]
env = "BOAT_API_KEY"
[rigs.edge]
provider = "cloudflare"
url = "https://offrig-gw-edge.example.workers.dev"
idle_minutes = 2
default_disk_mib = 16384 # 2048..=20480
[rigs.edge.token]
env = "OFFRIG_CLOUDFLARE_TOKEN"
[rigs.modal]
provider = "modal"
app = "offrig" # <= 51 chars
modal_environment = "main"
runtime = "gvisor" # gvisor | vm (enables dind; forbids gpu)
# gpu = ["H100", "A100-80GB"]
idle_minutes = 5 # default 5; max 1440 (24h); 0 disables idle stop
# [rigs.modal.token_id]
# env = "MODAL_TOKEN_ID"
# [rigs.modal.token_secret]
# env = "MODAL_TOKEN_SECRET"
[rigs.e2b]
provider = "e2b"
# domain = "e2b.app"
# api_url = "https://api.e2b.app"
# sandbox_url = "https://sandbox.e2b.app"
idle_minutes = 15 # 1..=1440
# paused_retention_days = 30 # 1..=36500 (omit for indefinite)
[rigs.e2b.api_key]
env = "E2B_API_KEY"
[rigs.sprites]
provider = "sprites"
# api_url = "https://api.sprites.dev"
[rigs.sprites.token]
env = "SPRITES_TOKEN"
[secrets.NPM_TOKEN]
env = "NPM_TOKEN"
[secrets.OP_SECRET]
cmd = ["op", "read", "op://Dev/App/token"]
[git]
credential_hosts = ["github.com"]
[shim.routing]
max_local_concurrent = 2
max_load_ratio = 0.75
min_free_memory_percent = 20
[update]
notify = true
[telemetry]
enabled = true # set `false` (or run `offrig telemetry disable`) to opt out
usage = true
errors = true
[env]
# Curated Ubuntu 24.04 by default; optionally set `image` OR `dockerfile` (Docker-backed Providers)
packages = ["build-essential", "pkg-config", "libssl-dev"]
setup = "rustup component add clippy rustfmt"
[deps]
enabled = true
auto_update = false
# Optional overrides; auto-detected from Cargo.lock / pnpm-lock.yaml / uv.lock / go.sum when omitted
# lockfiles = ["Cargo.lock"]
# command = "cargo fetch --locked"
[sync]
remote_only = ["node_modules", "/target", ".venv", ".turbo"]
include = [] # gitignored paths inside Worktree root (cannot escape root)
git = "auto" # auto | full | off
git_max_bytes = 104857600 # 100 MiB default
conflict = "fail" # fail | overwrite | keep-local
[resources]
cpu = 4
memory_mib = 8192
# disk_mib = 16384
# idle_minutes = 15
hold_cap_minutes = 60
memory_guard = true
memory_guard_soft_pct = 90
memory_guard_hard_pct = 95
memory_guard_soft_min_mib = 512
memory_guard_hard_min_mib = 256
[run]
docker = "off" # off | dind | host (host requires Rig allow_host_docker = true)
ports = ["3000"]

Local override <worktree>/offrig.local.toml

Section titled “Local override <worktree>/offrig.local.toml”

Add offrig.local.toml to .gitignore to pin a personal Rig or local secret resolver for one repository without affecting teammates:

rig = "homelab"
[git]
credential_hosts = ["github.com"]
[secrets.STRIPE_TEST_KEY]
file = "~/.secrets/stripe-test.key"