Installing Node-RED on Fedora Server Latest

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).

Prerequisites

Before moving forward, make sure that you have a Fedora Server Latest installed with the following requirements:

Step 1: Install Node-RED on Fedora Server Latest

  1. Open the terminal and run the following command to install Node-RED:
sudo npm install -g --unsafe-perm node-red
  1. Wait for the installation to complete.

Step 2: Start the Node-RED server

  1. After the installation is complete, run the following command to start the Node-RED server:
node-red
  1. Once the server is running, open your web browser and enter the following URL in the address bar: http://localhost:1880.

  2. You should see the Node-RED dashboard in the web browser.

Step 3: Secure your Node-RED installation

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.

  1. Stop the Node-RED server by pressing Ctrl + C in the terminal.

  2. Run the following command to install the bcrypt module:

sudo npm install -g bcrypt
  1. Once the bcrypt module is installed, open the Node-RED settings file using the following command:
nano ~/.node-red/settings.js
  1. Add the following lines to the end of the file:
adminAuth: {
    type: "credentials",
    users: [{
        username: "your_username",
        password: "$2a$08$tyzV7nW8TvDlXwhHPs6l1eLOsWHo85MwFOmYeFt56DJi/Yb2Px.S.",
        permissions: "*"
    }]
},
  1. Replace your_username with a username of your choice.

  2. Generate a password hash by running the following command:

node-red-admin hash-pw
  1. Enter the password that you want to use for Node-RED.

  2. Copy the generated hash and replace the $2a$08$tyzV7nW8TvDlXwhHPs6l1eLOsWHo85MwFOmYeFt56DJi/Yb2Px.S. string in the settings file with the hash.

  3. Save and close the settings file by pressing Ctrl + X, followed by Y, and then Enter.

  4. Start the Node-RED server by running the command node-red.

  5. Open your web browser and enter the following URL in the address bar: http://localhost:1880.

  6. You should now be prompted to enter a username and password to access the Node-RED dashboard.

Conclusion

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!