{"record":{"id":"572f5e0945c20256","repo":"ipfs/kubo","slug":"cannot-add-default-bootstrap-peers-autoconf-is-di","errorCode":null,"errorMessage":"cannot add default bootstrap peers: AutoConf is disabled (AutoConf.Enabled=false). Enable AutoConf by setting AutoConf.Enabled=true in your config, or add specific peer addresses instead","messagePattern":"cannot add default bootstrap peers: AutoConf is disabled \\(AutoConf\\.Enabled=false\\)\\. Enable AutoConf by setting AutoConf\\.Enabled=true in your config, or add specific peer addresses instead","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/bootstrap.go","lineNumber":95,"sourceCode":"\t\tcfgRoot, err := cmdenv.GetConfigRoot(env)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tr, err := fsrepo.Open(cfgRoot)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer r.Close()\n\t\tcfg, err := r.Config()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Check if trying to add \"auto\" when AutoConf is disabled\n\t\tfor _, peer := range inputPeers {\n\t\t\tif peer == config.AutoPlaceholder && !cfg.AutoConf.Enabled.WithDefault(config.DefaultAutoConfEnabled) {\n\t\t\t\treturn errors.New(\"cannot add default bootstrap peers: AutoConf is disabled (AutoConf.Enabled=false). Enable AutoConf by setting AutoConf.Enabled=true in your config, or add specific peer addresses instead\")\n\t\t\t}\n\t\t}\n\n\t\tadded, err := bootstrapAdd(r, cfg, inputPeers)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\treturn cmds.EmitOnce(res, &BootstrapOutput{added})\n\t},\n\tType: BootstrapOutput{},\n\tEncoders: cmds.EncoderMap{\n\t\tcmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *BootstrapOutput) error {\n\t\t\treturn bootstrapWritePeers(w, \"added \", out.Peers)\n\t\t}),\n\t},\n}\n","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/bootstrap.go#L77-L113","documentation":"`ipfs bootstrap add` rejects the \"auto\" placeholder (or \"default\" which maps to it) when AutoConf is disabled in the node config. The command checks `peer == config.AutoPlaceholder && !cfg.AutoConf.Enabled.WithDefault(config.DefaultAutoConfEnabled)` and returns this explanatory error instead of writing an unusable auto-bootstrap entry.","triggerScenarios":"`ipfs bootstrap add auto`, `ipfs bootstrap add default` (converted to \"auto\"), or `ipfs bootstrap add --auto` while the config has AutoConf.Enabled=false.","commonSituations":"Users who disabled AutoConf (AutoConf.Enabled=false) but run generic setup scripts or docs that say `ipfs bootstrap add --default`; environments switched to static peer lists.","solutions":["Enable AutoConf: `ipfs config --json AutoConf.Enabled true`, then retry the add","Instead add concrete peer addresses: `ipfs bootstrap add /dnsaddr/bootstrap.libp2p.io/p2p/Qm...`","Check current state with `ipfs config AutoConf.Enabled` before using the auto placeholder"],"exampleFix":"// before\nipfs bootstrap add default   # fails when AutoConf disabled\n// after\nipfs config --json AutoConf.Enabled true\nipfs bootstrap add default","handlingStrategy":"validation","validationCode":"enabled, _ := exec.Command(\"ipfs\", \"config\", \"AutoConf.Enabled\").Output()\nif strings.TrimSpace(string(enabled)) == \"false\" {\n    // do not use the \"auto\"/\"default\" placeholder; add explicit addresses instead\n}","typeGuard":"null","tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"AutoConf is disabled\") {\n    // fallback: enable AutoConf or add explicit peer addresses\n}","preventionTips":["Check `ipfs config AutoConf.Enabled` before using auto/default placeholders","Decide explicitly between AutoConf-managed and static bootstrap lists in provisioning","Keep config and bootstrap provisioning in one script to avoid state drift","Document the AutoConf requirement in team runbooks"],"tags":["cli","bootstrap","autoconf","config"],"backgroundTag":"feature-disabled-by-config","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"}