{"record":{"id":"7401463779bec84c","repo":"ipfs/kubo","slug":"routing-type-delegated-does-not-support-content-pr","errorCode":null,"errorMessage":"Routing.Type=delegated does not support content providing. Set Provide.Enabled=false in your config","messagePattern":"Routing\\.Type=delegated does not support content providing\\. Set Provide\\.Enabled=false in your config","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/ipfs/kubo/daemon.go","lineNumber":987,"sourceCode":"\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\")\n\t}\n\treturn nil\n}\n\n// printLibp2pPorts prints which ports are opened to facilitate swarm connectivity.\nfunc printLibp2pPorts(node *core.IpfsNode) {\n\tif !node.IsOnline {\n\t\tfmt.Println(\"Swarm not listening, running in offline mode.\")\n\t\treturn\n\t}","sourceCodeStart":969,"sourceCodeEnd":1005,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/cmd/ipfs/kubo/daemon.go#L969-L1005","documentation":"Routing.Type=delegated uses only delegated routing endpoints and has no DHT capability, so content providing (announcing CIDs) is unsupported. validateDaemonConfig refuses startup when delegated routing is combined with Provide.Enabled=true (explicitly or by default).","triggerScenarios":"`ipfs daemon --routing=delegated` (or Routing.Type=delegated in config) while Provide.Enabled is true or unset (defaulting to enabled).","commonSituations":"Gateway/light-client setups using delegated routing that inherit the default Provide.Enabled=true; users switching Routing.Type to delegated without touching Provide settings.","solutions":["Disable providing: `ipfs config --json Provide.Enabled false`","Or switch routing: use Routing.Type=dht (or none/auto) if announcing content is required","For CLI usage, combine the config change with `ipfs daemon --routing=delegated`"],"exampleFix":"// before\n$ ipfs daemon --routing=delegated\nError: Routing.Type=delegated does not support content providing...\n\n// after\n$ ipfs config --json Provide.Enabled false\n$ ipfs daemon --routing=delegated","handlingStrategy":"validation","validationCode":"// delegated routing requires providing disabled\nrt=$(ipfs config Routing.Type 2>/dev/null); pe=$(ipfs config --json Provide.Enabled 2>/dev/null)\nif [ \"$rt\" = delegated ] && [ \"$pe\" != false ]; then echo \"set Provide.Enabled=false for Routing.Type=delegated\"; fi","typeGuard":null,"tryCatchPattern":"if err := daemonFunc(...); err != nil {\n    if strings.Contains(err.Error(), \"delegated does not support content providing\") {\n        log.Fatalf(\"disable Provide.Enabled or change routing: %v\", err)\n    }\n}","preventionTips":["Pair every --routing=delegated deployment with Provide.Enabled=false in the template","Recheck Provide defaults when changing Routing.Type","Add a config pre-flight check to daemon startup scripts"],"tags":["config","routing","provide","validation"],"backgroundTag":"incompatible-config-combination","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"}