Skip to content

reference

Filesystem layout

A canonical map of every file and directory that deputyOS owns on a baked image. Grouped by tree (config, install, runtime state, runtime ephemeral, agent home), with owner, mode, format, producer, consumer, and env-ov…

A canonical map of every file and directory that deputyOS owns on a baked image. Grouped by tree (config, install, runtime state, runtime ephemeral, agent home), with owner, mode, format, producer, consumer, and env-override columns.

The path-resolution module is deputyctl/src/paths.rs; the rendering Ansible role lives at roles/deputyos/.

[TOC]

Conventions

  • Owner is the Linux owner:group. agent:agent is the unprivileged agent service user; root:root is the OS-level superuser; root:agent appears for files root-owned but agent-readable (e.g. secrets.env).
  • Mode is octal Unix permissions.
  • Producer is what writes the file in production: the Ansible role at bake time, the wizard at first boot, deputyctl <subcmd> at runtime, etc.
  • Consumer is what reads the file at runtime.
  • Env override points to the env var (when present) that overrides the resolution path during dev/test.

/etc/deputyos/ — runtime configuration

Read-only at runtime for unprivileged services; writable only by root and the wizard’s privileged surface.

PathOwnerModeFormatProducerConsumerEnv override
/etc/deputyos/root:root0755dirbake (deputyos Ansible role)all deputyctl/wizard/PWA–
/etc/deputyos/active-profileroot:root0644one-line text (profile id)wizard step 2 / deputyctl profile activatedeputyctl status, up, down, doctorDEPUTYOS_ACTIVE_PROFILE_FILE
/etc/deputyos/active-providerroot:root0644one-line text (provider id)deputyctl model setdeputyctl model test, PWA keys pageDEPUTYOS_ACTIVE_PROVIDER_FILE
/etc/deputyos/secrets.envroot:agent0640KEY=VALUE shell-styledeputyctl model set, wizard applygateway services (EnvironmentFile=-), deputyctl model listDEPUTYOS_SECRETS_FILE
/etc/deputyos/profiles/root:root0755dirbakedeputyctl profile, wizardDEPUTYOS_PROFILES_DIR
/etc/deputyos/profiles/openclaw.tomlroot:root0644TOML (profile-toml)bake (copies profiles/openclaw.toml)deputyctl profile, wizard, PWA–
/etc/deputyos/profiles/hermes.tomlroot:root0644TOMLbakeas above–
/etc/deputyos/profiles/khoj.tomlroot:root0644TOMLbakeas above–
/etc/deputyos/providers.jsonroot:root0644JSON (providers-json)bake (copies deputyctl/etc/providers.json)deputyctl model, wizard step 3, PWA keys pageDEPUTYOS_PROVIDERS_FILE
/etc/deputyos/cost-defaults.jsonroot:root0644JSONbakedeputyctl cost, ledger–
/etc/deputyos/limits.jsonroot:root0644JSON (limits-json)bake (copies target’s limits.<target>.json)deputyctl limits, doctor, wizard, PWADEPUTYOS_LIMITS_FILE
/etc/deputyos/voice.tomlroot:root0644TOMLbake (renders voice.toml.j2)deputyos-voice-relay.service–
/etc/deputyos/rclone.confroot:agent0640rclone INIwizard apply, deputyctl backupdeputyctl backup, restoreDEPUTYOS_RCLONE_CONFIG
/etc/deputyos/backup.tomlroot:root0644TOMLdeputyctl backup scheduledeputyctl backup now, restoreDEPUTYOS_BACKUP_CONFIG
/etc/deputyos/hooks.d/root:root0755diroperatordispatcher (deputyctl/src/hooks.rs)DEPUTYOS_HOOKS_DIR
/etc/deputyos/hooks.d/pre-message/root:root0755dir of executablesoperatordispatcher / relay–
/etc/deputyos/hooks.d/post-message/root:root0755dir of executablesoperatordispatcher / relay–
/etc/deputyos/hooks.d/cost-alert/root:root0755dir of executablesoperatorcost::evaluate–
/etc/deputyos/hooks.d/update-applied/root:root0755dir of executablesoperatorupdate::run_apply–
/etc/deputyos/openclaw/channels.d/root:root0755dir of TOML/JSONwizard apply, deputyctl channelopenclaw-gateway (read by AppArmor profile)–
/etc/deputyos/hermes/root:root0755dirwizard applyhermes-gateway (allowed by AppArmor profile)–
/etc/deputyos/khoj/root:root0755dirwizard applykhoj-gateway (allowed by AppArmor profile)–
/etc/deputyos/deputyos-pubkey.pubroot:root0644minisign pubkeybakedeputyctl update --checkDEPUTYOS_PUBKEY_FILE

