How to install thin-edge.io?

Installation with get-thin-edge_io.sh script

There are two possibilities to install thin-edge.io, the easiest way is to use the installation script with this command:

curl -fsSL https://raw.githubusercontent.com/thin-edge/thin-edge.io/main/get-thin-edge_io.sh | sudo sh -s

You can execute that command on your device and it will do all required steps for an initial setup.

If you prefer to have a little more control over the installation or the script did not work for you, please go on with the following steps.

Manual installation steps

To install thin edge package it is required to use curl to download the package and dpkg to install it.

Dependency installation

thin-edge.io has single dependency and it is mosquitto used for communication southbound and northbound e.g. southbound, devices can publish measurements; northbound, gateway may relay messages to cloud. mosquitto can be installed with your package manager. For apt the command may look as following:

apt install mosquitto

Note: Some OSes may require you to use sudo to install packages.

sudo apt install mosquitto

thin-edge.io installation

When all dependencies are in place you can proceed with installation of thin-edge.io cli and thin-edge.io mapper service.

Upgrading thin-edge.io

If you already have thin-edge.io on your device to upgrade thin-edge.io follow the steps below, there is no need to remove old version.

Note: To successfully upgrade thin-edge.io all thin-edge.io components should be stopped, eg: tedge-mapper and tedge-agent:

systemctl stop tedge-mapper-c8y
systemctl stop tedge-agent

Package download

thin-edge.io package is in thin-edge.io repository on GitHub: thin-edge.io.

To download the package from github repository use following command (use desired version):

curl -LJO https://github.com/thin-edge/thin-edge.io/releases/download/<package>_<version>_<arch>.deb

where:

version -> thin-edge.io version in x.x.x format

arch -> architecture type (amd64, armhf, arm64)

Eg:

curl -LJO https://github.com/thin-edge/thin-edge.io/releases/download/0.5.0/tedge_0.5.0_armhf.deb

and for mapper:

curl -LJO https://github.com/thin-edge/thin-edge.io/releases/download/0.5.0/tedge_mapper_0.5.0_armhf.deb

Package installation

Now, we have downloaded the package we can proceed to installation. First we will install cli tool tedge.

Note: Some OSes may require you to use sudo to install packages and therefore all following commands may need sudo.

To install tedge use following command:

dpkg -i tedge_<version>_<arch>.deb

Eg:

dpkg -i tedge_0.5.0_armhf.deb

To install mapper for thin-edge.io do:

dpkg -i tedge_mapper_<version>_<arch>.deb

Eg:

dpkg -i tedge_mapper_0.5.0_armhf.deb

Next steps

  1. Connect your device to Cumulocity IoT
  2. Connect your device to Azure IoT