# Accessing Environment Variables / Device Configuration in Application

**URL:** <https://hub.mender.io/t/accessing-environment-variables-device-configuration-in-application/4202>\
**Category:** General Discussions\
**Created:** [October 19, 2021, 1:00pm UTC](https://hub.mender.io/t/accessing-environment-variables-device-configuration-in-application/4202 "2021-10-19T13:00:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jon\_reyes](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/jon_reyes/32/1394_2.png) [@jon\_reyes](https://hub.mender.io/u/jon_reyes)\
**Post date:** [October 19, 2021, 1:00pm UTC](https://hub.mender.io/t/accessing-environment-variables-device-configuration-in-application/4202/1 "2021-10-19T13:00:22Z")

</div>

Can you help me understand if it is possible to set [device attributes](https://docs.mender.io/api/#management-api-device-configure) as environment variables for my applications that run in containers or in folders? I couldn’t really see how to access attributes from the application side?

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [October 20, 2021, 3:53pm UTC](https://hub.mender.io/t/accessing-environment-variables-device-configuration-in-application/4202/2 "2021-10-20T15:53:18Z")

</div>

Do you mean applications on the device?

I think yes, but you don’t access them using that API. That is only to view attributes from the UI or a management script.

On the device you will instead access them in the one of the [configure scripts](https://docs.mender.io/development/add-ons/configure/device-integration). It is fed the configuration values from the backend, and you can then choose what to do with them, including reconfiguring containers with new values. Note that the script probably has to reside outside the container, but the value can be used inside the container after it has been passed there.
