ipfs/kubo · error
%s is not a profile
Error message
%s is not a profile
What it means
`ipfs config profile apply <name>` looks the profile up in config.Profiles, the registry of built-in profiles (server, local-discovery, test, etc.). If the name is absent from that map, Kubo returns '<name> is not a profile' without touching the config.
Source
Thrown at core/commands/config.go:445
Subcommands: map[string]*cmds.Command{
"apply": configProfileApplyCmd,
},
}
var configProfileApplyCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Apply profile to config.",
},
Options: []cmds.Option{
cmds.BoolOption(configDryRunOptionName, "print difference between the current config and the config that would be generated"),
},
Arguments: []cmds.Argument{
cmds.StringArg("profile", true, false, "The profile to apply to the config."),
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
profile, ok := config.Profiles[req.Arguments[0]]
if !ok {
return fmt.Errorf("%s is not a profile", req.Arguments[0])
}
dryRun, _ := req.Options[configDryRunOptionName].(bool)
cfgRoot, err := cmdenv.GetConfigRoot(env)
if err != nil {
return err
}
oldCfg, newCfg, err := transformConfig(cfgRoot, req.Arguments[0], profile.Transform, dryRun)
if err != nil {
return err
}
oldCfgMap, err := scrubPrivKey(oldCfg)
if err != nil {
return err
}
View on GitHub (pinned to 329838acdf)
Solutions
- List valid names in the docs/help: `ipfs config profile apply --help` documents the built-in profiles
- Use an existing profile such as server, local-discovery, test, default-datastore, flat-fs, badgerds
- Fix the spelling of the profile name
- If you need custom defaults, script `ipfs config set`/`ipfs config replace` calls instead of a profile
Example fix
// before $ ipfs config profile apply serverr serverr is not a profile // after $ ipfs config profile apply server applied profile 'server'
Defensive patterns
Strategy: validation
Validate before calling
known="server local-discovery test default-datastore flat-fs badgerds"; [[ " $known " == *" $p "* ]] || { echo "$p is not a profile"; exit 1; } Try / catch
if err := run("ipfs", "config", "profile", "apply", p); err != nil {
if strings.HasSuffix(err.Error(), "is not a profile") {
// surface the list of valid profiles to the caller
}
} Prevention
- Read `ipfs config profile apply --help` for the current built-in profile list
- Never invent profile names; custom defaults belong in scripts or `ipfs config replace`
- Re-check profile names after upgrading Kubo; profiles can be added or deprecated
When it happens
Trigger: `ipfs config profile apply <name>` with a misspelled name, a custom/invented name, or a deprecated/removed profile name from old documentation.
Common situations: Following outdated tutorials referencing retired profiles; typos in profile names; expecting user-defined profiles to be supported (they are not — only built-ins); scripts parameterized over profile names.
Related errors
- invalid configuration profile: %s
- cannot add default bootstrap peers: AutoConf is disabled (Au
- cannot remove individual bootstrap peers when using 'auto' p
- cannot set Identity.PeerID to a value that does not match th
- failed to unmarshal json. %s
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/573dbf45bbc3657d.
Report an issue: GitHub.