# Subflow: Environment variable affecting all instances instead of one

**URL:** <https://discourse.nodered.org/t/subflow-environment-variable-affecting-all-instances-instead-of-one/96210>\
**Category:** General\
**Tags:** subflow\
**Created:** [24 March 2025 04:10 UTC](https://discourse.nodered.org/t/subflow-environment-variable-affecting-all-instances-instead-of-one/96210 "2025-03-24T04:10:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hominidae](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hominidae/32/4174_2.png) [@hominidae](https://discourse.nodered.org/u/hominidae)\
**Post date:** [24 March 2025 06:38 UTC](https://discourse.nodered.org/t/subflow-environment-variable-affecting-all-instances-instead-of-one/96210/2 "2025-03-24T06:38:20Z")

</div>

The environment variable is global for all subflow instances. If you want to manage the variables with each subflow instance seperately/individually, use a flow variable instead. A flow variable should be local to each subflow instance.

See also: [Flow variables in subflows](https://discourse.nodered.org/t/flow-variables-in-subflows/65938/1)

---

_[View the full topic](https://discourse.nodered.org/t/subflow-environment-variable-affecting-all-instances-instead-of-one/96210)._
