- Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install prerequisites
brew install git hg
brew install osxfuse
(see Mac issues to troubleshoot common errors)- Install Go
- Follow go-ipfs installation instructions
go get github.com/jbenet/go-ipfs/cmd/ipfs
cd $GOPATH/src/github.com/jbenet/go-ipfs/cmd/ipfs
go install
ipfs init
(default configuration location is ~/.go-ipfs)
ipfs add <path to file or directory>
- note the resulting object hash
When running in mount mode, go-ipfs attempts to mount IPFS inside directories on your system with FUSE. This allows for referencing and accessing objects as if they were a part of your local filesystem.
ipfs mount
- see General Issues to troubleshoot common errors
- when working correctly, you should see
mounting ipfs at <mount path>
andmounting ipns at <mount path>
, followed by a blank line. This means it's running! Subsequent commands will need to be run at a separate terminal prompt
- Verify your object is available:
ls <mount point>/<object hash>
- This uses the system directory listing command NOT go-ipfs
- Running
ls
against a bad hash should result in "No such file or directory"
TODO
When running ipfs mount
, you may get errors similar to the following:
ipfs mount: exit status 64: mount_osxfusefs: /ipfs: No such file or directory
- Make sure the mounting directory exists
- Default values are
/ipfs
and/ipns
- Supply custom values with flags:
ipfs mount -f="/Users/myaccountname/ipfs" -n="/Users/myaccountname/ipns"
ipfs mount: exit status 71: mount_osxfusefs: failed to mount /ipfs@/dev/osxfuse0: Operation not permitted
- Make sure the mounting directory has correct permissions. For exmaple, mount in a location in your user directory
- System crash when using
ipfs mount
- Install the latest Fuse with
brew install osxfuse
- Install the latest Fuse with
- Brew error
osxfuse: osxfuse is already installed from the binary distribution and conflicts with this formula.
- Fuse may have been installed as part of another binary package
- Install latest Fuse for OS X including Preferences Pane. After installation is complete, navigate to System Preferences -> FUSE for OS X -> Click "Remove OSXFUSE"
- Try to
brew install osxfuse
again
Hm. I have no errors (after figuring out exactly what I ought to do), but also no files on the
ipfs
andipns
directories (I placed them inside my user because I was trouble getting the file permissions right).Why? The system
mount
command shows the two mount points via Fuse.ipfs
is running, I can access all my files from the IPFS Desktop, via web to the usual port, or even usingipfs ls <hash>
(or even see that the files are correctly being retrieved usingipfs cat <hash> > /tmp/filename
). Nevertheless, using either the Finder or the command line to navigate to the mounted folders, they are either empty, or, if I place anything inside them, they are just local files — not sync'ed with IPFS.(Note that there is an
.ipfs
directory for my user — presumably set up by IPFS Desktop — which holds data in a completely different structure; I believe this is as it ought to be).Some more info: I'm running macOS Big Sur version 11.0.1 (20B29), IPFS Desktop 0.13.2 and go-ipfs 0.7.0; I also use Brave with the IPFS extension (2.15.0). The actual command line to run
ipfs
is/Applications/IPFS Desktop.app/Contents/Resources/app.asar.unpacked/node_modules/go-ipfs/go-ipfs/ipfs daemon --migrate --enable-gc --routing dhtclient
.