# Environment variables

**URL:** <https://community.traefik.io/t/environment-variables/9614>\
**Category:** Traefik v2\
**Tags:** file\
**Created:** [February 7, 2021, 2:37pm UTC](https://community.traefik.io/t/environment-variables/9614 "2021-02-07T14:37:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![broeseb](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/broeseb/32/3338_2.png) [@broeseb](https://community.traefik.io/u/broeseb)\
**Post date:** [February 7, 2021, 2:37pm UTC](https://community.traefik.io/t/environment-variables/9614/1 "2021-02-07T14:37:04Z")

</div>

hi there,

i am using traefik 2.40 without any docker Environment. therefore i am configuring everything over the toml file. I am stucked at the moment how to bring Environment variables to the toml file or even hardcode them into it. Its about the configuration fro the acme challange like:

environment:

- "OVH\_ENDPOINT=[YOUR\_OWN\_VALUE]"
- "OVH\_APPLICATION\_KEY=[YOUR\_OWN\_VALUE]"
- "OVH\_APPLICATION\_SECRET=[YOUR\_OWN\_VALUE]"
- "OVH\_CONSUMER\_KEY=[YOUR\_OWN\_VALUE]"

any hints how to do that? sorry but i could not find anywhere in the help and i am guessing its easy and only caused to my lag of programming knowledge?!

regards and big thx.  
Seb

---

<div class="post-metadata">

**Author:** ![cakiwi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cakiwi/32/3205_2.png) [@cakiwi](https://community.traefik.io/u/cakiwi)\
**Post date:** [February 8, 2021, 1:15am UTC](https://community.traefik.io/t/environment-variables/9614/2 "2021-02-08T01:15:46Z")

</div>

The lego driver expects these as environment variables. Set them in a script that invokes traefik or modify the systemd unit.

> <https://github.com/traefik/traefik/blob/master/contrib/systemd/traefik.service>

---

<div class="post-metadata">

**Author:** ![broeseb](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/broeseb/32/3338_2.png) [@broeseb](https://community.traefik.io/u/broeseb)\
**Post date:** [February 8, 2021, 8:08am UTC](https://community.traefik.io/t/environment-variables/9614/3 "2021-02-08T08:08:18Z")

</div>

workes perfect!

Big THX.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)\
**Post date:** [February 11, 2021, 8:08am UTC](https://community.traefik.io/t/environment-variables/9614/4 "2021-02-11T08:08:53Z")

</div>

Closed on February 11, 2021, 8:08am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
