# Using environment variables in mongo db node

**URL:** <https://discourse.nodered.org/t/using-environment-variables-in-mongo-db-node/47659>\
**Category:** General\
**Created:** [25 June 2021 13:10 UTC](https://discourse.nodered.org/t/using-environment-variables-in-mongo-db-node/47659 "2021-06-25T13:10:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 June 2021 13:14 UTC](https://discourse.nodered.org/t/using-environment-variables-in-mongo-db-node/47659/2 "2021-06-25T13:14:24Z")

</div>

Not sure why you have started a new thread.

> [@OmkarNodered](#):
>
> I want to use these environment variables inside mongo db 2 node. How can do that

Like I explained with a link to the docs and a screenshot in the other thread : [Node properties stored in external json file - #11 by Steve-Mcl](https://discourse.nodered.org/t/node-properties-stored-in-external-json-file/47638/11)

Ps, I would not use port and host as they may conflict with node-red. I'd use mongo\_host and mongo\_port

---

_[View the full topic](https://discourse.nodered.org/t/using-environment-variables-in-mongo-db-node/47659)._
