- docs
- FlowFuse User Manuals
- Using FlowFuse
- Getting Started
- FlowFuse Concepts
- Changing the Stack
- DevOps Pipelines
- Environment Variables
- FlowFuse File Nodes
- FlowFuse Persistent Context
- FlowFuse Project Nodes
- High Availability mode
- Instance Settings
- Logging
- Shared Team Library
- Snapshots
- Teams
- FlowFuse API
- Migrating a Node-RED project to FlowFuse
- Device Agent
- Device Agent
- Hardware Guides
- FlowFuse Cloud
- FlowFuse Cloud
- FlowFuse Self-Hosted
- Installing FlowFuse
- Overview
- Configuring FlowFuse
- DNS Setup
- Docker install
- Email configuration
- First Run Setup
- FlowFuse File Storage
- Install FlowFuse on Kubernetes
- Local Install
- Upgrading FlowFuse
- Administering FlowFuse
- Administering FlowFuse
- Administrator configuration for SSO
- licensing
- Monitoring
- Telemetry
- User Management
- Support
- Community Support
- Premium Support
- Debugging Node-RED issues
- Contributing
- Contributing to FlowFuse
# Installing Device Agent
# Prerequisites
- NodeJS v14 or later
Note that NodeJS v14 is no longer maintained by the Node project. It is not recommended for new installations.
# Supported Operating Systems
The Device Agent can be installed on most Linux distributions, Windows, and MacOS.
# Installing the Device Agent
The Device Agent is published to the public npm repository as @flowforge/flowforge-device-agent.
It can be installed as a global npm module. This will ensure the agent command is on the path:
# Linux/MacOS
sudo npm install -g @flowforge/flowforge-device-agent
# Windows
npm install -g @flowforge/flowforge-device-agent
# Docker
Or you can chose to run the Docker container. When you do, you'll need to mount the device.yml
obtained when Registering the device:
docker run --mount type=bind,src=/path/to/device.yml,target=/opt/flowforge-device/device.yml -p 1880:1880 flowforge/device-agent:latest
Or you can chose to run the Docker-Compose via a docker-compose.yml file. When you do, you'll need to mount the device.yml
as in Docker obtained when Registering the device:
version: '3.9'
services:
device:
image: flowforge/device-agent:latest
ports:
- "1880:1880"
volumes:
- /path/to/device.yml:/opt/flowforge-device/device.yml
# Configuration
The agent configuration is provided by a device.yml
file within its working directory.
# Working directory
By default the agent uses /opt/flowforge-device
or c:\opt\flowforge-device
as its working directory. This can be overridden with the -d/--dir
option.
The directory must exist and be accessible to the user that will be running the agent.
# Linux/MacOS
sudo mkdir /opt/flowforge-device
sudo chown -R $USER /opt/flowforge-device
# Windows (run elevated)
mkdir c:\opt\flowforge-device
# Listen Port
By default Node-RED will listen to port 1880
. The device agent has a flag to change this behaviour and listen on another port of choosing: -p/--port
. This can be useful for custom firewall rules, or when running multiple device agents on the same machine.
flowforge-device-agent --port=1881