secrets.env mode is 0640, owned root:agent so the gateway services (running as agent) can EnvironmentFile=- it without granting world read. The wizard writes it; deputyctl model set updates it. See Security / Secrets storage.

/etc/apparmor.d/ — confinement profiles

Set to enforce by the bake role; loaded by apparmor.service.

PathOwnerModeProducerConfines
/etc/apparmor.d/deputyos.openclawroot:root0644bake (copies roles/deputyos/files/apparmor/deputyos.openclaw)/opt/deputyos/profiles/openclaw/node_modules/.bin/openclaw
/etc/apparmor.d/deputyos.hermesroot:root0644bake/opt/deputyos/profiles/hermes/.venv/bin/hermes
/etc/apparmor.d/deputyos.khojroot:root0644bake/opt/deputyos/profiles/khoj/.venv/bin/khoj
/etc/apparmor.d/deputyos.voice-relayroot:root0644bake/opt/deputyos/voice/voice-relay.sh

See AppArmor profiles reference for the rule walkthroughs.

/etc/systemd/system/ — deputyOS units

Rendered from the templates in roles/deputyos/templates/.

PathProducerDocumented at
/etc/systemd/system/openclaw-gateway.servicebakesystemd-units
/etc/systemd/system/hermes-gateway.servicebakesystemd-units
/etc/systemd/system/khoj-gateway.servicebakesystemd-units
/etc/systemd/system/deputywizard.servicebakesystemd-units
/etc/systemd/system/deputyos-qr-on-tty.servicebakesystemd-units
/etc/systemd/system/deputyos-voice-relay.servicebake (gated on deputyos_voice_enabled)systemd-units
/etc/systemd/system/deputyos-backup.timerdeputyctl backup schedulesystemd-units
/etc/systemd/system/deputyos-backup.servicedeputyctl backup schedulesystemd-units

/opt/deputyos/ — install root

Read-only data; never modified at runtime. Each profile gets a subtree; voice gets its own.

PathOwnerModeFormatProducerConsumer
/opt/deputyos/root:root0755dirbake–
/opt/deputyos/profiles/openclaw/root:root0755install tree (Node)bake (tasks/profile-openclaw.yml)openclaw-gateway.service
/opt/deputyos/profiles/openclaw/node_modules/.bin/openclawroot:root0755shebang scriptbakeExecStart= of openclaw-gateway
/opt/deputyos/profiles/hermes/root:root0755install tree (Python venv)bakehermes-gateway.service
/opt/deputyos/profiles/hermes/.venv/bin/hermesroot:root0755venv entrypointbakeExecStart= of hermes-gateway
/opt/deputyos/profiles/khoj/root:root0755install tree (Python venv)bakekhoj-gateway.service
/opt/deputyos/profiles/khoj/.venv/bin/khojroot:root0755venv entrypointbakeExecStart= of khoj-gateway
/opt/deputyos/voice/root:root0755dirbake (tasks/voice-baseline.yml)deputyos-voice-relay.service
/opt/deputyos/voice/voice-relay.shroot:root0755shell scriptbakesystemd ExecStart
/opt/deputyos/voice/whisper-cliroot:root0755binary (whisper.cpp)bakevoice-relay.sh
/opt/deputyos/voice/piperroot:root0755binary (Piper)bakevoice-relay.sh
/opt/deputyos/voice/whisper-tiny.en.binroot:root0644modelbakewhisper-cli
/opt/deputyos/voice/piper/en_US-amy-medium.onnxroot:root0644modelbakepiper

/usr/local/bin/ — deputyOS binaries

PathOwnerModeProducerNotes
/usr/local/bin/deputyctlroot:root0755bakestatic-linked Rust binary
/usr/local/bin/deputywizardroot:root0755bakefirst-boot wizard server
/usr/local/bin/deputypwaroot:root0755bakePWA dashboard server

/var/lib/deputyos/ — persistent state

Survives reboots. NOT cleared by deputyctl factory-reset unless explicitly listed.

