Limited acces to node-red

  • Hello unipi,

    we are working on a node-red project (Neuron M20.) and it seems like we have limited access to the original functions of node-red and npm. Started with your image 1.0.6, now on 1.2.5. Some basic commands lines line "node-red-stop" - and for example commands for installing own nodes for testing - seems not to work in the console.

    Are there special limitations to your delivered image with node-red?

    Is it possible to update node-red using the node-red script descriped on "Running on Raspberry Pi"? After doing that, more commands - not all - work but node-red seems not to be stable.

    Looking forward to your reply.

    Best regrads

  • administrators

    Hello @GS,
    the Node-RED is maintained by a systemd service. To start and stop it use:

    sudo systemctl start node-red
    sudo systemctl stop node-red

    The image versions you have mentioned (1.0.6, 1.2.5) are not versions of any of our images. The images are versioned by the date when they were built, such as

  • administrators

    And this is the installation script we use:

    set -e
    # don't ask question
    export DEBIAN_FRONTEND=noninteractive
    # gnupg for apt-key
    # g++ for the node-red NPM package
    echo "installation of dependenicies"
    apt install -y --no-install-recommends wget curl gnupg g++ make
    # add unofficial NodeJS repository and install the nodejs
    echo "Installation of nodejs and npm"
    wget -O - -q | apt-key add -
    echo "deb buster main" > /etc/apt/sources.list.d/nodesource.list
    apt update
    apt install -y --no-install-recommends nodejs
    # installation of npm
    curl | bash
    # Node-RED installation
    echo "Installation of node-red via npm"
    npm install -g --unsafe-perm node-red
    # install the Node-RED systemd service
    echo "Setting up the Node-RED to be run via systemd"
    cp "${SCRIPT_FILES}/node-red.service" /etc/systemd/system
    systemctl enable node-red

Log in to reply