# Set Environmental Variables

**URL:** https://meta.discourse.org/t/set-environmental-variables/270832
**Category:** Self-Hosting
**Tags:** how-to
**Created:** [July 7, 2023, 12:02am UTC](https://meta.discourse.org/t/set-environmental-variables/270832 "2023-07-07T00:02:39Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 7, 2023, 4:18am UTC](https://meta.discourse.org/t/set-environmental-variables/270832/2 "2023-07-07T04:18:04Z")

</div>

This would be much more useful if it explained how to use env variables to override (and give from the UX) system settings or the global settings in the default global variable file (  
and linked to it so people could see those settings like obscure redis settings

> [@SaraDev](#):
>
> For example, if you wanted to add a variable called `MY_VARIABLE` with a value of `my value`, you would add the following line:
> 
> ```plaintext
> MY_VARIABLE: "my value"
> 
> ```

This is a confusing example since it has nothing to do with discourse.

You could mention that it’s the same as using the analogous command like setting in docker, perhaps.

I see you made this because you made [Setup Cross-Origin Resource Sharing (CORS)](https://meta.discourse.org/t/setup-cross-origin-resource-sharing-cors/270819), so maybe use that as an example.

---

_[View the full topic](https://meta.discourse.org/t/set-environmental-variables/270832)._
