TCP Server Issue with Docker

New to Node-Red but learning from the last few days.

Here is my setup and my issue. I would appreciate it if someone guided me on what I miss here.

My Ubuntu server IP address is - 192.168.1.34
My Node-Red is running as Docker Compose on port # 8123

My setup is listed in the image. I am able to establish communication on localhost, and everything is working as expected. Still, I like to make sure my IP address 192.168.1.34 on port 2000 should work so other computers in my network can communicate with my node-red TCP server on port 2000.

Can you please let me know what I am missing here in the setup?

(Firewall is whitelisted in local same network)

Welcome to the forums @IoTG

I am afraid this is more for the Docker expert community, most here do not use docker for their Node RED.

A hint will be, to setup your docker container with an interface that is within your local lan.
I don't know the correct terminology, but I'm sure the docker community will

Also, generally the advise is not to use docker unless you have a good reason.

1 Like

as well as exposing Node-RED on port 8213 you will need to add tcp port 2000 to the compose ports section to allow it to be seen on the host - and thence externally.

3 Likes

Yeah, docker networking is quite complex. Do docker exec -it <nodered_container_id> sh and try pinging entities in the outside world. Networks act differently on Linux / Mac / Windows for whatever reason (might be the daemon itself). Let us know the results here so we might be able to help you furthermore.

I had quite some issues with getting nodeRED connected to the outside world when running it with docker.

Thank you. This was the answer.

It worked.

2 Likes

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