# Change IP address of server from modbus

**URL:** <https://discourse.nodered.org/t/change-ip-address-of-server-from-modbus/62502>\
**Category:** General\
**Tags:** node-red-dashboard, modbus\
**Created:** [11 May 2022 10:53 UTC](https://discourse.nodered.org/t/change-ip-address-of-server-from-modbus/62502 "2022-05-11T10:53:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Theodros](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/theodros/32/61068_2.png) [@Theodros](https://discourse.nodered.org/u/Theodros)\
**Post date:** [11 May 2022 10:53 UTC](https://discourse.nodered.org/t/change-ip-address-of-server-from-modbus/62502/1 "2022-05-11T10:53:49Z")

</div>

Hi guys,

I was wondering if It's possible to change the IP address of a modbus server created on node red from the dashboard.

For example : If the sever IP address is at first 125.0.0.0 I'm able to change to 124.0.0.0 from the dashboard without having to go inside my code.

Thanks guys 🙂

---

<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:** [11 May 2022 11:51 UTC](https://discourse.nodered.org/t/change-ip-address-of-server-from-modbus/62502/2 "2022-05-11T11:51:38Z")

</div>

If the node permits dynamic changing of IP then yes. Read its docs or contact the author if you get no answer here.

A workaround is to use env vars & set the IP to `${MODBUS_IP}` - BUT - env are only read into node-red at start up - so if you do find a way to set `MODBUS_IP` env var from dashboard, you would also need to restart node-red.

---

<div class="post-metadata">

**Author:** ![Theodros](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/theodros/32/61068_2.png) [@Theodros](https://discourse.nodered.org/u/Theodros)\
**Post date:** [11 May 2022 12:23 UTC](https://discourse.nodered.org/t/change-ip-address-of-server-from-modbus/62502/3 "2022-05-11T12:23:42Z")

</div>

Okay.. I'ma see if I find a solution and I will post it here.

Thanks

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [11 May 2022 18:48 UTC](https://discourse.nodered.org/t/change-ip-address-of-server-from-modbus/62502/4 "2022-05-11T18:48:33Z")

</div>

Try out the **Modbus Flex Connector** node ..  
it allows to modify the modbus connection settings (including IP)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/2/d2d15f8bacfd8c298ff46f298f0915962118dd1c.png)

---

<div class="post-metadata">

**Author:** ![Theodros](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/theodros/32/61068_2.png) [@Theodros](https://discourse.nodered.org/u/Theodros)\
**Post date:** [12 May 2022 06:48 UTC](https://discourse.nodered.org/t/change-ip-address-of-server-from-modbus/62502/5 "2022-05-12T06:48:10Z")

</div>

Thanks for the help 👍

---

<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:** [26 May 2022 06:49 UTC](https://discourse.nodered.org/t/change-ip-address-of-server-from-modbus/62502/6 "2022-05-26T06:49:00Z")

</div>

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