{"record":{"id":"9bdcc4b4a66ee701","repo":"ipfs/kubo","slug":"provide-strategy-flat-is-no-longer-supported-us","errorCode":null,"errorMessage":"Provide.Strategy='flat' is no longer supported. Use 'all' instead. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#providestrategy","messagePattern":"Provide\\.Strategy='flat' is no longer supported\\. Use 'all' instead\\. Documentation: https://github\\.com/ipfs/kubo/blob/master/docs/config\\.md#providestrategy","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/ipfs/kubo/daemon.go","lineNumber":977,"sourceCode":"\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}\n\n\treturn nil\n}\n\nfunc validateDaemonEnvironment() error {\n\tif flag := os.Getenv(\"IPFS_REUSEPORT\"); flag != \"\" {\n\t\treturn errors.New(\"support for IPFS_REUSEPORT was removed. Use LIBP2P_TCP_REUSEPORT instead\")","sourceCodeStart":959,"sourceCodeEnd":995,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/cmd/ipfs/kubo/daemon.go#L959-L995","documentation":"The 'flat' provide strategy was removed from Kubo; validateDaemonConfig rejects Provide.Strategy='flat' at daemon startup and directs users to 'all'. Flat providing (legacy flatfs-era behavior) is no longer implemented, so the config value is invalid.","triggerScenarios":"`ipfs daemon` with Provide.Strategy explicitly or effectively set to \"flat\" in the config (after migrating legacy Provider.Strategy=flat or Reprovider.Strategy=flat).","commonSituations":"Configs migrated from old flat-namespace nodes whose strategy value was copied verbatim; scripts templating strategy='flat' from old documentation.","solutions":["Set the new value: `ipfs config Provide.Strategy all`","Or choose another supported value (e.g. 'pins', 'mfs', 'roots', 'pinned', 'edge') per docs/config.md#providestrategy","Update deployment templates that still emit 'flat'"],"exampleFix":"// before (config.json)\n\"Provide\": { \"Strategy\": \"flat\" }\n\n// after\n$ ipfs config Provide.Strategy all","handlingStrategy":"validation","validationCode":"// reject removed strategy before start\ns=$(jq -r '.Provide.Strategy // empty' \"$IPFS_PATH/config\")\n[ \"$s\" = flat ] && echo \"Provide.Strategy=flat removed; use all (docs/config.md#providestrategy)\"","typeGuard":null,"tryCatchPattern":"if err := daemonFunc(...); err != nil {\n    if strings.Contains(err.Error(), \"no longer supported. Use 'all'\") {\n        log.Fatalf(\"replace Provide.Strategy: %v\", err)\n    }\n}","preventionTips":["Never template 'flat' into Provide.Strategy","Validate Provide.Strategy against current docs on deploy","Sanitize migrated legacy values (map flat->all) in migration scripts"],"tags":["config","deprecation","provide-strategy","validation"],"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"}