# Modbus TCP Server on port 502

**URL:** <https://discourse.nodered.org/t/modbus-tcp-server-on-port-502/4760>\
**Category:** General\
**Created:** [10 November 2018 21:47 UTC](https://discourse.nodered.org/t/modbus-tcp-server-on-port-502/4760 "2018-11-10T21:47:05Z")\
**Posts on this page:** 1\
**Showing post:** 10

<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:** [16 March 2021 12:31 UTC](https://discourse.nodered.org/t/modbus-tcp-server-on-port-502/4760/10 "2021-03-16T12:31:31Z")

</div>

You need to permit non root user to bind to port \< 1024. Search this forum and google. Been covered a few times.

something like `sudo setcap 'cap_net_bind_service=+ep' `which node` ` or `sudo setcap 'cap_net_bind_service=+ep' $(eval readlink -f `which node`)` should do the trick

Read [this thread](https://discourse.nodered.org/t/use-port-502-with-modbus-tcp/39615/13)

and [this](https://gist.github.com/firstdoit/6389682)

---

_[View the full topic](https://discourse.nodered.org/t/modbus-tcp-server-on-port-502/4760)._
