ipfs/kubo · error
command disabled: %v
Error message
command disabled: %v
What it means
Kubo CLI resolves each command's executor before running it. If a command is declared with both NoLocal and NoRemote set, it can neither run in-process nor be forwarded to the daemon, so makeExecutor refuses it outright with 'command disabled: <path>'. This is a command-definition/configuration guard, not a runtime failure of the command itself.
Source
Thrown at cmd/ipfs/kubo/start.go:260
func apiAddrOption(req *cmds.Request) (ma.Multiaddr, error) {
apiAddrStr, apiSpecified := req.Options[corecmds.ApiOption].(string)
if !apiSpecified {
return nil, nil
}
return ma.NewMultiaddr(apiAddrStr)
}
// encodedAbsolutePathVersion is the version from which the absolute path header in
// multipart requests is %-encoded. Before this version, its sent raw.
var encodedAbsolutePathVersion = semver.MustParse("0.23.0-dev")
func makeExecutor(req *cmds.Request, env any) (cmds.Executor, error) {
exe := tracingWrappedExecutor{cmds.NewExecutor(req.Root)}
cctx := env.(*oldcmds.Context)
// Check if the command is disabled.
if req.Command.NoLocal && req.Command.NoRemote {
return nil, fmt.Errorf("command disabled: %v", req.Path)
}
// Can we just run this locally?
if !req.Command.NoLocal {
if doesNotUseRepo, ok := corecmds.GetDoesNotUseRepo(req.Command.Extra); doesNotUseRepo && ok {
return exe, nil
}
}
// Get the API option from the commandline.
apiAddr, err := apiAddrOption(req)
if err != nil {
return nil, err
}
// Require that the command be run on the daemon when the API flag is
// passed (unless we're trying to _run_ the daemon).
daemonRequested := apiAddr != nil && req.Command != daemonCmdView on GitHub (pinned to 329838acdf)
Solutions
- Run a different command: the invoked command is deliberately not runnable from the CLI in either mode; check `ipfs <cmd> --help` and the command definitions in core/commands/ for alternatives.
- If you maintain a fork or plugin, remove either the NoLocal or NoRemote flag on the command definition so at least one execution path is allowed.
- Upgrade/downgrade kubo: if the command worked before, its NoLocal/NoRemote flags likely changed between versions; compare the command definition across releases.
Example fix
// before (command definition)
Command: &cmds.Command{ NoLocal: true, NoRemote: true, ... }
// after
Command: &cmds.Command{ NoLocal: true, NoRemote: false, Run: daemonRun, ... } Defensive patterns
Strategy: validation
Validate before calling
cmd := root.Find(req.Path)
if cmd != nil && cmd.NoLocal && cmd.NoRemote {
return fmt.Errorf("%s is not runnable in this kubo build", strings.Join(req.Path, " "))
} Type guard
func isCommandRunnable(cmd *cmds.Command) bool {
return !(cmd.NoLocal && cmd.NoRemote)
} Prevention
- Check `ipfs <cmd> --help` availability before scripting around a command.
- When embedding kubo's command tree, grep core/commands/ for NoLocal/NoRemote flags of the commands you expose.
- Pin kubo versions in deployment scripts; review command-definition changes between versions.
- Wrap CLI calls in a helper that maps 'command disabled' to a clear ops message.
When it happens
Trigger: Invoking any ipfs subcommand whose Command struct has both NoLocal=true and NoRemote=true in core/commands; this fires unconditionally before any repo, API-file, or network work, regardless of flags like --api.
Common situations: Running a command that was intentionally marked client-and-daemon-incompatible (e.g. certain low-level or internal commands); hitting it via scripts or plugins after a version change re-classified a command; embedding kubo's command tree in a custom binary and invoking such a command programmatically.
Related errors
- supernode routing was never fully implemented and has been r
- unrecognized routing option: %s
- api flag specified but command cannot be run on the daemon
- command must be run on the daemon: %v
- unsupported API address: %s
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/0dc37df2e28e0e59.
Report an issue: GitHub.