FlowFuse Device Agent Installer

What is the FlowFuse Device Agent Installer?

The FlowFuse Device Agent Installer is a CLI tool for the FlowFuse Device Agent that automatically sets up Node.js runtime, installs the device agent package, and configures it as a system service. Additionally, it provides a simple interface for keeping the device agent up to date.

The FlowFuse Device Agent Installer is the easiest way to get the FlowFuse Device Agent up and running on your remote device.

Requirements

  • Linux, macOS, or Windows
  • Internet connection for downloading dependencies
  • Administrator/root privileges for system service installation

Use the FlowFuse Device Agent Installer to install or update the FlowFuse Device Agent

One-line install

For the fastest one-line install experience, see the Quick Start guide.

Manual install

If you prefer to install the FlowFuse Device Agent manually with the Installer, you can follow these steps:

1. Download the installer script:

Linux/macOS
/bin/bash -c "$(curl -fsSL https://flowfuse.github.io/device-agent/get.sh)"
Windows
powershell -c "irm https://flowfuse.github.io/device-agent/get.ps1|iex"

2. Install the Device Agent using One Time Code

Linux/MacOS
./flowfuse-device-agent-installer --otc <one-time-code>
Windows (run elevated[1])
flowfuse-device-agent-installer.exe --otc <one-time-code>

Other installation options

Install without One Time Code

You can also install the FlowFuse Device Agent without a One Time Code by providing the device.yml content during interactive installation. To do this, run the installer without the --otc flag.

Linux/MacOS
./flowfuse-device-agent-installer
Windows (run elevated[1:1])
flowfuse-device-agent-installer.exe

Install in custom directory

There is a possibility to install the Device Agent in a custom directory by using the --dir option. For example:

Linux/MacOS
./flowfuse-device-agent-installer --dir /path/to/custom/dir
Windows (run elevated[1:2])
flowfuse-device-agent-installer.exe --dir C:\path\to\custom\dir

Install on custom port

You can configure a custom port using the --port flag. The service name includes the port, for example flowfuse-device-agent-1882 for --port 1882.

Linux/MacOS
./flowfuse-device-agent-installer --port 1882
Windows (run elevated[1:3])
flowfuse-device-agent-installer.exe --port 1882

Updating components

Node.js runtime

To update bundled Node.js runtime, specify the --update-nodejs flag with the desired version:

./flowfuse-device-agent-installer --update-nodejs --nodejs-version 20.19.1

Specifying --update-nodejs without a version will pick the default version defined in the installer.

Device Agent

To update the Device Agent package, use the --update-agent flag, optionally specifying the version:

./flowfuse-device-agent-installer --update-agent --agent-version 3.3.2

Specifying --update-agent without the --agent-version flag will update to the latest available version.

Managing

Services are named per-port, for example flowfuse-device-agent-1880. On macOS, the launchd label is com.flowfuse.device-agent-1880.

Linux (systemd)

sudo systemctl start flowfuse-device-agent-<port>
sudo systemctl stop flowfuse-device-agent-<port>
sudo systemctl restart flowfuse-device-agent-<port>
sudo systemctl status flowfuse-device-agent-<port>

Linux (SysVinit)

sudo service flowfuse-device-agent-<port> start
sudo service flowfuse-device-agent-<port> stop
sudo service flowfuse-device-agent-<port> restart
sudo service flowfuse-device-agent-<port> status

Linux (OpenRC)

sudo rc-service flowfuse-device-agent-<port> start
sudo rc-service flowfuse-device-agent-<port> stop
sudo rc-service flowfuse-device-agent-<port> restart
sudo rc-service flowfuse-device-agent-<port> status

macOS (launchd)

sudo launchctl start com.flowfuse.device-agent-<port>
sudo launchctl stop com.flowfuse.device-agent-<port>
sudo launchctl kickstart -k system/com.flowfuse.device-agent-<port>
sudo launchctl print system/com.flowfuse.device-agent-<port>

Windows (Service Control)

sc.exe start flowfuse-device-agent-<port>
sc.exe stop flowfuse-device-agent-<port>
sc.exe query flowfuse-device-agent-<port>

Viewing Device Agent log files

Adjust the path if custom directory has been specified during installation.

Linux/macOS:

tail -f /opt/flowfuse-device/logs/flowfuse-device-agent.log

Linux (systemd):

journalctl -f -u 'flowfuse-device-agent-<port>'

Windows:

Get-Content -Path 'C:\opt\flowfuse-device\flowfuse-device-agent.log' -Wait

Further reading

For more detailed technical information about the FlowFuse Device Agent, like list of supported parameters or how to contribute, please refer to the documentation.


  1. Run powershell -Command "Start-Process 'cmd' -Verb RunAs" to launch an elevated command prompt window (e.g. as an admin user) ↩︎ ↩︎ ↩︎ ↩︎