IPFS: Using Dockers

Below you will find instructions for the deployment of IPFS nodes using docker-compose. This implies that it will run on your local machine and you must have docker and docker compose installed. At this moment the only network available is the Open ProTestnet. For deploying nodes in the Mainnet we recommend you to install using Ansible or using Kubernetes.

Minimum System Requirements

Recommended hardware features for IPFS node:

Recommended HardwareOn Mainnet-Omega
CPU2 vCPUs
RAM Memory2 GB
Hard Disk10 GB SSD
  • Docker Host:

It is necessary to enable the following network ports in the machine in which we are going to deploy the ipfs node:

  • IPFS Peers:
    • 4001: TCP – Port to establish Communication p2p with other peers.

    • 5001: TCP – API Server.

    • 8080: TCP – Gateway server.

Pre-requisites

Install Docker Desktop

For this installation we will use docker-compose. It is necessary to install docker and docker-compose on a local machine that will perform the installation of the node .

Following the instructions to install docker desktop in your local machine.

Clone Repository

To configure and install IPFS node, you must clone this git repository in your local machine.

 
				
					$ git clone https://github.com/LACNetNetworks/ipfs.git
$ cd ipfs/docker/compose
				
			

Node Installation

Environment variable

  • IPFS Node:

    • IPFS_LOGGING: LOGGING – Level logging IPFS (INFO, DEBUG) – default INFO.

    • IPFS_SWARM_KEY_FILE: Path swarm key to private network.

    • IPFS_PATH: Path ipfs data.

    • LIBP2P_FORCE_PNET: Force private network.

Deploying the new node

  • To deploy a IPFS Node

				
					$ docker-compose  up -d
				
			

Checking your connection

You can check if your ipfs node is connected to the network LAC_Net.

Check that the node has stablished the connections with the peers:

				
					$ curl http://localhost:8080/ipfs/QmeLSZuyZK8Gzg5Am2miiPP4vt4cX84aWUeu6uzt96VbXT
				
			

You should get a result like this:

				
					welcome to ipfs LACNet (open-protest)
				
			

Now you can check if the node is syncing blocks by getting the log:

				
					$ docker logs <container name> -f 
$ docker logs ipfs-lacchain  -f
				
			

If any of these two checks doesn’t work, try to restart the besu service: e.g.

				
					$ docker-compose  stop
$ docker-compose  up -d
				
			

Contact

If that doesn’t solve the problem, open a ticket if you already have a membership or contact us at [email protected].

Copyright 2024 © All rights Reserved. Designed by LACNet