Skip to content
SHC Docs

File locations

SHC uses a minimal set of directories with XDG-compliant path resolution.

TypePath
Config~/.config/shc/
State~/.local/share/shc/
Cache~/.cache/shc/
Runtime$XDG_RUNTIME_DIR/shc/ or /tmp/shc-{uid}
Logs~/.local/share/shc/logs/
TypePath
Config/etc/shc/
State/var/lib/shc/
Cache/var/cache/shc/
Runtime/run/shc/
Logs/var/log/shc/

When running from source:

{project_root}/.shc/
├── state/
├── cache/
├── run/
└── logs/
FilePathPurpose
SQLite DB{state_home}/shc.dbDatabase (single-node)
rqlite dir{state_home}/rqlite/Raft engine data (cluster mode)
PID file{runtime_dir}/shc.pidServer process ID
Socket{runtime_dir}/shc.sockCLI-server IPC
Global log{logs_dir}/shc.logSystem-wide logging

SHC supports two database modes (mutually exclusive):

ModeStorageDetection
Single-node{state_home}/shc.dbDefault
Cluster{state_home}/rqlite/{state_home}/engine.json exists
DirectoryPathPurpose
Git cache{cache_home}/git/{url_hash}/Cloned git repos for install

When installing apps from git URLs, repositories are cloned to the cache:

{cache_home}/git/
└── {url_hash}/
├── .git/
├── app.yaml
├── compose.yaml
└── ...

The url_hash is a SHA-256 hash of the normalized git URL.

Deployment state is managed by storage providers, not static paths. The location depends on the configured provider:

ProviderBase Path
Local/var/lib/shc (or configured path)
NFS/mnt/shc/nfs
CephFS/mnt/shc/cephfs

NFS and CephFS paths are fixed for the managed singletons. Local providers can point at any mount you register with shc storage add --path ....

Structure within:

{provider_base_path}/{tenant}/{stack}/{environment}/
├── compose/ # Generated compose files
├── mounts/ # DATA mounts (persistent, backed up)
├── files/ # FILE mounts (regenerated on install)
└── app/ # App definition

Config files are loaded and merged (see Config Files):

PathPurpose
/etc/shc/config.yamlSystem-wide config
/etc/shc/config.d/*.yamlSystem drop-ins
~/.config/shc/config.yamlUser config (non-root)

Runtime config is stored in the database and managed via CLI:

Terminal window
shc config set backup.retention_days 30 --scope global
shc config set backup.retention_days 14 --scope tenant

Backups go to Restic or user-specified paths, not a fixed directory:

Terminal window
# To Restic (configured via backup.repo)
shc backup create mystack
# To explicit path
shc backup create mystack --file /path/to/backup.bak