Amend REST API port

Is it possible to change the port for a rest API?

No, not unless you change the port Node-RED is running on.

There might be contrib nodes that do this.

Otherwise, use something like HAProxy or NGINX to call the endpoints (i'm sure there are other ways too)

Question - why?

I don't want to open up 1880.

And I can't set my security rules to only allow certain IP to access the API, as I don't know them.

I need a crash course in securing the API :rofl:

A little hacky, and messy - but Im just putting it out there.

  1. Create A TCP IN Node (Any port you want)
  2. Connect that to a TCP Request Node (to localhost:1880)
  3. Connect it's output to a TCP Out Node (in reply mode)

Don't alter any message properties, and the TCP IN/Out/Reply Node will act as a proxy to your Web Service (avoiding public access to port 1880)


Don't listen to any of my solution, it should be done the proper (and secure) way, but just sharing the love