From 51f8c3d30e2c430235a5a2828fb825df977cc85f Mon Sep 17 00:00:00 2001 From: ppawlowski Date: Thu, 5 Dec 2024 13:28:24 +0100 Subject: [PATCH] Device Agent start on boot description --- docs/device-agent/install.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/docs/device-agent/install.md b/docs/device-agent/install.md index be70ccd847..087eadbeda 100644 --- a/docs/device-agent/install.md +++ b/docs/device-agent/install.md @@ -110,6 +110,42 @@ the same machine. flowfuse-device-agent --port=1881 ``` +### Start Device Agent on system boot + +To start the device agent on system boot, you can use the provided systemd service file. + +1. Download the file: + +```bash +curl -L https://raw.githubusercontent.com/FlowFuse/device-agent/refs/heads/main/service/flowfuse-device.service -o flowfuse-device.service +``` + +2. Adjust `User`, `Group` and `WorkingDirectory` if needed +3. Change the `ExecStart` command to start the Agent on [different port](#listen-port), if needed +4. Move the service file to `/etc/systemd/system/` directory + +```bash +sudo mv flowfuse-device.service /etc/systemd/system/ +``` + +5. Reload the systemd daemon + +```bash +sudo systemctl daemon-reload +``` + +6. Enable the service to start on boot + +```bash +sudo systemctl enable flowfuse-device +``` + +7. Start the service + +```bash +sudo systemctl start flowfuse-device +``` + ## Upgrading the agent To use the latest features on FlowFuse as well as on the edge device, it is advised to upgrade