ipfs/kubo · error

Experimental.StrategicProviding was removed. Remove it from

Error message

Experimental.StrategicProviding was removed. Remove it from your config. Documentation: https://github.com/ipfs/kubo/blob/master/docs/experimental-features.md#strategic-providing

What it means

The Experimental.StrategicProviding flag was removed from Kubo entirely. validateDaemonConfig rejects it at startup instead of ignoring it silently, since the experimental feature no longer exists and the flag indicates a stale config from an older version.

Source

Thrown at cmd/ipfs/kubo/daemon.go:980

		return errors.New("private network does not work with Routing.Type=auto. Update your config to Routing.Type=dht (or none, and do manual peering)")
	}

	// Check for deprecated Provider/Reprovider configuration after migration.
	// This should never happen for regular users, but is useful error for people who have Docker orchestration
	// that blindly sets config keys (overriding automatic Kubo migration).
	//nolint:staticcheck // intentionally checking deprecated fields
	if cfg.Provider.Enabled != config.Default || !cfg.Provider.Strategy.IsDefault() || !cfg.Provider.WorkerCount.IsDefault() {
		return 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")
	}
	//nolint:staticcheck // intentionally checking deprecated fields
	if !cfg.Reprovider.Interval.IsDefault() || !cfg.Reprovider.Strategy.IsDefault() {
		return 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")
	}
	if cfg.Provide.Strategy.WithDefault("") == "flat" {
		return errors.New("Provide.Strategy='flat' is no longer supported. Use 'all' instead. Documentation: https://github.com/ipfs/kubo/blob/master/docs/config.md#providestrategy")
	}
	if cfg.Experimental.StrategicProviding {
		return 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")
	}
	if cfg.Provide.DHT.SweepEnabled.WithDefault(config.DefaultProvideDHTSweepEnabled) &&
		cfg.Provide.DHT.MaxWorkers.WithDefault(config.DefaultProvideDHTMaxWorkers) == 0 {
		return 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")
	}
	if routingOption == routingOptionDelegatedKwd && cfg.Provide.Enabled.WithDefault(config.DefaultProvideEnabled) {
		return errors.New("Routing.Type=delegated does not support content providing. Set Provide.Enabled=false in your config")
	}

	return nil
}

func validateDaemonEnvironment() error {
	if flag := os.Getenv("IPFS_REUSEPORT"); flag != "" {
		return errors.New("support for IPFS_REUSEPORT was removed. Use LIBP2P_TCP_REUSEPORT instead")
	}
	return nil
}

View on GitHub (pinned to 329838acdf)

Solutions

  1. Remove the key: edit $IPFS_PATH/config and delete Experimental.StrategicProviding (or set/remove via `ipfs config --json Experimental.StrategicProviding` appropriately)
  2. If strategic providing behavior is wanted, use the supported Provide.* options (docs/config.md#provide)
  3. Review docs/experimental-features.md for the feature's status

Example fix

// before (config.json)
"Experimental": { "StrategicProviding": true }

// after
"Experimental": {}   // key removed entirely
Defensive patterns

Strategy: validation

Validate before calling

// detect stale experimental flags
jq -e '.Experimental.StrategicProviding != null' "$IPFS_PATH/config" \
  && echo "Experimental.StrategicProviding removed; delete the key"

Try / catch

if err := daemonFunc(...); err != nil {
    if strings.Contains(err.Error(), "StrategicProviding was removed") {
        log.Fatalf("remove stale Experimental flag: %v", err)
    }
}

Prevention

When it happens

Trigger: `ipfs daemon` with Experimental.StrategicProviding=true (or any value) present in the repo config, left over from a Kubo version that had the experiment.

Common situations: Upgrading nodes that once enabled the strategic-providing experiment; config snapshots carried forward across many versions.

Related errors


AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03). Data as JSON: /api/errors/404a866715790da1. Report an issue: GitHub.