# TCP output node - dynamically change HOST Address

**URL:** https://discourse.nodered.org/t/tcp-output-node-dynamically-change-host-address/1398
**Category:** General
**Created:** [6 July 2018 17:43 UTC](https://discourse.nodered.org/t/tcp-output-node-dynamically-change-host-address/1398 "2018-07-06T17:43:10Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![sweetwater](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@sweetwater](https://discourse.nodered.org/u/sweetwater)
#### Post date: [6 July 2018 17:43 UTC](https://discourse.nodered.org/t/tcp-output-node-dynamically-change-host-address/1398/1 "2018-07-06T17:43:11Z")

</div>

We have the Host/IP address hardcoded in as "192.168.1.74" and that works ok.  
However, we are looking to dynamically change the HOST/IP address via user Input.  
For example, we will allow User to enter tenter in the IP address and that will "SET" the HOST IP Address of the TCP Output node. For example, user may want to talk to "192.168.x.x"...

I did not see any way to 'inject" the HOST/IP address into the TCP OUTPUT node using msg.payload or msg.url.  
ANy ideas?

![tcp%20out%20node](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/05c900ea8257968e5445f9e4f9b6602e8e734de7.png)

---

<div class="post-metadata">

### Author: ![Mattia](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@Mattia](https://discourse.nodered.org/u/Mattia)
#### Post date: [27 August 2019 15:15 UTC](https://discourse.nodered.org/t/tcp-output-node-dynamically-change-host-address/1398/2 "2019-08-27T15:15:27Z")

</div>

HI all,  
I'm brad new in this blog, but pretty excited and hope to contribute more when I'll learn or develop something... keep patient!  
Thanks if any else can help in this thread, I'm interested to; maybe I missed something on the blog where this thread is replied. Whom he can address me at the solution will help me a lot!  
Again thanks to let me join this forum  
Ciao

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [27 August 2019 16:14 UTC](https://discourse.nodered.org/t/tcp-output-node-dynamically-change-host-address/1398/3 "2019-08-27T16:14:48Z")

</div>

I believe that the TCP listener is started when Node-RED starts and therefore it isn't possible to change it dynamically.

It may be able to be set to an environment variable but this will still only be read when Node-RED starts up.

---

<div class="post-metadata">

### Author: ![Mattia](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@Mattia](https://discourse.nodered.org/u/Mattia)
#### Post date: [28 August 2019 19:34 UTC](https://discourse.nodered.org/t/tcp-output-node-dynamically-change-host-address/1398/4 "2019-08-28T19:34:43Z")

</div>

What do you mean with TCP listener is started when Node-RED starts? You mean when I deploy the flow or when node-red service starts?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [28 August 2019 20:11 UTC](https://discourse.nodered.org/t/tcp-output-node-dynamically-change-host-address/1398/5 "2019-08-28T20:11:27Z")

</div>

on deploy
