Skip to content

fix: wire --config-file flag across all commands - #11121

Closed
lidel wants to merge 1 commit into
masterfrom
fix/config-file-option
Closed

fix: wire --config-file flag across all commands#11121
lidel wants to merge 1 commit into
masterfrom
fix/config-file-option

Conversation

@lidel

@lidel lidel commented Dec 20, 2025

Copy link
Copy Markdown
Contributor

Caution

Opening this as a draft PoC just to see if there is interest / value in correctly wiring up --config-file
Context: https://discuss.ipfs.tech/t/kubo-doesnt-appear-to-honor-the-config-file-option/19927

the --config-file global flag was defined but not properly used by most commands. this fixes the flag to work consistently, allowing config to be stored separately from the repo.

useful for Kubernetes deployments where config comes from a ConfigMap and data lives on a PersistentVolume.

changes:

  • fsrepo: add InitWithUserConfig/OpenWithUserConfig that respect custom config paths
  • fsrepo: fix InitWithUserConfig to create version/datastore_spec even when config file already exists (pre-populated from ConfigMap)
  • commands: update all commands that open repo to use the new functions
  • daemon: add CONFIGURATION FILE MANAGEMENT section to help text explaining difference between --init-config (one-time copy) and --config-file (persistent external path)
  • init: clarify that default-config template preserves Identity

todo

  • test. many tests.
  • (TBD) tests to confirm ipfs init and ipfs daemon --init with and without --config-flag error if config already exists (and maybe add --force to override, if necessary)

the --config-file global flag was defined but not properly used by most
commands. this fixes the flag to work consistently, allowing config to
be stored separately from the repo.

useful for Kubernetes deployments where config comes from a ConfigMap
and data lives on a PersistentVolume.

changes:
- fsrepo: add InitWithUserConfig/OpenWithUserConfig that respect custom
  config paths
- fsrepo: fix InitWithUserConfig to create version/datastore_spec even
  when config file already exists (pre-populated from ConfigMap)
- commands: update all commands that open repo to use the new functions
- daemon: add CONFIGURATION FILE MANAGEMENT section to help text
  explaining difference between --init-config (one-time copy) and
  --config-file (persistent external path)
- init: clarify that default-config template preserves Identity
@lidel

lidel commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Closing: PoC with no takers in nine months, conflicting now. --config-file is still only honored by ipfs config and a few init paths, so the discuss.ipfs.tech report stands. Anyone who needs config split from the repo (ConfigMap plus PersistentVolume) should open an issue with the exact commands they run, and this branch shows the fsrepo wiring involved.

Related: #8925, #6262, #3076

@lidel lidel closed this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants