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

In AllowDelegated mode, Publish requires at least one delegated IPNS publisher to be configured (Ipns.DelegatedPublishers, possibly augmented by AutoConf). When the resolved list is empty, this error tells the user how to enable delegated publishing or fall back to local-only publishing.

Source

Thrown at core/coreapi/name.go:57

	span.SetAttributes(
		attribute.Bool("allowoffline", options.AllowOffline),
		attribute.String("key", options.Key),
		attribute.Float64("validtime", options.ValidTime.Seconds()),
	)
	if options.TTL != nil {
		span.SetAttributes(attribute.Float64("ttl", options.TTL.Seconds()))
	}

	// Handle different publishing modes
	if options.AllowDelegated {
		// AllowDelegated mode: check if delegated publishers are configured
		cfg, err := api.repo.Config()
		if err != nil {
			return ipns.Name{}, fmt.Errorf("failed to read config: %w", err)
		}
		delegatedPublishers := cfg.DelegatedPublishersWithAutoConf()
		if len(delegatedPublishers) == 0 {
			return ipns.Name{}, errors.New("no delegated publishers configured: add Ipns.DelegatedPublishers or use --allow-offline for local-only publishing")
		}
		// For allow-delegated mode, we only require that we have delegated publishers configured
		// The node doesn't need P2P connectivity since we're using HTTP publishing
	} else {
		// Normal mode: check online status with allow-offline flag
		err = api.checkOnline(options.AllowOffline)
		if err != nil {
			return ipns.Name{}, err
		}
	}

	k, err := keylookup(api.privateKey, api.repo.Keystore(), options.Key)
	if err != nil {
		return ipns.Name{}, err
	}

	eol := time.Now().Add(options.ValidTime)

View on GitHub (pinned to 329838acdf)

Solutions

  1. Configure delegated publishers: `ipfs config --json Ipns.DelegatedPublishers '["https://delegated.ipfs.io"]'`.
  2. Use `--allow-offline` (AllowOffline) for local-only publishing without delegation.
  3. Remove the AllowDelegated option to publish through the normal online DHT path.
  4. If relying on AutoConf, ensure AutoConf is enabled and the autoconf endpoint is reachable.

Example fix

// before
ipfs name publish --allow-delegated /ipfs/<cid>
// after
ipfs config --json Ipns.DelegatedPublishers '["https://delegated.ipfs.io"]'
ipfs name publish --allow-delegated /ipfs/<cid>
Defensive patterns

Strategy: validation

Validate before calling

cfg, err := api.Repo().Config(ctx)
if err == nil && len(cfg.IPNS.DelegatedPublishers) == 0 {
    // configure publishers or use AllowOffline before attempting delegated publish
}

Try / catch

n, err := api.Name().Publish(ctx, p, opts.AllowDelegated(true))
if err != nil && strings.Contains(err.Error(), "no delegated publishers") {
    n, err = api.Name().Publish(ctx, p, opts.AllowOffline(true))
}

Prevention

When it happens

Trigger: Calling Publish with AllowDelegated=true while cfg.DelegatedPublishersWithAutoConf() returns an empty list (no Ipns.DelegatedPublishers in config and AutoConf disabled/unavailable).

Common situations: Fresh node without Ipns.DelegatedPublishers configured; AutoConf disabled so defaults are not fetched; using `ipfs name publish --allow-delegated` on a node with no delegated endpoints.

Related errors


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