ipfs/kubo · error
old style datatstore config detected
Error message
old style datatstore config detected
What it means
Repo open guard: the config still carries the pre-0.5 'Datastore.Type'/'Datastore.Path' top-level fields, which were replaced by the Datastore.Spec map. Kubo refuses to guess how to open such an old-style datastore.
Source
Thrown at repo/fsrepo/fsrepo.go:490
return err
}
func (r *FSRepo) openKeystore() error {
ksp := filepath.Join(r.path, "keystore")
ks, err := keystore.NewFSKeystore(ksp)
if err != nil {
return err
}
r.keystore = ks
return nil
}
// openDatastore returns an error if the config file is not present.
func (r *FSRepo) openDatastore() error {
if r.config.Datastore.Type != "" || r.config.Datastore.Path != "" {
return fmt.Errorf("old style datatstore config detected")
} else if r.config.Datastore.Spec == nil {
return fmt.Errorf("required Datastore.Spec entry missing from config file")
}
if r.config.Datastore.NoSync {
log.Warn("NoSync is now deprecated in favor of datastore specific settings. If you want to disable fsync on flatfs set 'sync' to false. See https://github.com/ipfs/kubo/blob/master/docs/datastores.md#flatfs.")
}
dsc, err := AnyDatastoreConfig(r.config.Datastore.Spec)
if err != nil {
return err
}
spec := dsc.DiskSpec()
oldSpec, err := r.readSpec()
if err != nil {
return err
}
if oldSpec != spec.String() {View on GitHub (pinned to 329838acdf)
Solutions
- Run the repo migrations to convert the config to the Datastore.Spec format
- Or re-init the repo and re-add content if starting over is acceptable
- Reference: docs/datastores.md for the Spec format
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at repo/fsrepo/fsrepo.go:490 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/708cc371fe2e4ff2.
Report an issue: GitHub.