# Java ipfs API connection problem

**URL:** <https://discuss.ipfs.tech/t/java-ipfs-api-connection-problem/2166>\
**Category:** Help\
**Tags:** go-ipfs\
**Created:** [February 25, 2018, 7:31am UTC](https://discuss.ipfs.tech/t/java-ipfs-api-connection-problem/2166 "2018-02-25T07:31:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shishi614](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@shishi614](https://discuss.ipfs.tech/u/shishi614)\
**Post date:** [February 25, 2018, 7:31am UTC](https://discuss.ipfs.tech/t/java-ipfs-api-connection-problem/2166/1 "2018-02-25T07:31:05Z")

</div>

IPFS ipfs = new IPFS("/ip4/127.0.0.1/tcp/5001");

I built a private network,  
When establishing a connection, how to make a public gateway for the private network so that there is no single point of failure when accessing resources later.The above connection string specifies the public gateway for the private network. Not a connection to a particular node.  
For example, like public network pain, [https://ipfs.io/ipfs](https://ipfs.io/ipfs) access resources.  
Thanks.