PathOwnerModeFormatProducerConsumerEnv override
/var/lib/deputyos/agent:agent0755dirbake (StateDirectory=deputyos)wizard, PWA, deputyctl–
/var/lib/deputyos/wizard-state.jsonroot:agent0640JSON (step + answers + completed_at)wizard each stepwizard, deputyctl statusDEPUTYOS_WIZARD_STATE_FILE
/var/lib/deputyos/slots.jsonroot:root0644JSON (A/B slot pointers)update flowdeputyctl rollback–
/var/lib/deputyos/cost-trippedagent:agent0644empty marker filecost::evaluatedeputyctl cost, gateway–
/var/lib/deputyos/staging/root:root0755dirdeputyctl update --applynext-boot bootloader / A/B swap–
/var/lib/deputyos/staging/<release>/<filename>root:root0644image artefactdeputyctl update --applyA/B swap–
/var/lib/deputyos/push-subscriptions.jsonlagent:agent0640JSON-LinesPWA /app/push/subscribePWA push sender(per-instance override)
/var/lib/deputyos/vapid.pemagent:agent0600PEM (VAPID keypair)PWA on first run (openssl shells out)PWA push sender–
/var/lib/deputyos/cost-ledger.jsonlagent:agent0640JSON-Linesgateway via deputyctl cost recorddeputyctl cost report, PWA dashboard–

/run/deputyos/ — runtime (tmpfs, cleared on reboot)

RuntimeDirectory=deputyos is set on the wizard and gateway units; systemd creates and tears it down per-boot.

PathOwnerModeFormatProducerConsumerEnv override
/run/deputyos/root:root0755dirsystemd RuntimeDirectory=deputyos––
/run/deputyos/relay.sockagent:agent0600Unix socket (SOCK_STREAM)deputyctl --internal-run-relaygateway agentsDEPUTYOS_RELAY_SOCKET
/run/deputyos/wizard.tokenroot:root0600hex tokenwizard at startfirst request to / wizard–
/run/deputyos/wizard.urlroot:root0644one-line URLdeputywizard print-qr / wizarddeputyos-qr-on-tty.service–
/run/deputyos/cloudflared.pidroot:root0644text (pid)deputyctl tunnel updeputyctl tunnel down–
/run/deputyos/deputyos-desktop.pid(host)0644text (pid)deputyos-desktop start (host-side)deputyos-desktop stop/status–
/run/deputyos/cost-trippedagent:agent0644(alternate marker location during tests)cost::evaluategateway–

/home/agent/ — agent user home

Owned by the unprivileged agent user. Each profile has its own ~/.<profile> data directory; the shipped profiles all live under this tree.

PathOwnerModeFormatProducerConsumer
/home/agent/agent:agent0750dirbake (useradd agent)–
/home/agent/.openclaw/agent:agent0700OpenClaw data dirOpenClaw at first runOpenClaw
/home/agent/.hermes/agent:agent0700Hermes data dirHermes at first runHermes
/home/agent/.hermes/sessions.sqliteagent:agent0600SQLite (FTS5 session store)HermesHermes
/home/agent/.hermes/skills/agent:agent0700dir of authored skillsHermes self-improvement loopHermes (and AppArmor ix)
/home/agent/.khoj/agent:agent0700Khoj data dirKhoj at first runKhoj
/home/agent/.khoj/khoj.sqliteagent:agent0600SQLite (Django ORM + chat sessions)KhojKhoj
/home/agent/.khoj/content/agent:agent0700indexed PDFs/markdown/org-modeuser import via KhojKhoj
/home/agent/.khoj/skills/agent:agent0700JSON persona/tool configsKhoj at runtimeKhoj
/home/agent/chat-history.jsonlagent:agent0640JSON-Lines (wizard /chat)wizard /chat/messagewizard /chat page

[upgrade].preserve_dirs in each profile’s manifest names the data dir; deputyctl update keeps these across image swaps. See Profile manifest reference.

/etc/sysctl.d/ — kernel tunables

PathProducerNotes
/etc/sysctl.d/90-deputyos.confbake (90-deputyos.conf.j2)Hardened sysctl baseline for deputyOS hosts. Includes kernel.unprivileged_userns_clone=1 only when a profile that needs it (Hermes) is the active bake target.

/etc/ufw/ — firewall

PathProducerNotes
/etc/ufw/before.rules (replaced)bake (ufw.rules.j2)Default-deny inbound; allow loopback, established, channel ports per active profile.

See also

/run/deputyos — runtime tmpfs cleared on reboot

(Anchor target for cross-references; see the “/run/deputyos/ — runtime (tmpfs, cleared on reboot)” table above.)

Search

Search index isn't built yet. Run npm run build to generate it (Pagefind writes to dist/pagefind/).