chef/doc/ipfs_cluster.md

2.5 KiB

Join the IPFS cluster

Get the cluster secret from a core team member. The cluster secret can be used to remove peers and pins, so we cannot make it public.

On your server

Install the latest version of go-ipfs, as well as ipfs-cluster-ctl and ipfs-cluster-service 0.10.1 from https://dist.ipfs.io/

ipfs-cluster-ctl and ipfs-cluster-service must be the same version as the rest of the cluster.

For basic usage of IPFS, see the docs

You need to open port 9096 from the outside using your firewall for the cluster

Join the cluster through a known host (andromeda):

ipfs@your_server:~$ CLUSTER_SECRET=*SECRET* ipfs-cluster-service daemon --bootstrap "/ip4/46.4.18.160/tcp/9096/ipfs/QmNVfAhxJrmkqkCHdoD6iZgJJaWkhehskeWWZ9cNZxNwo1"

If joining was successful, you should see your server in the list of peers of the cluster, and each peer should see the same number of peers. Here's an example of the current peers:

ipfs@andromeda:~$ ipfs-cluster-ctl peers ls
QmNVfAhxJrmkqkCHdoD6iZgJJaWkhehskeWWZ9cNZxNwo1 | andromeda.kosmos.org | Sees 1 other peers
  > Addresses:
    - /ip4/127.0.0.1/tcp/9096/ipfs/QmNVfAhxJrmkqkCHdoD6iZgJJaWkhehskeWWZ9cNZxNwo1
    - /ip4/46.4.18.160/tcp/9096/ipfs/QmNVfAhxJrmkqkCHdoD6iZgJJaWkhehskeWWZ9cNZxNwo1
    - /p2p-circuit/ipfs/QmNVfAhxJrmkqkCHdoD6iZgJJaWkhehskeWWZ9cNZxNwo1
  > IPFS: QmZ4Lpzhz8bafbTYvEMMCmrbrMM4JfyHDR23WbCSAd9bo7
    - /ip4/127.0.0.1/tcp/4001/ipfs/QmZ4Lpzhz8bafbTYvEMMCmrbrMM4JfyHDR23WbCSAd9bo7
    - /ip4/46.4.18.160/tcp/4001/ipfs/QmZ4Lpzhz8bafbTYvEMMCmrbrMM4JfyHDR23WbCSAd9bo7
    - /ip6/2a01:4f8:221:39c1::2/tcp/4001/ipfs/QmZ4Lpzhz8bafbTYvEMMCmrbrMM4JfyHDR23WbCSAd9bo7
    - /ip6/::1/tcp/4001/ipfs/QmZ4Lpzhz8bafbTYvEMMCmrbrMM4JfyHDR23WbCSAd9bo7
QmTVC6eguRWoS2W18QnPHt64h8t5yQmYRhvoZcdgr4Ax2V | dev | Sees 1 other peers
  > Addresses:
    - /ip4/127.0.0.1/tcp/9096/ipfs/QmTVC6eguRWoS2W18QnPHt64h8t5yQmYRhvoZcdgr4Ax2V
    - /ip4/144.76.39.171/tcp/9096/ipfs/QmTVC6eguRWoS2W18QnPHt64h8t5yQmYRhvoZcdgr4Ax2V
    - /p2p-circuit/ipfs/QmTVC6eguRWoS2W18QnPHt64h8t5yQmYRhvoZcdgr4Ax2V
  > IPFS: QmWY7vNysM1jgHFBuSr9Y2ayG5tUeKmGBjwjN9x6pEVxRb
    - /ip4/127.0.0.1/tcp/4001/ipfs/QmWY7vNysM1jgHFBuSr9Y2ayG5tUeKmGBjwjN9x6pEVxRb
    - /ip4/144.76.39.171/tcp/4001/ipfs/QmWY7vNysM1jgHFBuSr9Y2ayG5tUeKmGBjwjN9x6pEVxRb
    - /ip6/2a01:4f8:191:40aa::2/tcp/4001/ipfs/QmWY7vNysM1jgHFBuSr9Y2ayG5tUeKmGBjwjN9x6pEVxRb
    - /ip6/::1/tcp/4001/ipfs/QmWY7vNysM1jgHFBuSr9Y2ayG5tUeKmGBjwjN9x6pEVxRb

You can now stop the daemon process (ctrl+c) and start it using the service of your choice (probably Systemd)