IPFs Private Network Setup

Source: Internet
Author: User

IPFs Private Network setup:

1. Prepare at least 2 IPFs nodes

2. Create a shared secret key

3. Configure the nodes that need to be shared with each other.

First, prepare the IPFs node.

1, prepare two Linux nodes, I test the system is Ubuntu 18.04 LTS (click can download).

2, install the IPFs command: (if installed can Shanghai aluminum ignore)

sudo snap install IPFs

3, install the Go-lang environment, the subsequent creation of the shared secret key needs to use. (if installed, ignore)

sudo apt-get install Golang

4, install Git. (Ignore if you have already installed)

sudo apt-get install git

After both Linux servers have completed the IPFs installation, the first step is complete.

Second, create a shared secret key

1. Download the key Generator tool Go-ipfs-swarm-key-gen above GitHub.

sudo git clone https://github.com/Kubuxu/go-ipfs-swarm-key-gen.git

2. Compiling Go-ipfs-swarm-key-gen

sudo go build-o ipfs-swarm-key-gen go-ipfs-swarm-key-gen/ipfs-swarm-key-gen/main.go

The current directory will be a ipfs-swarm-key-gen executable binary file. Then use the file to generate a Swarm.key file

sudo./ipfs-swarm-key-gen > Swarm.key

Copy the Swarm.key file into the. IPFs directory. (Note using Snap to install IPFs then. IPFs directory in ~/snap/ipfs/directory, for example my is under ~/snap/ipfs/589/).

Iii. configuring private networks that are shared with each other

1. Initialize two IPFS nodes respectively.

IPFs Init

2. Delete IPFs default mesh joint point

IPFs Bootstrap RM All

3. Add the address of one of the nodes to the bootstrap list of the other node.

3.1 Execute IPFs ID to view the ID value of the IPFs node.

IPFs node Information

3.2 Add a node address to another node in the bootstrap list

IPFs Bootstrap add/ip4/The IP address of the added node/tcp/4001/ipfs/the ID value of the node being added.

The IPFs private network is now complete.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.