# Ipfs-cluster issue

**URL:** <https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328>\
**Category:** Help\
**Created:** [October 26, 2017, 6:14am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328 "2017-10-26T06:14:33Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.ipfs.tech/u/Tim)\
**Post date:** [October 26, 2017, 6:14am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/1 "2017-10-26T06:14:33Z")

</div>

anybody knows how to run ipfs-cluster on linux?  
I downloaded a Pre-compiled binaries and tar it in centos 7.2( no GO environment installed in this machine so I just tar the ipfs-cluster-service and ipfs-cluster-ctl)

 ![](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/1X/c4b1eaadff27a8a06a47aa6e23ae6e274f071ce2.png)

but when I entered the ipfs-cluster-service folder and tried to run it, then I got a problem that “ipfs-cluster-service command not found”  
 ![](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/1X/1ef1f8a13406d671d9628667b2f74d5290b9f235.png)

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.ipfs.tech/u/Tim)\
**Post date:** [October 26, 2017, 8:27am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/2 "2017-10-26T08:27:55Z")

</div>

maybe the problem is how to install ipfs-cluster-service and ipfs-cluster-ctl on linux by pre-built binaries?

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [October 26, 2017, 8:54am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/3 "2017-10-26T08:54:42Z")

</div>

hey, @Tim

are you sure you are running `$ ./ipfs-cluster-service` and not `$ ipfs-cluster-service` from the folder in which you downloaded it (and unpacked it)?

Otherwise you’d need to place it in your PATH.

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.ipfs.tech/u/Tim)\
**Post date:** [October 27, 2017, 2:16am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/4 "2017-10-27T02:16:36Z")

</div>

thank you @hector  
but I am still confused about how to add a " friend node " into my ipfs-cluster in “bootstrap” and “cluster\_peers”  
 ![](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/1X/925f00bd47767330f1e021afb6f0041f4de45f2f.png)  
and

 ![](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/1X/e3c09898dd1d9936dde42cfac72876dfe9754ab8.png)  
is this id the ipfs id or ipfs-cluster id?

the tutorial shows I need to share same cluster secret with other nodes,so do I need to cover others’ secret? ![](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/1X/c0d243768493a6e191196871b38faa96f30f268e.png)

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [October 27, 2017, 9:26am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/5 "2017-10-27T09:26:08Z")

</div>

Hello,

first, download `0.2.1` as there were some bugs in `0.2.0` reading the config file.

> Is this id the ipfs id or ipfs-cluster id?

That’s the ID from the ipfs-cluster peer that you are bootstrapping to. (Found in the config of that peer or with `ipfs-cluster-ctl --host 192.168.1.2:9096 id`

Note that you can add that node to the bootstrap section of the other, or you can start both peers with their multiaddresses in `peers`.

The `secret` should be the same in all peers configuration.

This is explained here: [https://github.com/ipfs/ipfs-cluster/blob/master/docs/ipfs-cluster-guide.md#starting-your-cluster](https://github.com/ipfs/ipfs-cluster/blob/master/docs/ipfs-cluster-guide.md#starting-your-cluster)

If it’s not clear enough, let me know how we can improve it!

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.ipfs.tech/u/Tim)\
**Post date:** [October 31, 2017, 2:19am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/6 "2017-10-31T02:19:32Z")

</div>

thank you @hector  
I still have some questions about ipfs-cluster.  
I “ipfs add” a file at one ipfs-cluster node, but the other node didnt "pin " that file automatically even over the time ![](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/1X/3dd486d71420ee3a81b07c33586b08ac54b155e6.png). I thought the other node would pin that file automatically.

I didnt know the function of ipfs-cluster-ctl…

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [October 31, 2017, 10:28am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/7 "2017-10-31T10:28:20Z")

</div>

did you `ipfs add` or `ipfs-cluster-ctl pin add` ?

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.ipfs.tech/u/Tim)\
**Post date:** [November 1, 2017, 2:20am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/8 "2017-11-01T02:20:48Z")

</div>

