ipfs/kubo · error
%s path (%q) does not exist: %w
Error message
%s path (%q) does not exist: %w
What it means
checkFusePath stats the configured mount path and, when os.Stat reports the path does not exist, returns "%s path (%q) does not exist" wrapping the stat error. FUSE mounts require the mountpoint to be a pre-existing directory (the OS refuses to mount over a nonexistent path), so kubo validates this before attempting the mount.
Source
Thrown at cmd/ipfs/kubo/daemon.go:1291
return err
}
// Extra space after "MFS" so "mounted at:" lines up with IPFS and
// IPNS in the column above. Matches MountCmd's output formatter.
fmt.Printf("IPFS mounted at: %s\n", fsdir)
fmt.Printf("IPNS mounted at: %s\n", nsdir)
fmt.Printf("MFS mounted at: %s\n", mfsdir)
return nil
}
func checkFusePath(name, path string) error {
if path == "" {
return fmt.Errorf("%s path cannot be empty", name)
}
fileInfo, err := os.Stat(path)
if err != nil {
if os.IsNotExist(err) {
return fmt.Errorf("%s path (%q) does not exist: %w", name, path, err)
}
return fmt.Errorf("error while inspecting %s path (%q): %w", name, path, err)
}
if !fileInfo.IsDir() {
return fmt.Errorf("%s path (%q) is not a directory", name, path)
}
return nil
}
func maybeRunGC(req *cmds.Request, node *core.IpfsNode) (<-chan error, error) {
enableGC, _ := req.Options[enableGCKwd].(bool)
if !enableGC {
return nil, nil
}
errc := make(chan error)View on GitHub (pinned to 329838acdf)
Solutions
- Create the missing directory: `sudo mkdir -p /ipfs /ipns` (match the path named in the error)
- Or change config to an existing directory: `ipfs config Mounts.IPFS /some/existing/dir`
- Verify the parent filesystem is mounted and the path exists: `ls -ld <path>` before starting the daemon
- In containers, add a RUN mkdir step or an entrypoint that creates the mount directories before `ipfs daemon --mount`
Example fix
// before
$ ipfs daemon --mount
Error: Mounts.IPFS path ("/ipfs") does not exist: stat /ipfs: no such file or directory
// after
$ sudo mkdir -p /ipfs /ipns
$ ipfs daemon --mount Defensive patterns
Strategy: validation
Validate before calling
for _, p := range []string{cfg.Mounts.IPFS, cfg.Mounts.IPNS, cfg.Mounts.MFS} {
if fi, err := os.Stat(p); err != nil || !fi.IsDir() {
os.MkdirAll(p, 0o755) // or fail with a clear message before daemon start
}
} Prevention
- Create /ipfs and /ipns (and MFS dir) as part of provisioning before starting the daemon
- Add mount-dir creation to container entrypoints
- Avoid configuring mount paths on removable/network volumes that may be unmounted at boot
- Verify with `ls -ld <path>` before `ipfs daemon --mount`
When it happens
Trigger: Running `ipfs daemon --mount` where cfg.Mounts.IPFS/IPNS/MFS (or the corresponding --mount-* flags) name a directory that is absent on disk, e.g. /ipfs on a system where the mount dirs were never created, or a path on a drive that is not currently mounted.
Common situations: Containers/minimal installs that skip the conventional /ipfs and /ipns directories; typo in the configured mount path; network volume holding the mountpoint not yet mounted at daemon start; path removed after config was written.
Related errors
- mountFuse: GetConfig() failed: %s
- mountFuse: ConstructNode() failed: %s
- %s path cannot be empty
- mounting %s: %w
- ipfs api address could not be found
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/a307695f1939dc4a.
Report an issue: GitHub.