# Set up Node-RED

 ```{admonition}  Requirements
 :class: Hint

1. Something to run node-RED on (we are using a Raspberry Pi)
```
## Guide

### How to install Node-RED


The documentation for nodeRed is extensive, so follow their [guides to get set up](https://nodered.org/#get-started)

We followed the guide for a [Raspberry Pi](https://nodered.org/docs/getting-started/raspberrypi)

In brief, open the Pi terminal

```bash
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
```

It is best to set it to run as a service so that it restarts automatically

```bash
sudo systemctl enable nodered.service
```

Keep in mind that Node-RED will run as a server and potentially be exposed to the open internet. Take care of security

### Access Node-RED from another computer

Find your computers IP address:

```shell
hostname -I
```
Open a web browser and navigate to:
```shell
http://<raspberry_pi_ip_address>:1880
```

Start the Node-RED service:

```shell
node-red-start
```