yes，I “ipfs add” a file at a ipfs-cluster node A, and I want that file is automatically pinned to other node B in the same iPad-cluster, but it didn’t succeed.

If I ipfs-cluster-ctl pin add that file manually, I can read that file even A is closed…but I want this operation should be automatic.

Thank u @hector

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [November 1, 2017, 10:05am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/9 "2017-11-01T10:05:11Z")

</div>

Hi,

please have a look here: [https://github.com/ipfs/ipfs-cluster/blob/master/docs/ipfs-cluster-guide.md#using-the-ipfs-proxy](https://github.com/ipfs/ipfs-cluster/blob/master/docs/ipfs-cluster-guide.md#using-the-ipfs-proxy)

If you do `ipfs pin add`, you are interacting with ipfs only, and cluster has no way of tracking your pin.

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.ipfs.tech/u/Tim)\
**Post date:** [November 3, 2017, 7:15am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/10 "2017-11-03T07:15:36Z")

</div>

@hector tnx  
yes I know that. I just want to “ipfs add” a file at A node, and when ipfs of A is shutdown and ipfs-cluster of A is also shutdown, I can stil “ipfs cat” at B node. and I want that process should be automatical.

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [November 3, 2017, 9:33am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/11 "2017-11-03T09:33:43Z")

</div>

@Tim, just do `ipfs-cluster-ctl pin add` at any of the nodes and configure your cluster replication factor to -1, or 2 (if you just have 2 nodes). This will ensure all nodes have the file automatically and you can `ipfs cat` it regardless of who is down.

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.ipfs.tech/u/Tim)\
**Post date:** [November 3, 2017, 9:54am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/12 "2017-11-03T09:54:21Z")

</div>

@hector ohh. Do u mean I need to "ipfs-cluster-Ctl pin add " manually?then it’s ok even other node is down.

So how can I do ipfs-cluster-ctl pin add automatically by the machine if there is a new file at other node

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [November 3, 2017, 10:00am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/13 "2017-11-03T10:00:20Z")

</div>

@Tim, then you need to use the IPFS proxy as explained in the link above:

`ipfs --api /ip4/127.0.0.1/tcp/9095 add myfile.txt`: this is like `ipfs add` except you point to cluster and not to ipfs directly. This will 1) Add the file to ipfs 2) pin it in cluster. It is equivalent to:

```auto
$ cid=$(ipfs add -q myfile.txt)
$ ipfs-cluster-ctl pin add $cid

```

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.ipfs.tech/u/Tim)\
**Post date:** [November 3, 2017, 10:02am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/14 "2017-11-03T10:02:53Z")

</div>

@hector  
so how can I achieve it in Java,coz I use ipfs.add(File file) to upload a file

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [November 3, 2017, 11:03am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/15 "2017-11-03T11:03:17Z")

</div>

I don’t know which java library your are using, if it allows you to modify the ipfs api endpoint, or how it is implemented…

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.ipfs.tech/u/Tim)\
**Post date:** [November 4, 2017, 2:43pm UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/16 "2017-11-04T14:43:29Z")

</div>

[https://github.com/ipfs/java-ipfs-api](https://github.com/ipfs/java-ipfs-api) @hector

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.ipfs.tech/u/Tim)\
**Post date:** [November 7, 2017, 1:50am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/17 "2017-11-07T01:50:12Z")

</div>

![](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/1X/42a7596aa92b36081cae5f91a3fcb1e93910eb09.png)  
I dont know why…

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [November 15, 2017, 11:21am UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/18 "2017-11-15T11:21:08Z")

</div>

Heads up: the 0% bar should be fixed in latest master, but regardless of it, adding was successful.

---

<div class="post-metadata">

**Author:** ![Tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@Tim](https://discuss.ipfs.tech/u/Tim)\
**Post date:** [November 16, 2017, 3:23pm UTC](https://discuss.ipfs.tech/t/ipfs-cluster-issue/1328/19 "2017-11-16T15:23:36Z")

</div>

ohh, I see. but 9095 port seems not stable if other peers down
