# Forge env vars require redeploy?

**URL:** <https://community.developer.atlassian.com/t/forge-env-vars-require-redeploy/68805>\
**Category:** Forge\
**Tags:** env-vars, environments\
**Created:** [April 25, 2023, 12:59pm UTC](https://community.developer.atlassian.com/t/forge-env-vars-require-redeploy/68805 "2023-04-25T12:59:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JamesDuffy1](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@JamesDuffy1](https://community.developer.atlassian.com/u/JamesDuffy1)\
**Post date:** [April 25, 2023, 12:59pm UTC](https://community.developer.atlassian.com/t/forge-env-vars-require-redeploy/68805/1 "2023-04-25T12:59:57Z")

</div>

I’m trying to utilize env vars in forge but they are not lining up with my current understanding of them. I deployed my app but when I try to update my env var it seems that those changes are not picked up unless the app is re-deployed.

I would’ve thought these variables get picked up as I set them from the cli and not involving a redeploy. Would appreciate a clarification to make sure my understanding is correct.

Thanks!

---

<div class="post-metadata">

**Author:** ![BeauWilliams](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/beauwilliams/32/47292_2.png) [@BeauWilliams](https://community.developer.atlassian.com/u/BeauWilliams)\
**Post date:** [April 25, 2023, 11:12pm UTC](https://community.developer.atlassian.com/t/forge-env-vars-require-redeploy/68805/2 "2023-04-25T23:12:02Z")

</div>

By default the CLI will run commands in the development environment. It’s possible you have set the env vars in development environment but are trying to access the production one.

In that case you can try the `--environment` flag as shown here [https://developer.atlassian.com/platform/forge/environments-and-versions/](https://developer.atlassian.com/platform/forge/environments-and-versions/)

Hopefully that answers your question!

---

<div class="post-metadata">

**Author:** ![klaussner](https://avatars.discourse-cdn.com/v4/letter/k/a183cd/32.png) [@klaussner](https://community.developer.atlassian.com/u/klaussner)\
**Post date:** [April 27, 2023, 6:30pm UTC](https://community.developer.atlassian.com/t/forge-env-vars-require-redeploy/68805/3 "2023-04-27T18:30:12Z")

</div>

@BeauWilliams I assumed that this is the intended behavior (although it’s not documented). Changes to environment variables only take effect after `forge deploy`.

---

<div class="post-metadata">

**Author:** ![JamesDuffy1](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@JamesDuffy1](https://community.developer.atlassian.com/u/JamesDuffy1)\
**Post date:** [May 26, 2023, 2:43pm UTC](https://community.developer.atlassian.com/t/forge-env-vars-require-redeploy/68805/4 "2023-05-26T14:43:30Z")

</div>

No it’s not a question of environment. @klaussner is confirming what my understanding is.
