How to host files using InterPlanetary File System IPFS

InterPlanetary File System in short IPFS is a new hypermedia distribution protocol, addressed by content and identities. IPFS enables the creation of completely distributed applications. Besides, it is also a distributed file system that seeks to connect all computing devices with the same system of files. IPFS is more similar to the BitTorrent to host files peer to peer without the intermediary involved. The point of creating IPFS is to solve HTTP problems such as DDOS and server issues. Day by day, IPFS is becoming a new major subsystem of the internet and it could complement or replace HTTP. In this tutorial, I will teach you on how to host files using interplanetary file system IPFS on your computer.

Install IPFS

You need to install IPFS on your computer. Visit ipfs.io/docs/install/ to get it right now.

Init the IPFS

To init the IPFS, open your terminal or command prompt and insert the following command line.

You will see this output in your terminal

Start IPFS

Enter “ipfs daemon” in your terminal to start the ipfs services on your computer.

Check IPFS peers

After starting the ipfs services, you can check connected peers by the following command line.

Open IPFS Object

To get the objects from the IPFS network and download it on your computer.

Check Local IPFS Object

It will display a list of hash that your local ipfs downloaded the object.

Add File to IPFS Network

To add files to the IPFS network, you can type the following command in your terminal. Example u want to upload “abc.png”.

To make it online forever

By pinning the object, it disables garbage collection within 24 hours, the file will available as long as your daemon is running. That’s mean if you didn’t pin it, the files will disappear in the network within 24 hours.

To access the file

Go to the gateway.ipfs.ios ipfs link

or your localhost ipfs link

Web Console

You can check nodes and your peers in the web console by just access it.

Example screenshot of Web console

(Visited 128 times, 1 visits today)
Advertisements

Kristofer Ng

A crazy android and web developer. Passion on developing android application and exploring new technology as a hobby.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

GET YOUR EBOOK FOR FREE

Unlock free ebook "Beginning Programming ALL-IN-ONE Desk Reference for DUMMIES" now!

We will send a copy to your email