POSTED 30 Nov 2018 15:25

Interacting with the IPFS protocol: a tutorial for beginner

OWNER
S
Silver84

For Linux and Mac: go-ipfs github and build from source

For Windows user: Download Prebuild package and extract the go-ipfs folder.

Download the open source programming language software Go from Golang.org

In your IPFS foder, move the files ipfs.exe into the bin folder of your Go folder

Open your terminal and type the command:

ipfs help

And then type:
ipfs init

The command line will then give you your peer identity in the form of a hash
 ipfs init
 initializing ipfs node at /Users/xxxx/.go-ipfs
 generating 2048-bit RSA keypair...done
  peer identity: Qmcpo2iLBikrdf1d6QU6vXuNb6P7hwrbNPW9kLAH8eG67z
  to get started, enter:

        ipfs cat /ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme

Save your peer identity (the Hash) in a text file.
Now, try running:
ipfs cat /ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme

You should see something like this:
Hello and Welcome to IPFS!

██╗██████╗ ███████╗███████╗
██║██╔══██╗██╔════╝██╔════╝
██║██████╔╝█████╗  ███████╗
██║██╔═══╝ ██╔══╝  ╚════██║
██║██║     ██║     ███████║
╚═╝╚═╝     ╚═╝     ╚══════╝

If you're seeing this, you have successfully installed
IPFS and are now interfacing with the ipfs merkledag!

 -------------------------------------------------------
| Warning:                                              |
|   This is alpha software. use at your own discretion! |
|   Much is missing or lacking polish. There are bugs.  |
|   Not yet secure. Read the security notes for more.   |
 -------------------------------------------------------

Check out some of the other files in this directory:

  ./about
  ./help
  ./quick-start     <-- usage examples
  ./readme          <-- this file
  ./security-notes

Open another terminal and type the command:
ipfs daemon

You will then get
 > ipfs daemon API<br> Initializing daemon...<br>API server listening on /ip4/127.0.0.1/tcp/4001<br>Gateway server listening on /ip4/127.0.0.1/tcp/8080

Boomshakalaka your are now using an ipfs node and you can start interacted with the protocol!