# Custom private networks: How to find out the name of the network an application belongs to?

**URL:** <https://community.fly.io/t/custom-private-networks-how-to-find-out-the-name-of-the-network-an-application-belongs-to/21702>\
**Category:** General\
**Tags:** login-only\
**Created:** [September 6, 2024, 3:57pm UTC](https://community.fly.io/t/custom-private-networks-how-to-find-out-the-name-of-the-network-an-application-belongs-to/21702 "2024-09-06T15:57:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmaier](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/tmaier/32/14838_2.png) [@tmaier](https://community.fly.io/u/tmaier)\
**Post date:** [September 6, 2024, 3:57pm UTC](https://community.fly.io/t/custom-private-networks-how-to-find-out-the-name-of-the-network-an-application-belongs-to/21702/1 "2024-09-06T15:57:03Z")

</div>

I am currently investigating [Custom private networks](https://fly.io/docs/networking/custom-private-networks/) for my use case. I want to deploy each service of my application into a dedicated 6PN and [use flycast to connect that application to the consuming application/network](https://fly.io/docs/networking/flycast/#access-an-app-from-another-private-network)

For this, I plan to use deterministic names for the vnet. Aligned to the name of the application.  
However, I also wonder how to find out the name of a 6PN after creating the application. And also how to find out the name of the default 6PN.

---

<div class="post-metadata">

**Author:** ![mayailurus](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/mayailurus/32/17593_2.png) [@mayailurus](https://community.fly.io/u/mayailurus)\
**Post date:** [September 6, 2024, 4:27pm UTC](https://community.fly.io/t/custom-private-networks-how-to-find-out-the-name-of-the-network-an-application-belongs-to/21702/2 "2024-09-06T16:27:13Z")

</div>

Hi… It looks like a fellow user found a way for the first part recently, although it’s not very pretty:

> [@custom network visibility](https://community.fly.io/t/custom-network-visibility/21120/3):
>
> The [List Apps API](https://fly.io/docs/machines/api/apps-resource/#list-apps-in-an-organization) gets the right info though, there seems to be some discrepancy between flyctl and the Machines API
> 
> ```plaintext
> $ curl -i -X GET -H "Authorization: Bearer ${FLY_API_TOKEN}" \
> -H "Content-Type: application/json" \
> "${FLY_API_HOSTNAME}/v1/apps?org_slug=personal"
> 
> ```
> 
> ```json
> {"total_apps":1,"apps":[
> {"id":"p7vx1j0008wqk3z5",
> "name":"app-foo",
> "machine_count":1,
> "network":"app-foo-nw"}
> ]}
> 
> ```

[Formatting tweaked.]

(This was for something originally created via `fly apps create app-foo --network app-foo-nw`.)

Hope this helps a little!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [September 13, 2024, 4:27pm UTC](https://community.fly.io/t/custom-private-networks-how-to-find-out-the-name-of-the-network-an-application-belongs-to/21702/3 "2024-09-13T16:27:32Z")

</div>

Closed on September 13, 2024, 4:27pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
