# Setting by env variable

**URL:** https://meta.discourse.org/t/setting-by-env-variable/256210
**Category:** Self-hosting
**Created:** [February 25, 2023, 12:20am UTC](https://meta.discourse.org/t/setting-by-env-variable/256210 "2023-02-25T00:20:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![obeyler](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/obeyler/32/294063_2.png) [@obeyler](https://meta.discourse.org/u/obeyler)
#### Post date: [February 25, 2023, 12:20am UTC](https://meta.discourse.org/t/setting-by-env-variable/256210/1 "2023-02-25T00:20:58Z")

</div>

I would like to set some setting parameter (such as S3 parameter) by using env variable instead of GUI, is it possible and where I can find the name of the ENV for this ?

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [February 25, 2023, 1:08am UTC](https://meta.discourse.org/t/setting-by-env-variable/256210/2 "2023-02-25T01:08:27Z")

</div>

Piece of cake.

Simply take any of the settings that you can see, capitalise it to keep things consistent, add `DISCOURSE` to it, and link it all up with `_`'s (underscores).

You then put this in app.yml before the `volumes:` section, indenting it exactly (usually with 2 spaces) as the other environmental settings in there.

For example:

```plaintext
  DISCOURSE_BACKUP_LOCATION: 's3'

```

---

<div class="post-metadata">

### Author: ![dan\_carreon](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@dan\_carreon](https://meta.discourse.org/u/dan_carreon)
#### Post date: [March 24, 2026, 3:46pm UTC](https://meta.discourse.org/t/setting-by-env-variable/256210/3 "2026-03-24T15:46:32Z")

</div>

Hey there. Does this work for any Site setting configuration? For example for [Discourse Connect](https://meta.discourse.org/t/13045?silent=true) does that work?

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [March 24, 2026, 11:57pm UTC](https://meta.discourse.org/t/setting-by-env-variable/256210/4 "2026-03-24T23:57:42Z")

</div>

It should, since [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) is a core feature (then again, I think plugins’ settings can also be set).
