ipfs/kubo · error

cannot remove individual bootstrap peers when using 'auto' p

Error message

cannot remove individual bootstrap peers when using 'auto' placeholder: the 'auto' value is managed by AutoConf. Either disable AutoConf by setting AutoConf.Enabled=false and replace 'auto' with specific peer addresses, or use 'ipfs bootstrap rm --all' to remove all peers

What it means

When the node's bootstrap list contains the "auto" placeholder and AutoConf is enabled, individual peer removal is not allowed because AutoConf manages that list. bootstrapRemove returns this error directing the user to either disable AutoConf and use explicit addresses, or remove everything with `ipfs bootstrap rm --all`.

Source

Thrown at core/commands/bootstrap.go:330

		cfg.Bootstrap = append(cfg.Bootstrap, s)
		addedMap[s] = struct{}{}
	}

	if err := r.SetConfig(cfg); err != nil {
		return nil, err
	}

	return addedList, nil
}

func bootstrapRemove(r repo.Repo, cfg *config.Config, toRemove []string) ([]string, error) {
	// Check if bootstrap contains "auto"
	hasAuto := slices.Contains(cfg.Bootstrap, config.AutoPlaceholder)

	if hasAuto && cfg.AutoConf.Enabled.WithDefault(config.DefaultAutoConfEnabled) {
		// Cannot selectively remove peers when using "auto" bootstrap
		// Users should either disable AutoConf or replace "auto" with specific peers
		return nil, fmt.Errorf("cannot remove individual bootstrap peers when using 'auto' placeholder: the 'auto' value is managed by AutoConf. Either disable AutoConf by setting AutoConf.Enabled=false and replace 'auto' with specific peer addresses, or use 'ipfs bootstrap rm --all' to remove all peers")
	}

	// Original logic for non-auto bootstrap
	removed := make([]peer.AddrInfo, 0, len(toRemove))
	keep := make([]peer.AddrInfo, 0, len(cfg.Bootstrap))

	toRemoveAddr, err := config.ParseBootstrapPeers(toRemove)
	if err != nil {
		return nil, err
	}
	toRemoveMap := make(map[peer.ID][]ma.Multiaddr, len(toRemoveAddr))
	for _, addr := range toRemoveAddr {
		toRemoveMap[addr.ID] = addr.Addrs
	}

	peers, err := cfg.BootstrapPeers()
	if err != nil {
		return nil, err

View on GitHub (pinned to 329838acdf)

Solutions

  1. Remove all peers at once: `ipfs bootstrap rm --all`, then add your static list
  2. Disable AutoConf first: `ipfs config --json AutoConf.Enabled false`, replace `auto` with explicit addresses via `ipfs bootstrap add`, then remove individual peers
  3. Use `ipfs bootstrap list` to confirm whether the list is auto-managed before scripting removals

Example fix

// before
ipfs bootstrap rm /ip4/1.2.3.4/tcp/4001/p2p/Qm...  # fails with auto list
// after
ipfs bootstrap rm --all
ipfs bootstrap add /ip4/1.2.3.4/tcp/4001/p2p/Qm... # your static list
Defensive patterns

Strategy: validation

Validate before calling

list, _ := exec.Command("ipfs", "bootstrap", "list").Output()
if strings.Contains(string(list), "auto") {
    // auto-managed: use `ipfs bootstrap rm --all` or disable AutoConf first
}

Type guard

null

Try / catch

if err != nil && strings.Contains(err.Error(), "'auto' placeholder") {
    // fallback: rm --all then add the static list
}

Prevention

When it happens

Trigger: `ipfs bootstrap rm <addr>` (or multiple specific addresses) while `ipfs config Bootstrap` contains the "auto" placeholder and AutoConf.Enabled is true (or defaulted on).

Common situations: Operators on default AutoConf-managed setups trying to prune a bad peer; automation written for static bootstrap lists running against auto-managed nodes.

Related errors


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