1.Here is the way for install Node-Red on Termux
apt update
apt upgrade
apt install coreutils nano nodejs
npm i -g --unsafe-perm node-red
node-red
Then you can point a browser to check if Node-Red was installed successful or not.
http://localhost:1880
2.Now, if you want to connect Node-red with HA core, you should search in the Palette Manager (in Node-Red) for this module and install it:
node-red-contrib-home-assistant-websocket
Now you got it.
ref: