This guide takes you through the steps to get Node-RED running on an Azure Virtual Machine instance.
Log in to the Azure console
Click to add a New … Virtual Machine
In the list of Virtual Machines, select Ubuntu Server, then click ‘Create’
Give your machine a name, the username you want to use and the authentication details you want to use to access the instance
Choose the Size of your instance. Remember that node.js is single-threaded so
there’s no benefit to picking a size with multiple cores for a simple node-red
A1 Basic is a good starting point
After a couple of minutes your instance will be running. In the console you can find your instance’s IP address
The next task is to log into the instance then install node.js and Node-RED.
Log into your instance using the authentication details you specified in the previous stage.
Once logged in you need to install node.js and Node-RED
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - sudo apt-get install -y nodejs build-essential sudo npm install -g --unsafe-perm node-red
At this point you can test your instance by running
node-red. Note: you may
get some errors regarding the Serial node - that’s to be expected and can be
Once started, you can access the editor at
To get Node-RED to start automatically whenever your instance is restarted, you can use pm2:
sudo npm install -g --unsafe-perm pm2 pm2 start `which node-red` -- -v pm2 save pm2 startup
Note: this final command will prompt you to run a further command - make sure you do as it says.