{"record":{"id":"ab68dc2e1542235f","repo":"ipfs/kubo","slug":"deprecated-configuration-detected-manually-migrat","errorCode":null,"errorMessage":"deprecated configuration detected. Manually migrate 'Provider' fields to 'Provide' and remove 'Provider' from your config. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#provide","messagePattern":"deprecated configuration detected\\. Manually migrate 'Provider' fields to 'Provide' and remove 'Provider' from your config\\. Documentation: https://github\\.com/ipfs/kubo/blob/master/docs/config\\.md#provide","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/ipfs/kubo/daemon.go","lineNumber":970,"sourceCode":"\t\treturn manet.IP4Loopback.Encapsulate(rest)\n\tcase first.Equal(&manet.IP6Unspecified[0]):\n\t\treturn manet.IP6Loopback.Encapsulate(rest)\n\tdefault:\n\t\treturn maddr // not ip\n\t}\n}\n\nfunc validateDaemonConfig(cfg *config.Config, routingOption string, privateNetwork bool) error {\n\tif privateNetwork && (routingOption == routingOptionAutoKwd || routingOption == routingOptionAutoClientKwd) {\n\t\treturn errors.New(\"private network does not work with Routing.Type=auto. Update your config to Routing.Type=dht (or none, and do manual peering)\")\n\t}\n\n\t// Check for deprecated Provider/Reprovider configuration after migration.\n\t// This should never happen for regular users, but is useful error for people who have Docker orchestration\n\t// that blindly sets config keys (overriding automatic Kubo migration).\n\t//nolint:staticcheck // intentionally checking deprecated fields\n\tif cfg.Provider.Enabled != config.Default || !cfg.Provider.Strategy.IsDefault() || !cfg.Provider.WorkerCount.IsDefault() {\n\t\treturn errors.New(\"deprecated configuration detected. Manually migrate 'Provider' fields to 'Provide' and remove 'Provider' from your config. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#provide\")\n\t}\n\t//nolint:staticcheck // intentionally checking deprecated fields\n\tif !cfg.Reprovider.Interval.IsDefault() || !cfg.Reprovider.Strategy.IsDefault() {\n\t\treturn errors.New(\"deprecated configuration detected. Manually migrate 'Reprovider' fields to 'Provide': Reprovider.Strategy -> Provide.Strategy, Reprovider.Interval -> Provide.DHT.Interval. Remove 'Reprovider' from your config. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#provide\")\n\t}\n\tif cfg.Provide.Strategy.WithDefault(\"\") == \"flat\" {\n\t\treturn errors.New(\"Provide.Strategy='flat' is no longer supported. Use 'all' instead. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#providestrategy\")\n\t}\n\tif cfg.Experimental.StrategicProviding {\n\t\treturn errors.New(\"Experimental.StrategicProviding was removed. Remove it from your config. Documentation: https://github.com/ipfs/kubo/blob/master/docs/experimental-features.md#strategic-providing\")\n\t}\n\tif cfg.Provide.DHT.SweepEnabled.WithDefault(config.DefaultProvideDHTSweepEnabled) &&\n\t\tcfg.Provide.DHT.MaxWorkers.WithDefault(config.DefaultProvideDHTMaxWorkers) == 0 {\n\t\treturn errors.New(\"invalid configuration: Provide.DHT.MaxWorkers cannot be 0 when Provide.DHT.SweepEnabled=true. Set Provide.DHT.MaxWorkers to a positive value (e.g., 16) to control resource usage. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#providedhtmaxworkers\")\n\t}\n\tif routingOption == routingOptionDelegatedKwd && cfg.Provide.Enabled.WithDefault(config.DefaultProvideEnabled) {\n\t\treturn errors.New(\"Routing.Type=delegated does not support content providing. Set Provide.Enabled=false in your config\")\n\t}","sourceCodeStart":952,"sourceCodeEnd":988,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/cmd/ipfs/kubo/daemon.go#L952-L988","documentation":"validateDaemonConfig detects the removed Provider.* config section (Enabled, Strategy, WorkerCount) after Kubo's automatic migration should have replaced it with Provide.*. It refuses to start so stale keys silently overriding behavior are surfaced, typically caused by external tooling re-injecting old keys.","triggerScenarios":"`ipfs daemon` when the repo config still contains Provider.Enabled (non-default), Provider.Strategy, or Provider.WorkerCount — e.g. Docker orchestration or scripts that write Provider.* keys, defeating the automatic migration that runs at init/upgrade.","commonSituations":"Upgrading from an older Kubo while IaC/Docker compose/env-based provisioning keeps writing deprecated Provider fields; configs shared between nodes of mixed versions.","solutions":["Migrate values: Provider.Enabled -> Provide.Enabled, Provider.Strategy -> Provide.Strategy, Provider.WorkerCount -> Provide.DHT.MaxWorkers","Remove the Provider section: `ipfs config --json Provider '{}'` or edit $IPFS_PATH/config and delete Provider.*","Update deployment tooling (compose files, env writers, config templates) to only emit Provide.* keys","Consult docs/config.md#provide for the new option names"],"exampleFix":"// before (config.json)\n\"Provider\": { \"Enabled\": true, \"Strategy\": \"flat\" }\n\n// after\n\"Provide\": { \"Enabled\": true, \"Strategy\": \"all\", \"DHT\": { \"MaxWorkers\": 16 } }\n// and delete the \"Provider\" section entirely","handlingStrategy":"validation","validationCode":"// fail fast if legacy Provider keys present\ncfg=\"$IPFS_PATH/config\"\njq -e '.Provider.Enabled != null or .Provider.Strategy != null or .Provider.WorkerCount != null' \"$cfg\" \\\n  && echo \"legacy Provider.* keys present: migrate to Provide.* and delete Provider\"","typeGuard":null,"tryCatchPattern":"if err := daemonFunc(...); err != nil {\n    if strings.Contains(err.Error(), \"deprecated configuration detected\") {\n        log.Fatalf(\"migrate Provider->Provide: %v\", err)\n    }\n}","preventionTips":["Use only Provide.* keys in config templates and IaC","Run `ipfs config show | jq '.Provider'` as a post-upgrade check","Keep one canonical config source across nodes of all versions","Read docs/config.md#provide when porting old configs"],"tags":["config","deprecation","provider","migration"],"backgroundTag":"deprecated-config-key","analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}