ipfs/kubo · error · errAllowOffline

can't publish while offline: pass `--allow-offline` to overr

Error message

can't publish while offline: pass `--allow-offline` to override or `--allow-delegated` if Ipns.DelegatedPublishers are set up

What it means

Sentinel error substituted for iface.ErrOffline when 'ipfs name publish' runs while the node is offline: publishing to the DHT needs network connectivity. It tells the user the two supported offline escape hatches (--allow-offline for local-only publish, --allow-delegated when Ipns.DelegatedPublishers are configured).

Source

Thrown at core/commands/name/publish.go:19

package name

import (
	"errors"
	"fmt"
	"io"
	"time"

	cmdenv "github.com/ipfs/kubo/core/commands/cmdenv"
	"github.com/ipfs/kubo/core/commands/cmdutils"

	ipns "github.com/ipfs/boxo/ipns"
	cmds "github.com/ipfs/go-ipfs-cmds"
	ke "github.com/ipfs/kubo/core/commands/keyencode"
	iface "github.com/ipfs/kubo/core/coreiface"
	options "github.com/ipfs/kubo/core/coreiface/options"
)

var errAllowOffline = errors.New("can't publish while offline: pass `--allow-offline` to override or `--allow-delegated` if Ipns.DelegatedPublishers are set up")

const (
	ipfsPathOptionName       = "ipfs-path"
	resolveOptionName        = "resolve"
	allowOfflineOptionName   = "allow-offline"
	allowDelegatedOptionName = "allow-delegated"
	lifeTimeOptionName       = "lifetime"
	ttlOptionName            = "ttl"
	keyOptionName            = "key"
	quieterOptionName        = "quieter"
	v1compatOptionName       = "v1compat"
	sequenceOptionName       = "sequence"
)

var PublishCmd = &cmds.Command{
	Helptext: cmds.HelpText{
		Tagline: "Publish IPNS names.",
		ShortDescription: `

View on GitHub (pinned to 329838acdf)

Solutions

  1. Bring the daemon online (wait for DHT connectivity) and retry the publish
  2. Pass --allow-offline to publish only to the local datastore without network
  3. If Ipns.DelegatedPublishers are set up, pass --allow-delegated to publish via the HTTP delegated publishers
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at core/commands/name/publish.go:19 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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