# Environment variables and secrets from UI vs file

**URL:** <https://community.okteto.com/t/environment-variables-and-secrets-from-ui-vs-file/348>\
**Category:** How Do I?\
**Created:** [November 16, 2022, 5:10pm UTC](https://community.okteto.com/t/environment-variables-and-secrets-from-ui-vs-file/348 "2022-11-16T17:10:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nathanfig-sureify](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/nathanfig-sureify/32/215_2.png) [@nathanfig-sureify](https://community.okteto.com/u/nathanfig-sureify)\
**Post date:** [November 16, 2022, 5:10pm UTC](https://community.okteto.com/t/environment-variables-and-secrets-from-ui-vs-file/348/1 "2022-11-16T17:10:36Z")

</div>

When I deploy via the Okteto UI and supply environment variables, they seem to get ignored completely. Likewise for secrets, they show up as undefined. My variables in a .env file that is pointed to by envFiles in my Okteto manifest _do_ show up though.

I cannot find any documentation on this - are UI supplied variables ignored if there is a .env file in use?

---

<div class="post-metadata">

**Author:** ![pchico83](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/pchico83/32/25_2.png) [@pchico83](https://community.okteto.com/u/pchico83)\
**Post date:** [November 21, 2022, 3:13pm UTC](https://community.okteto.com/t/environment-variables-and-secrets-from-ui-vs-file/348/2 "2022-11-21T15:13:06Z")

</div>

Hi @nathanfig-sureify  
Variables supplied from Okteto UI and Okteto Secrets are available as environment variables when deploying your app. You need to refer to them in your compose file to inject them into your container. Or refer to them in your`.env` file.  
For example:

```auto
services:
  myapp:
     environment:
        - MY_SECRET=${MY_SECRET}

```

---

<div class="post-metadata">

**Author:** ![nathanfig-sureify](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/nathanfig-sureify/32/215_2.png) [@nathanfig-sureify](https://community.okteto.com/u/nathanfig-sureify)\
**Post date:** [November 21, 2022, 11:13pm UTC](https://community.okteto.com/t/environment-variables-and-secrets-from-ui-vs-file/348/3 "2022-11-21T23:13:54Z")

</div>

That makes sense, thank you!
