ipfs/kubo · error
mountFuse: GetConfig() failed: %s
Error message
mountFuse: GetConfig() failed: %s
What it means
mountFuse reads the node configuration via cctx.GetConfig() before performing FUSE mounts (/ipfs, /ipns, MFS). If the config cannot be loaded — unreadable repo, corrupt config file, missing $IPFS_PATH — the error is wrapped as "mountFuse: GetConfig() failed". It is a pre-mount config access failure, not a FUSE problem itself.
Source
Thrown at cmd/ipfs/kubo/daemon.go:1239
errc := make(chan error, 1)
go func() {
errc <- h.Serve()
close(errc)
}()
context.AfterFunc(node.Context(), func() {
h.Close()
})
return errc, nil
}
// collects options and opens the fuse mountpoint.
func mountFuse(req *cmds.Request, cctx *oldcmds.Context) error {
cfg, err := cctx.GetConfig()
if err != nil {
return fmt.Errorf("mountFuse: GetConfig() failed: %s", err)
}
fsdir, found := req.Options[ipfsMountKwd].(string)
if !found {
fsdir = cfg.Mounts.IPFS
}
if err := checkFusePath("Mounts.IPFS", fsdir); err != nil {
return err
}
nsdir, found := req.Options[ipnsMountKwd].(string)
if !found {
nsdir = cfg.Mounts.IPNS
}
if err := checkFusePath("Mounts.IPNS", nsdir); err != nil {
return err
}
View on GitHub (pinned to 329838acdf)
Solutions
- Check IPFS_PATH and confirm the repo exists and is initialized: run `ipfs init` if missing
- Validate the config parses: `ipfs config show` and fix any JSON corruption or remove the bad key
- Fix file permissions on $IPFS_PATH/config so the daemon user can read it
- Confirm Mounts.IPFS/Mounts.IPNS/Mounts.MFS values are valid paths in the config
Example fix
// before IPFS_PATH=/wrong/path ipfs daemon --mount // after export IPFS_PATH=~/.ipfs ipfs init # if repo missing ipfs daemon --mount
Defensive patterns
Strategy: validation
Validate before calling
if _, err := cctx.GetConfig(); err != nil {
// resolve repo/config before invoking daemon --mount
return fmt.Errorf("config unreadable: %w", err)
} Try / catch
if err := mountFuse(req, cctx); err != nil {
var wrapped string = err.Error()
if strings.Contains(wrapped, "GetConfig() failed") {
// check IPFS_PATH, run ipfs init, fix config permissions
}
return err
} Prevention
- Always set IPFS_PATH explicitly in scripts and CI
- Run `ipfs init` before any daemon/mount operation on a fresh machine
- Validate config with `ipfs config show` after manual edits
- Keep repo ownership consistent with the user running the daemon
When it happens
Trigger: Running `ipfs daemon --mount` (or `ipfs mount`) when the repo config is unreadable: IPFS_PATH points to a non-existent/uninitialized repo, config file permissions deny access, or the config JSON is corrupt.
Common situations: Wrong IPFS_PATH environment variable; repo not initialized (`ipfs init` never run); config file truncated by a failed edit; running as a different user than the repo owner so permissions fail.
Related errors
- %s path cannot be empty
- mountFuse: ConstructNode() failed: %s
- %s path (%q) does not exist: %w
- 'mounts' field is missing or not an array
- expected map for mountpoint
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/0b00dd073d5cf240.
Report an issue: GitHub.