# How can I tell which region a fly app is being served from?

**URL:** <https://community.fly.io/t/how-can-i-tell-which-region-a-fly-app-is-being-served-from/12336>\
**Category:** Questions / Help\
**Tags:** login-only\
**Created:** [April 19, 2023, 8:02am UTC](https://community.fly.io/t/how-can-i-tell-which-region-a-fly-app-is-being-served-from/12336 "2023-04-19T08:02:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrchrisadams](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/mrchrisadams/32/43002_2.png) [@mrchrisadams](https://community.fly.io/u/mrchrisadams)\
**Post date:** [April 19, 2023, 8:02am UTC](https://community.fly.io/t/how-can-i-tell-which-region-a-fly-app-is-being-served-from/12336/1 "2023-04-19T08:02:07Z")

</div>

hi there,

When I receive a request to my application, I’d like to be able to expose the fly region I am serving the response from, and ideally figure out a way to serve the carbon intensity of the energy it’s using.

So if I am in say New York, and I am running an application in Montreal, I’d want to be able to surface that it’s being served from a Montreal datacentre, where the energy has a much lower carbon intensity than than other parts of North America.

_(let’s put aside issues about latency for now - I use montreal as an simple example)_

Is there a native way to do this?

I think that in my own application, I could look for the `FLY_REGION` environment variable exposed to my app, then add something like a `Via` header to my own HTTP response, but it wasn’t clear to me whether this was already being done, or if I’d need to roll my own solution for my own apps.

You can see more abot the `FLY_REGION` variables below:

> **[The Machine Runtime Environment](https://fly.io/docs/machines/runtime-environment/)**
>
> Documentation and guides from the team at Fly.io.

---

<div class="post-metadata">

**Author:** ![simse](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/simse/32/11349_2.png) [@simse](https://community.fly.io/u/simse)\
**Post date:** [April 19, 2023, 10:52am UTC](https://community.fly.io/t/how-can-i-tell-which-region-a-fly-app-is-being-served-from/12336/2 "2023-04-19T10:52:32Z")

</div>

To answer your question, the Fly proxy does not expose the allocation region, but it does expose the edge region where the request was picked up. So, like you said, you would have to roll your own solution for that part.

---

<div class="post-metadata">

**Author:** ![catflydotio](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/catflydotio/32/14559_2.png) [@catflydotio](https://community.fly.io/u/catflydotio)\
**Post date:** [April 27, 2024, 12:37am UTC](https://community.fly.io/t/how-can-i-tell-which-region-a-fly-app-is-being-served-from/12336/3 "2024-04-27T00:37:42Z")

</div>

From #How To to #Questions / Help

---

<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:** [May 4, 2024, 12:38am UTC](https://community.fly.io/t/how-can-i-tell-which-region-a-fly-app-is-being-served-from/12336/4 "2024-05-04T00:38:35Z")

</div>

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