Skip to content

Instantly share code, notes, and snippets.

@developerfred
Forked from tgerring/ipfs-guide-mac.md
Created November 5, 2019 19:06
Show Gist options
  • Save developerfred/4b849252408185245525f19107c0e61f to your computer and use it in GitHub Desktop.
Save developerfred/4b849252408185245525f19107c0e61f to your computer and use it in GitHub Desktop.
IPFS Mac Guide

IPFS Guide

Mac Installation

  1. Install Homebrew
  2. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  3. Install prerequisites
  4. brew install git hg
  5. brew install osxfuse (see Mac issues to troubleshoot common errors)
  6. Install Go
  7. Follow go-ipfs installation instructions
  8. go get github.com/jbenet/go-ipfs/cmd/ipfs
  9. cd $GOPATH/src/github.com/jbenet/go-ipfs/cmd/ipfs
  10. go install
  11. ipfs init (default configuration location is ~/.go-ipfs)

Getting started

Manipulating objects

  1. ipfs add <path to file or directory>
  • note the resulting object hash

Interfaces

Mount

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.

  1. ipfs mount
  • see General Issues to troubleshoot common errors
  • when working correctly, you should see mounting ipfs at <mount path> and mounting 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
  1. 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"

HTTP

TODO

General issues

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

Mac issues

  • System crash when using ipfs mount
    • Install the latest Fuse with brew install osxfuse
  • 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment