# Setting Up Node-RED on Raspberry Pi 5
# Raspberry Pi OS Installation
To set up your Raspberry Pi 5 for use with Node-RED and FlowFuse, follow these steps:
# Flashing Raspberry Pi OS
- Use the official Raspberry Pi Imager to flash the 64-bit version of Raspberry Pi OS to an SD card.
- Before writing to the SD card, configure the OS for headless mode, including Wi-Fi, SSH, and authentication settings.
-
Write the OS and configuration to the SD card. This process takes about 10 minutes.
-
Insert the SD card into the Raspberry Pi 5 and power it on. The device should appear on your network after a minute or so.
-
Connect to the Raspberry Pi using SSH:
ssh pi@raspberrypi.local
-
Update and upgrade the system:
sudo apt-get update
sudo apt-get upgrade -y
# Installing the FlowFuse Device Agent
The FlowFuse Device Agent manages Node-RED on the Raspberry Pi, handling Node-RED versions, upgrades, setup, management, and access controls.
-
Install the agent using the following command:
bash <(curl -sL https://raw.githubusercontent.com/FlowFuse/device-agent/main/service/raspbian-install-device-agent.sh)
This script installs a Node.js runtime, the agent, and configures the Raspberry Pi to run the FlowFuse agent on boot and restart it if it crashes.
# Configuring the FlowFuse Agent
To configure the FlowFuse Cloud with your devices:
- Log into the FlowFuse team and go to the devices option in the sidebar.
- Add a new device by clicking on the top right "Add Device" button. In the popup that opens, enter the name for your device, select the type (optional), and assign the device to an application (optional). Then, click on the "Add" button.
- After successfully creating and adding the device, you'll see a popup window with the command that allows you to quickly configure the device with FlowFuse Cloud.
- Copy that command and run it in your device's terminal. The device agent will start, and it will be configured with FlowFuse Cloud. To verify this, go to the FlowFuse team, click on the devices option in the sidebar, and then click on the device you have configured. You will see the status as running and last seen in green color.
For more information refer to FlowFuse documentation