# IPFS local network only without swarming to public internet

**URL:** <https://discuss.ipfs.tech/t/ipfs-local-network-only-without-swarming-to-public-internet/17430>\
**Category:** Help\
**Tags:** js-ipfs\
**Created:** [January 10, 2024, 9:38pm UTC](https://discuss.ipfs.tech/t/ipfs-local-network-only-without-swarming-to-public-internet/17430 "2024-01-10T21:38:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![koh-osug](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/koh-osug/32/8305_2.png) [@koh-osug](https://discuss.ipfs.tech/u/koh-osug)\
**Post date:** [January 10, 2024, 9:38pm UTC](https://discuss.ipfs.tech/t/ipfs-local-network-only-without-swarming-to-public-internet/17430/1 "2024-01-10T21:38:26Z")

</div>

I want to use IPFS for data replication within a local network. What I need is a local network only instance which does not send data to the public internet. How does such a setup look like? I have set `PublicIPNetwork: false,` to the `dht` config and I have configured mDNS discovery and given no bootstrap nodes. What else is needed?

I know that there is a question from [2018](https://discuss.ipfs.tech/t/can-we-setup-a-private-network-using-ipfs/3861) and also a [document](https://github.com/ipfs/kubo/blob/master/docs/experimental-features.md#private-networks) but since 2018 maybe things are simpler now.

- What is `"Addresses": { "Swarm": [...] ` What must be inside the ellipsis? A priori no other addresses are known in my case. mDNS should do it.
- What is the meaning of `LIBP2P_FORCE_PNET`?
- What about the port 5001 and 4001 and UPnP? This also has to be disabled in the firewall?
- Is there in the meantime an easy flag all handling a private network?

I’m using orbitdb on top of it.

---

<div class="post-metadata">

**Author:** ![tennox](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/tennox/32/8311_2.png) [@tennox](https://discuss.ipfs.tech/u/tennox)\
**Post date:** [January 12, 2024, 10:29am UTC](https://discuss.ipfs.tech/t/ipfs-local-network-only-without-swarming-to-public-internet/17430/2 "2024-01-12T10:29:09Z")

</div>

Probably also relevant:  
[Routing.Type](https://github.com/ipfs/kubo/blob/master/docs/config.md#routingtype) - custom

---

<div class="post-metadata">

**Author:** ![koxon](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/koxon/32/6613_2.png) [@koxon](https://discuss.ipfs.tech/u/koxon)\
**Post date:** [January 20, 2024, 3:46am UTC](https://discuss.ipfs.tech/t/ipfs-local-network-only-without-swarming-to-public-internet/17430/3 "2024-01-20T03:46:27Z")

</div>

You should look into this:

> **[IPFS Cluster | IPFS Docs](https://docs.ipfs.tech/install/server-infrastructure/#create-a-local-cluster)**
>
> IPFS Cluster provides data orchestration across a swarm of IPFS daemons by allocating, replicating, and tracking a global pin-set distributed among multiple peers. Learn how to install it here.

---

<div class="post-metadata">

**Author:** ![koh-osug](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/koh-osug/32/8305_2.png) [@koh-osug](https://discuss.ipfs.tech/u/koh-osug)\
**Post date:** [January 20, 2024, 3:50am UTC](https://discuss.ipfs.tech/t/ipfs-local-network-only-without-swarming-to-public-internet/17430/4 "2024-01-20T03:50:19Z")

</div>

How to do this in a program with Helia?
