Skip to content
Search

InterPlanetary File System

lastmod 2024-05-28created 2015-12-196 edits

IPFS (InterPlanetary File System) is a versioned global P2P file system that borrows many ideas from Git, BitTorrent, HTTP, and others to bring a new protocol for transferring data and data structures to the open web.

Open source is known for developing simple solutions to complex problems that lead to innovation, but such powerful projects are only one facet of the open-source community. IFPS belongs to a more radical group that proves bold, absurd, or even hard-to-execute ideas, and a P2P distributed file system that seeks a way to connect every computing device is exactly such a case. IPFS sustains its community through various channels, including the Git community and an IRC channel that currently has more than 100 contributors. This 'crazy' idea becomes available to try as an alpha test in 2015.

Web Interface

Projects

Private IPFS

Installing and initializing IPFS

First, install and initialize IPFS. You can find how to install IPFS on the official website (https://ipfs.io/).

Creating a Bootstrap node

An IPFS network needs a Bootstrap node. A Bootstrap node is the initial node that other nodes use when looking for new peers. To create a Bootstrap node:

ipfs bootstrap add /ip4/BOOTSTRAP_NODE_IP/tcp/4001/ipfs/BOOTSTRAP_NODE_ID

In the command above, replace BOOTSTRAP_NODE_IP and BOOTSTRAP_NODE_ID with appropriate values and run it. For example, if the Bootstrap node's IP address is 192.168.0.10 and its Peer ID is QmXXXXXXXXXXXXXXX, run the following command.

ipfs bootstrap add /ip4/192.168.0.10/tcp/4001/ipfs/QmXXXXXXXXXXXXXXX

Creating and initializing nodes

Create and initialize a new node. At this point, set the IP address of the Bootstrap node created earlier.

ipfs init --bootstrap /ip4/BOOTSTRAP_NODE_IP/tcp/4001/ipfs/BOOTSTRAP_NODE_ID

Configuring the private network

Run the following command on the new node to configure the private network.

ipfs config --json Swarm.PrivateNetworks '["YOUR_NETWORK_ID"]'

Here, YOUR_NETWORK_ID is the network identifier. This identifier is used to check whether nodes belong to the same private network. The network identifier can be chosen arbitrarily.

Running and connecting nodes

Finally, run each node and connect them to each other. At this point, you must configure it so that only nodes belonging to the private network connect to each other.

ipfs daemon --enable-pubsub-experiment
ipfs swarm connect /ip4/노드IP주소/tcp/4001/ipfs/노드ID

In the command above, replace 노드IP주소 (node IP address) and 노드ID (node ID) with appropriate values and run it. This lets the nodes form a private network among themselves.

Note that IPFS can run into problems in NAT (Network Address Translation) environments, so NAT-related issues must be resolved.

See also

Favorite site

author Zer0 sitemap