Skip to content

Environment ​

Every variable peregrin reads. PEREGRIN_* configures peregrin itself; SEPIA_* vars are consumed by sepia binaries (the session-plane child and its drivers) — those are documented in sepia's reference.

Node (peregrin serve) ​

VariableDefaultMeaning
PEREGRIN_HOST127.0.0.1Bind address for /api/* + SSE
PEREGRIN_PORT8787Bind port (legacy PORT also read)
PEREGRIN_TOKEN—Bearer auth; required on non-loopback binds
PEREGRIN_HOME~/.local/share/peregrinNode data dir (identity, meta, tokens)
PEREGRIN_NODE$PEREGRIN_HOME/node.jsonStable node-identity file
PEREGRIN_NAMEhostnameDisplay name for GET /api/node
PEREGRIN_META / PEREGRIN_META_PATH$PEREGRIN_HOME/meta.jsonOverlay store (pins, archives, spans)
PEREGRIN_ORIGINSlocalhost:3000 ×2CORS allowlist; * echoes any origin
PEREGRIN_CLINE_DIR~/.cline/dataCline store dir — the convert target
PEREGRIN_CLAUDE_DIR~/.claudeClaude dir — file-history restore
PEREGRIN_SESSION_PLANEinprocessservice spawns sepia serve instead
PEREGRIN_SEPIAdiscoveryExplicit path to the sepia binary
PEREGRIN_SSE_KEEPALIVE_MS15000SSE keep-alive cadence; 0 disables
PEREGRIN_HELD_WATCH_MS5000Held-session re-probe cadence
PEREGRIN_IDLE_TTL_MS600000Idle live-session detach threshold
PEREGRIN_SWEEP_MS30000Idle sweep cadence
PEREGRIN_PAIR_LIMIT_PER_MIN5/api/pair attempts per minute per client
PEREGRIN_PAIR_LIMIT_PER_DAY20/api/pair attempts per day per client
PEREGRIN_OTEL_ENDPOINT—OTEL collector endpoint (tracing)

Hub (peregrin-hub) ​

VariableDefaultMeaning
PEREGRIN_HUB_HOST127.0.0.1Hub bind address
PEREGRIN_HUB_PORT3000Hub bind port (PEREGRIN_PORT fallback)
PEREGRIN_HUB_TOKEN—Bearer auth for the hub itself
PEREGRIN_NODES—Comma-separated node URLs to aggregate
PEREGRIN_NODE_URL—Single-node shortcut
PEREGRIN_NODE_TOKEN—Token the hub presents to nodes
PEREGRIN_SITE_ROOTbundledWeb-bundle root override
PEREGRIN_CREDENTIAL_STOREkeyringkeyring or dotenv secrets backend

CLI (peregrin) ​

VariableMeaning
PEREGRIN_NODE_URLTarget node for peregrin <verb> commands
PEREGRIN_TOKENBearer token sent to the node