Node-RED is an open-source programming tool that allows users to connect different hardware devices, APIs, and online services. In this article, we will guide you through the process of installing Node-RED on Fedora Server Latest using the command line interface (CLI).
Before moving forward, make sure that you have a Fedora Server Latest installed with the following requirements:
sudo npm install -g --unsafe-perm node-red
node-red
Once the server is running, open your web browser and enter the following URL in the address bar: http://localhost:1880
.
You should see the Node-RED dashboard in the web browser.
By default, Node-RED does not have any authentication. As a result, anyone who has access to your network can access and modify your Node-RED flows. To protect your installation, it is recommended that you enable basic authentication.
Stop the Node-RED server by pressing Ctrl + C
in the terminal.
Run the following command to install the bcrypt
module:
sudo npm install -g bcrypt
bcrypt
module is installed, open the Node-RED settings file using the following command:nano ~/.node-red/settings.js
adminAuth: {
type: "credentials",
users: [{
username: "your_username",
password: "$2a$08$tyzV7nW8TvDlXwhHPs6l1eLOsWHo85MwFOmYeFt56DJi/Yb2Px.S.",
permissions: "*"
}]
},
Replace your_username
with a username of your choice.
Generate a password hash by running the following command:
node-red-admin hash-pw
Enter the password that you want to use for Node-RED.
Copy the generated hash and replace the $2a$08$tyzV7nW8TvDlXwhHPs6l1eLOsWHo85MwFOmYeFt56DJi/Yb2Px.S.
string in the settings file with the hash.
Save and close the settings file by pressing Ctrl + X
, followed by Y
, and then Enter
.
Start the Node-RED server by running the command node-red
.
Open your web browser and enter the following URL in the address bar: http://localhost:1880
.
You should now be prompted to enter a username and password to access the Node-RED dashboard.
In this tutorial, we have guided you through the installation of Node-RED on Fedora Server Latest and securing it with basic authentication. You can now start building flows and connecting different hardware devices, APIs, and online services in Node-RED.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!