The ipfs cluster has to be altered to make it work with other peers. So, one node needs to be initialized first [This docker-compose file is in master branch]. Then other nodes will initialized based on cluster details of the first node located in defined-cluster branch. Steps:
- Docker-compose run the first node
- Go to /data/ipfs-cluster or whichever mapped location
- Open service.json
- In Other nodes folder at location Other nodes\individual\cluster\run.sh
- Change “/cluster daemon --bootstrap /ip4//tcp/9096/ipfs/” with
- Run the docker-compose file in the other node
- After running docker-compose, a service.json file will be created in the same location as the first node for the second node. Go there and change private_key field to match with the private_key of the first node. This is the magic that prevents others from joining in a cluster.
- Docker restart the containers