ipfs/kubo · error
creating keystore base directory: %w
Error message
creating keystore base directory: %w
What it means
Fired during provider/keystore construction when creating the base directory for the keystore datastores (<repo>/KeystoreDatastorePath, e.g. via os.MkdirAll) fails — typically due to filesystem permissions or a full disk. The wrapped error aborts node startup since the provider keystore cannot be set up.
Source
Thrown at core/node/provider.go:640
}
// Find the root datastore type (levelds, pebbleds, etc.)
rootSpec := findRootDatastoreSpec(repoCfg.Datastore.Spec)
// Keystore datastores live at <repo>/{KeystoreDatastorePath}/<suffix>
keystoreBasePath := filepath.Join(repoPath, KeystoreDatastorePath)
createDs := func(suffix string) (datastore.Batching, error) {
if err := validateKeystoreSuffix(suffix); err != nil {
return nil, err
}
// In-memory datastore in no-schedule mode (keystore is inert)
// or when no datastore spec is configured (test/mock repos).
if noScheduleMode || rootSpec == nil {
return datastore.NewMapDatastore(), nil
}
if err := os.MkdirAll(keystoreBasePath, 0o755); err != nil {
return nil, fmt.Errorf("creating keystore base directory: %w", err)
}
ds, err := openDatastoreAt(rootSpec, filepath.Join(keystoreBasePath, suffix))
if err != nil {
return nil, err
}
providerLog.Infow("provider keystore: opened datastore", "suffix", suffix, "path", filepath.Join(keystoreBasePath, suffix))
return ds, nil
}
destroyDs := func(suffix string) error {
if err := validateKeystoreSuffix(suffix); err != nil {
return err
}
if noScheduleMode {
return nil
}
providerLog.Infow("provider keystore: removing datastore from disk", "suffix", suffix, "path", filepath.Join(keystoreBasePath, suffix))
return os.RemoveAll(filepath.Join(keystoreBasePath, suffix))View on GitHub (pinned to 329838acdf)
Solutions
- Check permissions on the repo directory and free disk space
- Verify the path is not read-only or a file
- Fix the underlying filesystem issue and restart the daemon
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at core/node/provider.go:640 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/ed8097c52c3dd77f.
Report an issue: GitHub.