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-hub or /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:

  1. CLI Override flag: --chain-home <path> passed directly to any chain command.
  2. Environment variable: The CHAIN_HOME environment variable set in your active shell profile (e.g. export CHAIN_HOME="/Volumes/Data/my-hub").
  3. CLI Configuration setting: A persistent path value set via the CLI command:
    chain config set chain_home "/path/to/custom-hub"
    (This config is persisted locally under ~/.config/chain-hub/config.json)
  4. 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)).