Core Concepts
Where is your Hub located?
On this page
By default, your knowledge hub is initialized in a directory named chain-hub in your home folder:
- macOS / Linux:
~/chain-hub(resolves to/Users/<username>/chain-hubor/home/<username>/chain-hub) - Windows:
%USERPROFILE%\chain-hub
Storing the hub in your home directory makes it easy to locate, manually back up, or include in system-wide cloud backups.
Setting a custom Hub path
If you are an advanced user or prefer to keep all project configurations on a secondary drive or within a specific sync directory, you can customize the hub location.
Chain Hub resolves the active hub path in the following order of precedence:
- CLI Override flag:
--chain-home <path>passed directly to anychaincommand. - Environment variable: The
CHAIN_HOMEenvironment variable set in your active shell profile (e.g.export CHAIN_HOME="/Volumes/Data/my-hub"). - CLI Configuration setting: A persistent path value set via the CLI command:
(This config is persisted locally underchain config set chain_home "/path/to/custom-hub"
~/.config/chain-hub/config.json) - Fallback Default:
~/chain-hub.
Verifying the Active Path
To check which path is currently being resolved as your hub home, run the status helper:
chain status
The CLI will output the active path under the label Hub path: along with the source of that path resolution (e.g., (from env) or (from config)).