# Launch public circuit relays

**URL:** <https://discuss.ipfs.tech/t/launch-public-circuit-relays/10370>\
**Category:** Help\
**Tags:** js-ipfs, go-ipfs\
**Created:** [March 1, 2021, 4:38pm UTC](https://discuss.ipfs.tech/t/launch-public-circuit-relays/10370 "2021-03-01T16:38:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![choetech160](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/choetech160/32/4662_2.png) [@choetech160](https://discuss.ipfs.tech/u/choetech160)\
**Post date:** [March 1, 2021, 4:38pm UTC](https://discuss.ipfs.tech/t/launch-public-circuit-relays/10370/1 "2021-03-01T16:38:29Z")

</div>

I’m building a chat app using ipfs and orbitdb. I currently have a desktop app which works perfectly on local networks but as soon as the greater internet is involve, databases do not sync anymore. I think this can be resolved using circuit-relays and in the future the autoRelay feature, but I can’t find how to deploy my own circuit relay.

±----------------------------+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ±-----------------------------------+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ±---------------------------+  
| Desktop app&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| Public circuit relay&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Desktop app&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |  
| behind NAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | &nbsp;&nbsp; \<==\> &nbsp;&nbsp; | on heroku or aws&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| &nbsp;&nbsp; \<==\> &nbsp; | behind NAT &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |  
±----------------------------+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ±-----------------------------------+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ±----------------------------+

I followed the [circuit-relaying](https://github.com/ipfs/js-ipfs/tree/master/examples/circuit-relaying) tutorial, which works very well but is all run locally. But when deploying on an AWS instance for example I get a bunch of errors as the node being unreachable.

 ![error_127-0-1](https://us1.discourse-cdn.com/flex020/uploads/ipfs1/original/2X/a/adeb743fc3b4d41f48234a15450811dedab9bf20.png)

My ipfs config

```json
const ipfsOptions = {
  //preload: { enabled: false },
  repo: "./ipfs",
  relay:{ enabled:true, hop: { enabled:true, active: true}},
  EXPERIMENTAL: { pubsub: true },
  config: {
    Bootstrap: [],
    Addresses: { Swarm: [
      "/dns4/secure-beyond-12878.herokuapp.com/tcp/80/ws/p2p-webrtc-star",
      "/dns4/wrtc-star1.par.dwebops.pub/tcp/443/wss/p2p-webrtc-star",
      "/dns4/blooming-springs-75345.herokuapp.com/tcp/443/wss/p2p-webrtc-star/"
    ],
    "API":"/ip4/127.0.0.1/tcp/5001",
    "Gateway": "/ip4/127.0.0.1/tcp/8080"
  },
  }
};

```

Once the ipfs node is running inside the app, I’m trying to connect to the circuit relay as such  
`await ipfsNode.swarm.connect("/ip4/127.0.0.1/tcp/4004/p2p/12D3KooWNMx9mV7hxqgVns5B2FSJBfv1UyqJFRHMyupC9Z9PDZ1h");`

Anyone know what I’m doing wrong or if what I want to do can work?

---

<div class="post-metadata">

**Author:** ![vasco-santos](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vasco-santos/32/3806_2.png) [@vasco-santos](https://discuss.ipfs.tech/u/vasco-santos)\
**Post date:** [March 3, 2021, 2:29pm UTC](https://discuss.ipfs.tech/t/launch-public-circuit-relays/10370/2 "2021-03-03T14:29:55Z")

</div>

You are trying to dial a node using a TCP address, when your node does not have a TCP transport.

Browser does not support TCP, so you will need to connect to a websockets address of the relay.
