ipfs/kubo · error
no delegated publishers configured: add Ipns.DelegatedPublis
Error message
no delegated publishers configured: add Ipns.DelegatedPublishers or use --allow-offline for local-only publishing
What it means
`ipfs ipns put --allow-delegated` requires at least one entry in Ipns.DelegatedPublishers (after AutoConf expansion). If cfg.DelegatedPublishersWithAutoConf() returns an empty list, publishing to delegated endpoints is impossible, so the command stops and points the user at the config option or the --allow-offline alternative.
Source
Thrown at core/commands/name/name.go:458
force, _ := req.Options[forceOptionName].(bool)
allowOffline, _ := req.Options[putAllowOfflineOption].(bool)
allowDelegated, _ := req.Options[allowDelegatedOption].(bool)
// Validate flag combinations
if allowOffline && allowDelegated {
return errors.New("cannot use both --allow-offline and --allow-delegated flags")
}
// Handle different publishing modes
if allowDelegated {
// AllowDelegated mode: check if delegated publishers are configured
cfg, err := nd.Repo.Config()
if err != nil {
return fmt.Errorf("failed to read config: %w", err)
}
delegatedPublishers := cfg.DelegatedPublishersWithAutoConf()
if len(delegatedPublishers) == 0 {
return errors.New("no delegated publishers configured: add Ipns.DelegatedPublishers or use --allow-offline for local-only publishing")
}
// For allow-delegated mode, we proceed even if offline
// since we're using HTTP publishing via delegated publishers
}
// Parse the IPNS name argument
nameArg := req.Arguments[0]
if !strings.HasPrefix(nameArg, "/ipns/") {
nameArg = "/ipns/" + nameArg
}
// Extract the name part after /ipns/
namePart := strings.TrimPrefix(nameArg, "/ipns/")
name, err := ipns.NameFromString(namePart)
if err != nil {
return fmt.Errorf("invalid IPNS name: %w", err)
}
// Read raw record bytes from file/stdinView on GitHub (pinned to 329838acdf)
Solutions
- Configure publishers: `ipfs config --json Ipns.DelegatedPublishers '["https://publisher.example"]'`
- Ensure AutoConf is enabled/reachable so defaults can populate the list
- Use `--allow-offline` instead if local-only publishing is acceptable
Example fix
// before ipfs ipns put --allow-delegated --key=self record.bin // error: no delegated publishers configured: ... // after ipfs config --json Ipns.DelegatedPublishers '["https://delegated-publisher.example"]' ipfs ipns put --allow-delegated --key=self record.bin
Defensive patterns
Strategy: validation
Validate before calling
// pre-check before invoking with --allow-delegated
cfg, _ := node.Repo.Config()
pubs := cfg.DelegatedPublishersWithAutoConf()
if len(pubs) == 0 { /* configure publishers or use --allow-offline */ } Prevention
- Configure Ipns.DelegatedPublishers before using --allow-delegated
- Keep AutoConf enabled if relying on discovered defaults
When it happens
Trigger: `ipfs ipns put --allow-delegated ...` on a node where Ipns.DelegatedPublishers is empty and AutoConf does not supply defaults (e.g. AutoConf disabled or unreachable).
Common situations: Fresh nodes without delegated publisher configuration, AutoConf turned off in config, or air-gapped setups where auto-discovery of publishers cannot run.
Understand the failure class
Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.
Related errors
- failed to read config: %w
- cannot specify negative resolve cache size
- failed to read config: %w
- no delegated publishers configured: add Ipns.DelegatedPublis
- cannot specify negative resolve cache size
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/197202cee7a3125e.
Report an issue: GitHub.