# Is it possible to pass custom environment variables to the docker container?

**URL:** <https://meta.discourse.org/t/is-it-possible-to-pass-custom-environment-variables-to-the-docker-container/162795>\
**Category:** Self-hosting\
**Created:** [September 2, 2020, 12:20pm UTC](https://meta.discourse.org/t/is-it-possible-to-pass-custom-environment-variables-to-the-docker-container/162795 "2020-09-02T12:20:03Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)\
**Post date:** [September 3, 2020, 9:24pm UTC](https://meta.discourse.org/t/is-it-possible-to-pass-custom-environment-variables-to-the-docker-container/162795/7 "2020-09-03T21:24:22Z")

</div>

Yuhoo, I was able to make it work. The issue was that I was using a RSA Private key as an environment variable. This is what needs to be done to make that work.

wrap your key in single quotes `''` and add an extra `\` with all the `\n` appearing in the key. i.e. `\n` would be come `\\n`.

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible-to-pass-custom-environment-variables-to-the-docker-container/162795)._
