# How to use enviroments variables into redis configs

**URL:** https://discourse.nodered.org/t/how-to-use-enviroments-variables-into-redis-configs/54643
**Category:** General
**Created:** [2 December 2021 19:01 UTC](https://discourse.nodered.org/t/how-to-use-enviroments-variables-into-redis-configs/54643 "2021-12-02T19:01:44Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![DaniloMourelle](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@DaniloMourelle](https://discourse.nodered.org/u/DaniloMourelle)
#### Post date: [2 December 2021 19:01 UTC](https://discourse.nodered.org/t/how-to-use-enviroments-variables-into-redis-configs/54643/1 "2021-12-02T19:01:44Z")

</div>

Hi, we use node-red v2.0.6 and node-red-contrib-redis 1.3.9.

We were wondering how to use envioments variables, so we can use same flow in all envs.

We are able to use json, but we have to change the flows.json when coping it.

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [2 December 2021 19:09 UTC](https://discourse.nodered.org/t/how-to-use-enviroments-variables-into-redis-configs/54643/2 "2021-12-02T19:09:11Z")

</div>

The docs on how to use environment variables in your flow are here: [Using environment variables : Node-RED](https://nodered.org/docs/user-guide/environment-variables)

---

<div class="post-metadata">

### Author: ![DaniloMourelle](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@DaniloMourelle](https://discourse.nodered.org/u/DaniloMourelle)
#### Post date: [2 December 2021 20:47 UTC](https://discourse.nodered.org/t/how-to-use-enviroments-variables-into-redis-configs/54643/3 "2021-12-02T20:47:08Z")

</div>

Uhnn... No good...

This package offers the string, env and json options to pass credentials, so I can't use this strategy you shown because because in string I should pass more than 1 value in 1 input field, and in json I cant use ${} between quotes

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [2 December 2021 20:58 UTC](https://discourse.nodered.org/t/how-to-use-enviroments-variables-into-redis-configs/54643/4 "2021-12-02T20:58:50Z")

</div>

I'm not familiar with the node, but if it lets you set it as a string then why can't you provide the whole field value as an env var?

---

<div class="post-metadata">

### Author: ![DaniloMourelle](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@DaniloMourelle](https://discourse.nodered.org/u/DaniloMourelle)
#### Post date: [2 December 2021 21:11 UTC](https://discourse.nodered.org/t/how-to-use-enviroments-variables-into-redis-configs/54643/5 "2021-12-02T21:11:25Z")

</div>

🤯

Owwwww, of course.....kkkkkkkkkk. I will try it and let you know...

---

<div class="post-metadata">

### Author: ![DaniloMourelle](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@DaniloMourelle](https://discourse.nodered.org/u/DaniloMourelle)
#### Post date: [3 December 2021 13:04 UTC](https://discourse.nodered.org/t/how-to-use-enviroments-variables-into-redis-configs/54643/6 "2021-12-03T13:04:31Z")

</div>

Hey man, it worked......

Thank you so much

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [17 December 2021 13:05 UTC](https://discourse.nodered.org/t/how-to-use-enviroments-variables-into-redis-configs/54643/7 "2021-12-17T13:05:17Z")

</div>

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