Covendocs

Configuration and COVEN_HOME

Daemon configuration reference for COVEN_HOME, local IPC, coven.sqlite3, daemon.json, privacy, and retention.

2 min read

Coven's daemon configuration surface is deliberately small. The important knob is COVEN_HOME, the state directory that contains the local socket, ledger, event log, and daemon metadata.

Default layout

If COVEN_HOME is not set, Coven uses:

$HOME/.coven

The daemon uses this layout:

PathPurpose
$COVEN_HOME/coven.sockUnix socket for same-user local API access on Unix-like hosts.
Daemon-reported named pipeOwner-only local IPC endpoint on Windows.
$COVEN_HOME/coven.sqlite3SQLite ledger for sessions and append-only events.
$COVEN_HOME/daemon.jsonDaemon metadata such as pid, start time, and socket path.
$COVEN_HOME/daemon.lockLifecycle lock (advisory flock) that serializes daemon start/stop/restart orchestration so concurrent lifecycle commands cannot race.
$COVEN_HOME/daemon-serve.lockServe lock held for the whole life of a daemon serve process, guaranteeing at most one daemon writes a given SQLite store.
$COVEN_HOME/daemon-recovery.logAppend-only, timestamped log of lifecycle and recovery events: startups, terminated duplicate daemons, accept-loop errors, API handler errors, and panics.
$COVEN_HOME/privacy.tomlOptional log-redaction, raw-artifact, and retention settings.
$COVEN_HOME/keys/session-artifacts.keyLocal encryption key created only when raw artifact persistence is enabled.

Do not commit this directory. It can contain prompts, model output, local paths, and operational metadata.

Relocate daemon state

Set COVEN_HOME before starting or restarting the daemon:

export COVEN_HOME="$HOME/.local/share/coven"
coven daemon restart

After restart, confirm the selected socket and API contract:

coven daemon status

On Unix-like hosts, scripts that call the socket should derive the socket path from the same environment:

curl --unix-socket "$COVEN_HOME/coven.sock" \
  http://localhost/api/v1/health

Privacy and retention

Session event payloads are redacted before broad API and log responses. Raw artifact persistence is disabled by default.

Optional $COVEN_HOME/privacy.toml:

persist_raw_artifacts = false
raw_artifact_retention_days = 7
log_retention_days = 30
extra_patterns = ["custom-sensitive-[0-9]+"]

Environment variables override the matching file values:

NameScope
COVEN_PERSIST_RAW_ARTIFACTSEnables encrypted raw artifact persistence when truthy.
COVEN_RAW_ARTIFACT_RETENTION_DAYSSets raw artifact retention; positive whole days only.
COVEN_LOG_RETENTION_DAYSSets redacted event-log retention; positive whole days only.

The CLI also parses covenCli.privacy from ~/.config/coven/settings.json. Those values currently participate in maintenance, storage-health, and manual prune calculations. Event redaction, raw artifact creation, and raw artifact retrieval still use privacy.toml plus the environment overrides above, so use those surfaces for security-sensitive behavior.

Prune retained data with:

coven logs prune --dry-run
coven logs prune

Current supported knobs

Supported today:

NameScope
COVEN_HOMEMoves daemon state, local IPC, ledger, and metadata.
$COVEN_HOME/privacy.tomlControls redaction patterns, raw artifact persistence, and retention.
COVEN_PERSIST_RAW_ARTIFACTSOverrides the raw artifact persistence setting.
COVEN_RAW_ARTIFACT_RETENTION_DAYSOverrides raw artifact retention.
COVEN_LOG_RETENTION_DAYSOverrides redacted event retention.

Not supported as daemon configuration yet:

NameCurrent posture
coven.tomlDo not rely on it for daemon startup behavior.
COVEN_SOCKETThe socket path is derived from COVEN_HOME.
COVEN_LOG_LEVELNot a stable daemon configuration contract.
COVEN_DAEMON_FOREGROUNDNot a stable daemon configuration contract.

Those names may appear in future design discussions, but clients and operators should not depend on them until the Rust daemon documents support.

File permissions

The local trust boundary depends on permissions around $COVEN_HOME and the active local IPC endpoint. The daemon should keep state private to the owning user. Anyone who can connect to the Unix socket or Windows named pipe can act as a local Coven client.

Was this page helpful?No

On this page