-
Create systemd service template definition
cat <<EOT > /lib/systemd/system/[email protected] [Unit] Description=tedge-agent (device/%i//) is a thin-edge.io component to support operations. After=syslog.target network.target mosquitto.service [Service] User=tedge EnvironmentFile=-/etc/agents/%i/env Environment=TEDGE_RUN_LOCK_FILES=false Environment=TEDGE_CONFIG_DIR=/etc/agents/%i Environment=TEDGE_AGENT_STATE_PATH=/data/tedge-%i RuntimeDirectory=tedge-agent-%i ExecStartPre=+-/usr/bin/tedge init ExecStart=/usr/bin/tedge-agent --mqtt-device-topic-id "device/%i//" Restart=on-failure RestartPreventExitStatus=255 RestartSec=5 [Install] WantedBy=multi-user.target EOT
-
Create a new service from the systemd service template
systemctl enable --now [email protected]
Where the string after the
@sign is used in the topic prefix, e.g.device/<name>// -
Check that the service is running
systemctl status [email protected]
-
Add any agent specific files under the relevant sub folder (which is created when the service is started)
ls -l /etc/agents/<name> # e.g. ls -l /etc/agents/proxy-child01
-
Check in Cumulocity that the new child device (represented by the new tedge-agent service) is visible
-
You can then add tedge-agent workflows under the following folder
ls -l /etc/agents/<name>/operations/ # e.g. ls -l /etc/agents/proxy-child01/operations/
Created
August 21, 2025 13:15
-
-
Save reubenmiller/c082926144f8efb7fc46e1623e3472f8 to your computer and use it in GitHub Desktop.
thin-edge.io running multiple tedge-agent instances on a single device
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment