| layout | docs-getting-started | |
|---|---|---|
| title | Running on Android | |
| toc | toc-user-guide.html | |
| slug | android | |
| redirect_from |
|
Using the Termux app makes it easy to run Node-RED on Android devices. Get it directly from their github or via F-Droid here Termux on F-Droid.
Note that the Play Store version is not maintained.
Install it, and run it. Then at the prompt type
apt update
apt upgrade
apt install coreutils nano nodejs
npm i -g node-red
node-red
Then you can point a browser to http://localhost:1880
Note that installing openssh may make interacting with termux a little easier. see this thread for a description of one such install.
-
You can also npm install other Node-RED nodes such as
node-red-dashboardin the standard way :cd ~/.node-red npm i node-red-dashboardor via the Pallete Manager.
-
The
volume-downkey is the ctrl key - sovol-down-ccan be used to "break" a running app. -
The instructions above also install the
nanoeditor, which is useful for editing files.
The recommended way of starting applications running in Termux is using the Termux:Boot application (available from F-droid - note that the Play Store version may not be maintained, and it's recommended to use the same source that you installed termux from).
We have found this other app useful for autostarting Termux on boot - Autostart - No Root (Note: with termux:boot, use of other autoboot apps does not seem to be required).
Note that the shebang in the Node-RED script is incompatible with termux:boot scripts. The workaround is to start Node-RED using a termux:boot startup script like:
#!/data/data/com.termux/files/usr/bin/sh
termux-wake-lock
node /data/data/com.termux/files/usr/bin/node-red
You can get direct access to various hardware on the device by using the extra
Termux device plugins - which can then be accessed via Node-RED using the exec
node.
Note: you need to install both the add-on app, and also the add-on api in Termux.
Install add-on app - Termux:API from the same source you got termux.
Install add-on access into Termux
apt install termux-api