# Custom Node containered application can't connect to Redis

**URL:** <https://openvidu.discourse.group/t/custom-node-containered-application-cant-connect-to-redis/1522>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [July 18, 2020, 9:46am UTC](https://openvidu.discourse.group/t/custom-node-containered-application-cant-connect-to-redis/1522 "2020-07-18T09:46:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wesley\_Swanepoel](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/wesley_swanepoel/32/474_2.png) [@Wesley\_Swanepoel](https://openvidu.discourse.group/u/Wesley_Swanepoel)\
**Post date:** [July 18, 2020, 9:46am UTC](https://openvidu.discourse.group/t/custom-node-containered-application-cant-connect-to-redis/1522/1 "2020-07-18T09:46:20Z")

</div>

I have a Node app which uses Redis for session store but I’m unable to get this connected to the OpenVidu containered Redis. I’m using 2.15 and have Googled to find out how to connect to a containered Redis and it doesn’t work (change the host in the Node client to “redis”). I’ve also tried adding the new password to the client in my Node App to try and connect with this.

I don’t have enough knowledge of Docker to understand why the two apps which both have network status set as “host” in docker compose can’t connect?

My workaround at the moment is to run a normal redis-server on a different port and have the Node App connect to it.

---

<div class="post-metadata">

**Author:** ![micael.gallego](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/micael.gallego/32/2_2.png) [@micael.gallego](https://openvidu.discourse.group/u/micael.gallego)\
**Post date:** [July 18, 2020, 10:22am UTC](https://openvidu.discourse.group/t/custom-node-containered-application-cant-connect-to-redis/1522/2 "2020-07-18T10:22:37Z")

</div>

Redis database included in OpenVidu listen in localhost (because network=“host”). So you can use localhost as the host and standard redis port. Take into account that redis is secured with a password.

Regards

---

<div class="post-metadata">

**Author:** ![Wesley\_Swanepoel](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/wesley_swanepoel/32/474_2.png) [@Wesley\_Swanepoel](https://openvidu.discourse.group/u/Wesley_Swanepoel)\
**Post date:** [July 18, 2020, 10:45am UTC](https://openvidu.discourse.group/t/custom-node-containered-application-cant-connect-to-redis/1522/3 "2020-07-18T10:45:56Z")

</div>

Ok Thanks. Looks like I did something wrong. Tried it again but this time using “localhost” and you are right it it works. It is possible that in making the changes I didn’t rebuild the Node docker image. Sorry if I wasted your time.
