# Relay hop not visible in relay client in public network

**URL:** <https://discuss.ipfs.tech/t/relay-hop-not-visible-in-relay-client-in-public-network/14298>\
**Category:** Help\
**Tags:** go-ipfs\
**Created:** [May 24, 2022, 8:32am UTC](https://discuss.ipfs.tech/t/relay-hop-not-visible-in-relay-client-in-public-network/14298 "2022-05-24T08:32:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![susarlanikhilesh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/susarlanikhilesh/32/4112_2.png) [@susarlanikhilesh](https://discuss.ipfs.tech/u/susarlanikhilesh)\
**Post date:** [May 24, 2022, 8:32am UTC](https://discuss.ipfs.tech/t/relay-hop-not-visible-in-relay-client-in-public-network/14298/1 "2022-05-24T08:32:53Z")

</div>

I have two machines which run ipfs and have a public ip address and added each other ipfs id so that they discover themselves. Such that on ipfs daemon start one machine acts as a relay hop.

> **relay server ipfs id**
>
> {  
> “ID”: “12D3KooWJ8S8B118DVjMrAzihsXFvGCGZeYThHH9y9MWanoPuNi1”,  
> “PublicKey”: “CAESIHt+bDOj5ivPVryUfUAm5ihCZydu3Dg8P8QQC26oX0g+”,  
> “Addresses”: [  
> “/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWJ8S8B118DVjMrAzihsXFvGCGZeYThHH9y9MWanoPuNi1”,  
> “/ip4/127.0.0.1/udp/4001/quic/p2p/12D3KooWJ8S8B118DVjMrAzihsXFvGCGZeYThHH9y9MWanoPuNi1”,  
> “/ip4/172.28.1.179/tcp/4001/p2p/12D3KooWJ8S8B118DVjMrAzihsXFvGCGZeYThHH9y9MWanoPuNi1”,  
> “/ip4/172.28.1.179/udp/4001/quic/p2p/12D3KooWJ8S8B118DVjMrAzihsXFvGCGZeYThHH9y9MWanoPuNi1”,  
> “/ip4/52.203.215.176/tcp/4001/p2p/12D3KooWJ8S8B118DVjMrAzihsXFvGCGZeYThHH9y9MWanoPuNi1”,  
> “/ip4/52.203.215.176/udp/4001/quic/p2p/12D3KooWJ8S8B118DVjMrAzihsXFvGCGZeYThHH9y9MWanoPuNi1”,  
> “/ip6/::1/tcp/4001/p2p/12D3KooWJ8S8B118DVjMrAzihsXFvGCGZeYThHH9y9MWanoPuNi1”,  
> “/ip6/::1/udp/4001/quic/p2p/12D3KooWJ8S8B118DVjMrAzihsXFvGCGZeYThHH9y9MWanoPuNi1”  
> ],  
> “AgentVersion”: “go-ipfs/0.12.2/”,  
> “ProtocolVersion”: “ipfs/0.1.0”,  
> “Protocols”: [  
> “/ipfs/bitswap”,  
> “/ipfs/bitswap/1.0.0”,  
> “/ipfs/bitswap/1.1.0”,  
> “/ipfs/bitswap/1.2.0”,  
> “/ipfs/id/1.0.0”,  
> “/ipfs/id/push/1.0.0”,  
> “/ipfs/kad/1.0.0”,  
> “/ipfs/lan/kad/1.0.0”,  
> “/ipfs/ping/1.0.0”,  
> “/libp2p/autonat/1.0.0”,  
> “/libp2p/circuit/relay/0.1.0”,  
> “/libp2p/circuit/relay/0.2.0/hop”,  
> “/libp2p/circuit/relay/0.2.0/stop”,  
> “/p2p/id/delta/1.0.0”,  
> “/x/”  
> ]  
> }

In client machine, I enabled the flag relayclient true and run the daemon and connected to my relayserver public machine and it got swarm connected. Then if I type ipfs id on my relay client machine I should see an address which published via my relay server machine. But I don’t see that and see some other public machines relay server machines address published.

> **client machine ipfs id**
>
> {  
> “ID”: “12D3KooW9ySAnXbPgrUBmcD4t2kdC2t3st3dVbCJv945sjYyuC6u”,  
> “PublicKey”: “CAESIAJSwDsX0mE1pPLndt171QXZoZlMWuz3xuqoF7SfTRli”,  
> “Addresses”: [  
> “/ip4/10.191.244.206/tcp/24783/p2p/12D3KooW9ySAnXbPgrUBmcD4t2kdC2t3st3dVbCJv945sjYyuC6u”,  
> “/ip4/10.191.244.206/udp/24783/quic/p2p/12D3KooW9ySAnXbPgrUBmcD4t2kdC2t3st3dVbCJv945sjYyuC6u”,  
> “/ip4/127.0.0.1/tcp/4001/p2p/12D3KooW9ySAnXbPgrUBmcD4t2kdC2t3st3dVbCJv945sjYyuC6u”,  
> “/ip4/127.0.0.1/udp/4001/quic/p2p/12D3KooW9ySAnXbPgrUBmcD4t2kdC2t3st3dVbCJv945sjYyuC6u”,  
> “/ip4/147.75.195.153/tcp/4001/p2p/QmW9m57aiBDHAkKj9nmFSEn7ZqrcF1fZS4bipsTCHburei/p2p-circuit/p2p/12D3KooW9ySAnXbPgrUBmcD4t2kdC2t3st3dVbCJv945sjYyuC6u”,  
> “/ip4/147.75.195.153/udp/4001/quic/p2p/QmW9m57aiBDHAkKj9nmFSEn7ZqrcF1fZS4bipsTCHburei/p2p-circuit/p2p/12D3KooW9ySAnXbPgrUBmcD4t2kdC2t3st3dVbCJv945sjYyuC6u”,  
> “/ip4/147.75.70.221/tcp/4001/p2p/Qme8g49gm3q4Acp7xWBKg3nAa9fxZ1YmyDJdyGgoG6LsXh/p2p-circuit/p2p/12D3KooW9ySAnXbPgrUBmcD4t2kdC2t3st3dVbCJv945sjYyuC6u”,  
> “/ip4/147.75.70.221/udp/4001/quic/p2p/Qme8g49gm3q4Acp7xWBKg3nAa9fxZ1YmyDJdyGgoG6LsXh/p2p-circuit/p2p/12D3KooW9ySAnXbPgrUBmcD4t2kdC2t3st3dVbCJv945sjYyuC6u”,  
> “/ip4/192.168.1.128/tcp/4001/p2p/12D3KooW9ySAnXbPgrUBmcD4t2kdC2t3st3dVbCJv945sjYyuC6u”,  
> “/ip4/192.168.1.128/udp/4001/quic/p2p/12D3KooW9ySAnXbPgrUBmcD4t2kdC2t3st3dVbCJv945sjYyuC6u”,  
> “/ip6/::1/tcp/4001/p2p/12D3KooW9ySAnXbPgrUBmcD4t2kdC2t3st3dVbCJv945sjYyuC6u”,  
> “/ip6/::1/udp/4001/quic/p2p/12D3KooW9ySAnXbPgrUBmcD4t2kdC2t3st3dVbCJv945sjYyuC6u”  
> ],  
> “AgentVersion”: “go-ipfs/0.12.2/”,  
> “ProtocolVersion”: “ipfs/0.1.0”,  
> “Protocols”: [  
> “/ipfs/bitswap”,  
> “/ipfs/bitswap/1.0.0”,  
> “/ipfs/bitswap/1.1.0”,  
> “/ipfs/bitswap/1.2.0”,  
> “/ipfs/id/1.0.0”,  
> “/ipfs/id/push/1.0.0”,  
> “/ipfs/lan/kad/1.0.0”,  
> “/ipfs/ping/1.0.0”,  
> “/libp2p/autonat/1.0.0”,  
> “/libp2p/circuit/relay/0.1.0”,  
> “/libp2p/circuit/relay/0.2.0/stop”,  
> “/p2p/id/delta/1.0.0”,  
> “/x/”  
> ]  
> }

What am I still missing in my relay server machine so that my client machines publish the id via my own relay server machine.

Thank you

---

<div class="post-metadata">

**Author:** ![ylempereur](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/ylempereur/32/5528_2.png) [@ylempereur](https://discuss.ipfs.tech/u/ylempereur)\
**Post date:** [May 24, 2022, 3:51pm UTC](https://discuss.ipfs.tech/t/relay-hop-not-visible-in-relay-client-in-public-network/14298/2 "2022-05-24T15:51:54Z")

</div>

You don’t get to pick, the relay client makes that decision for you.

---

<div class="post-metadata">

**Author:** ![susarlanikhilesh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/susarlanikhilesh/32/4112_2.png) [@susarlanikhilesh](https://discuss.ipfs.tech/u/susarlanikhilesh)\
**Post date:** [May 24, 2022, 5:05pm UTC](https://discuss.ipfs.tech/t/relay-hop-not-visible-in-relay-client-in-public-network/14298/3 "2022-05-24T17:05:16Z")

</div>

Can we no way mandate that which one to pick ?  
Is there any way where I can make my client pick a dedicated relay server?

Thank you

---

<div class="post-metadata">

**Author:** ![ylempereur](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/ylempereur/32/5528_2.png) [@ylempereur](https://discuss.ipfs.tech/u/ylempereur)\
**Post date:** [May 24, 2022, 5:07pm UTC](https://discuss.ipfs.tech/t/relay-hop-not-visible-in-relay-client-in-public-network/14298/4 "2022-05-24T17:07:36Z")

</div>

I don’t think so, it’s picked by peerID distance (it picks the closest it can find in ID distance). I tried to find where I read this, but I couldn’t find it.

---

<div class="post-metadata">

**Author:** ![susarlanikhilesh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/susarlanikhilesh/32/4112_2.png) [@susarlanikhilesh](https://discuss.ipfs.tech/u/susarlanikhilesh)\
**Post date:** [June 6, 2022, 9:58am UTC](https://discuss.ipfs.tech/t/relay-hop-not-visible-in-relay-client-in-public-network/14298/5 "2022-06-06T09:58:46Z")

</div>

Okay. Now when my relay/hop which are working in public network, like I mean, even if my systems don’t connect to them because of the peer distance some other nodes can get connected right?

Then why can’t the same system work in private network by just adding a swarm key ?  
They still show they are started as hop but the clients don’t publish with relay address? Why ?

Am I missing something?

Thank you

---

<div class="post-metadata">

**Author:** ![ylempereur](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/ylempereur/32/5528_2.png) [@ylempereur](https://discuss.ipfs.tech/u/ylempereur)\
**Post date:** [June 6, 2022, 3:22pm UTC](https://discuss.ipfs.tech/t/relay-hop-not-visible-in-relay-client-in-public-network/14298/6 "2022-06-06T15:22:45Z")

</div>

Apparently, the relay v2 code does not support the use of swarm keys. So, you could create a private network by only using your own servers in bootstraps, but you can’t use swarm keys unless you use port forwarding instead of relay v2.

---

<div class="post-metadata">

**Author:** ![susarlanikhilesh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/susarlanikhilesh/32/4112_2.png) [@susarlanikhilesh](https://discuss.ipfs.tech/u/susarlanikhilesh)\
**Post date:** [June 6, 2022, 3:30pm UTC](https://discuss.ipfs.tech/t/relay-hop-not-visible-in-relay-client-in-public-network/14298/7 "2022-06-06T15:30:36Z")

</div>

So, I have to use [GitHub - libp2p/go-libp2p-relay-daemon: A standalone libp2p circuit relay daemon providing relay service for versions v1 and v2 of the protocol.](https://github.com/libp2p/go-libp2p-relay-daemon) and fall back to v1 in that config and then run this along side of my ipfs daemon to make things work?

---

<div class="post-metadata">

**Author:** ![ylempereur](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/ylempereur/32/5528_2.png) [@ylempereur](https://discuss.ipfs.tech/u/ylempereur)\
**Post date:** [June 6, 2022, 3:32pm UTC](https://discuss.ipfs.tech/t/relay-hop-not-visible-in-relay-client-in-public-network/14298/8 "2022-06-06T15:32:20Z")

</div>

If that works (I have no experience with it)

---

<div class="post-metadata">

**Author:** ![susarlanikhilesh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/susarlanikhilesh/32/4112_2.png) [@susarlanikhilesh](https://discuss.ipfs.tech/u/susarlanikhilesh)\
**Post date:** [June 6, 2022, 3:34pm UTC](https://discuss.ipfs.tech/t/relay-hop-not-visible-in-relay-client-in-public-network/14298/9 "2022-06-06T15:34:14Z")

</div>

> [@HOP\_CANT\_SPEAK\_RELAY error when setting up IPFS private network](https://discuss.ipfs.tech/t/hop-cant-speak-relay-error-when-setting-up-ipfs-private-network/13897/7):
>
> Recommend reading the release notes [Release v0.11.0 · ipfs/go-ipfs · GitHub](https://github.com/ipfs/go-ipfs/releases/tag/v0.11.0) which has the relevant information about the recent changes to relay v1 (i.e. unlimited relaying of your data) within go-ipfs. In particular go-ipfs cannot act as a relay v1 server anymore and there is a separate binary you should run for that. As mentioned in the release notes there’s a standalone relay daemon at [GitHub - libp2p/go-libp2p-relay-daemon: A standalone libp2p circuit relay daemon providing relay service fo…](https://github.com/libp2p/go-libp2p-relay-daemon/)

I tried as he said but stuck at few places. Like where to run that relay-daemon? On the same machine of ipfs daemon(hop) or on a separate machine.

Do you know any who can give a bit of insight on these ?  
Thank you
