Device components

reference

Device components

Set up the APT repository

Right now we support two packages repositories: workstation-tools and device-components.

Device components repo contains:

  • mender-app-update-module
  • mender-client
  • mender-client4
  • mender-configure
  • mender-connect
  • mender-flash
  • mender-setup
  • mender-snapshot

If you want the bleeding edge version of software, you can use our experimental repository by replacing stable with experimental in the above command. Do not use the experimental repository in production as these releases are not fully tested.

As of Mender 3.2.1 we deprecated the previous stable repository and stopped updating it. As of Mender 3.3 we removed it.

With APT repo method, you will always install the latest released Mender components. If you need to install a specific version, or you want to stick to a specific minor release (e.g., to the latest LTS version), you can manually download the Debian packages from the device components repository.

  1. Update the apt package index and install required dependencies.

    sudo apt-get update
    sudo apt-get install --assume-yes --no-install-recommends \
            apt-transport-https \
            ca-certificates \
            curl \
            gnupg \
            jq
  2. Add the official Mender GPG key to your trusted apt keychain:

    curl -fsSL https://downloads.mender.io/repos/debian/gpg | sudo tee /etc/apt/trusted.gpg.d/mender.asc

    Inspect the GPG key fingerprint and verify that it matches E6C8 5734 5575 F921 8396 5662 2407 2B80 A1B2 9B00.

    gpg --show-keys --with-fingerprint /etc/apt/trusted.gpg.d/mender.asc
    pub   rsa3072 2020-11-13 [SC] [expires: 2026-10-01]
          E6C8 5734 5575 F921 8396  5662 2407 2B80 A1B2 9B00
    uid                      Mender Team <mender@northern.tech>
    sub   rsa3072 2020-11-13 [E] [expires: 2026-10-01]
  3. Add the Mender repository to your sources list by selecting the architecture matching your device.

    First, in order to make sure that there are no mender sources in '/etc/apt/sources.list' lingering from a previous install, run

    sudo sed -i.bak -e "\,https://downloads.mender.io/repos/device-components,d" /etc/apt/sources.list

    Then add the sources according to your Linux distribution

    For Raspberry OS, use Debian distributions. To know which version is your device running, do (. /etc/os-release && echo $VERSION_CODENAME)

    echo "deb [arch=$(dpkg --print-architecture)] https://downloads.mender.io/repos/device-components debian/trixie/stable main" \
     | sudo tee /etc/apt/sources.list.d/mender.list

Mender Client

The Mender Client runs on the device, checks for and installs software updates packaged as Mender Artifacts. See Client installation for more information about how to configure and use the Mender Client.

The mender-client Debian package includes the legacy Mender Client written in Go (version 3.x.y), and it installs:

The mender-client4 Debian package includes the 4.x series of the client, which has slightly different components than the legacy one. The mender-client4 Debian package installs:

  • a mender-auth package, for server authentication
  • a mender-update package, for doing updates
  • two binaries, mender-auth and mender-update
  • two systemd services, mender-authd and mender-updated
  • the default identity script
  • the default inventory scripts
  • and the default update modules (and its generators).
  • the mender-flash tool
  • the mender-setup tool
  • the mender-snapshot tool

Installation methods

You can install the Mender Client in different ways depending on your preference.

Express installation

Mender provides a convenience script available at get.mender.io that non-interactively installs the Mender Client using the package manager. Users installing the Mender Client this way, should be aware that:

  • The script requires root privileges to run. Therefore, carefully examine the script before executing it.
  • The script will install several dependencies with the package manager without asking for confirmation.
  • The Mender GPG public key and APT repository will be added to your trusted APT keychain and sources list respectively without asking for confirmation.
  • The latest released Mender components will be installed.

Always examine scripts downloaded over the Internet before running them locally.

curl -fLsS https://get.mender.io -o get-mender.sh
# INSPECT get-mender.sh BEFORE PROCEEDING
sudo bash get-mender.sh

By default, the script installs the remote terminal and configure add-ons in addition to the client. If you do not want this feature you can provide additional arguments to the script specifying which packages you want to install. For example, the following will only install the Mender Client:

curl -fLsS https://get.mender.io -o get-mender.sh
# INSPECT get-mender.sh BEFORE PROCEEDING
sudo bash get-mender.sh mender-client4

Mender offers an experimental version of the package repository. To use the latest experimental version of Mender, run the script with an additional flag -c experimental. Do not use the experimental repository for production devices as these releases are not fully tested.

Upgrading Mender after the express installation

After installing the Mender Client with get.mender.io, the packages are maintained by the package manager. To upgrade the software, simply run

sudo apt-get update
sudo apt-get upgrade

Updating mender this way doesn't provide a rollback mechanism in case of issues. For production devices always update mender as part of the Operating System update with A/B partitions.

Install using the APT repository

mender-client is available in the APT repository. Follow the steps in Set up the APT repository chapter to enable the repository and install mender-client.

Update the package index and install the Mender Client:

sudo apt-get update
sudo apt-get install mender-client4

mender-connect

The easiest way to install Mender Connect on an existing device is by using the Set up the APT repository. The other alternatives include: mender-convert integration for installation in the existing images, and Yocto projects for the installation in a Yocto Project environment.

To install mender-connect using Mender APT repository, follow the instructions for installing the Mender Client using the APT repository. After the final step, install mender-connect using the package manager:

sudo apt-get install mender-connect

You need two applications for any add-on to function: mender-auth, one of the components of the Mender Client, and Mender Connect. If you have used the express installation script, you already have both installed.

Remote Terminal add-on

The Remote Terminal does not require any items installed other than mender-auth and Mender Connect.

File transfer add-on

The File Transfer does not require any items installed other than mender-auth and Mender Connect.

Mender Configure add-on

Mender offers a configure extension (mender-configure) to the mender-update client that enables managing device configuration. See the add-on page for Mender Configure for more information.

The easiest way to install Configure on an existing device is by using the Mender APT repository. See the add-on page for Mender Configure for more information for other installation alternatives.

To install mender-configure using Mender APT repository, follow the instructions for installing the Mender Client using the APT repository. After the final step, install mender-configure using the package manager:

sudo apt-get install mender-configure

Monitor

Note: The Mender Monitor add-on package is required. See the Mender features page for an overview of all Mender plans and features.

Mender offers a Monitor add-on which enables monitoring your devices for events and anomalies.

To install mender-monitor using the Mender Monitor Debian package, first download it by running:

Set the following variables with your credentials:

HOSTED_MENDER_EMAIL=<your.email@example.com>
HOSTED_MENDER_PASSWORD=<yoursecurepassword>

And download it with:

wget --auth-no-challenge --user "$HOSTED_MENDER_EMAIL" --password "$HOSTED_MENDER_PASSWORD" https://downloads.customer.mender.io/content/hosted/mender-monitor/debian/1.4.2/mender-monitor_1.4.2-1%2Bdebian%2Btrixie_all.deb

Then install the package with:

sudo dpkg -i mender-monitor_1.4.2-1+debian+trixie_all.deb || sudo apt --fix-broken -y install

Demo monitors

If you have already installed the mender-monitor package, as shown in Installing Mender Monitor, the demo monitors can be installed through the package:

Set the following variables with your credentials:

HOSTED_MENDER_EMAIL=<your.email@example.com>
HOSTED_MENDER_PASSWORD=<yoursecurepassword>

And download it with:

wget --auth-no-challenge --user "$HOSTED_MENDER_EMAIL" --password "$HOSTED_MENDER_PASSWORD" https://downloads.customer.mender.io/content/hosted/mender-monitor/debian/1.4.2/mender-monitor-demo_1.4.2-1%2Bdebian%2Btrixie_all.deb

Then install the package with:

sudo dpkg -i mender-monitor-demo_1.4.2-1+debian+trixie_all.deb

Mender Gateway

Mender Gateway is only available in the Mender Enterprise plan. See the Mender plans page for an overview of all Mender plans and features.

Mender offers Mender Gateway which enables managing and deploying OTA updates to devices on the local network from a gateway device.

To install mender-gateway using the Mender Gateway Debian package, first download it by running:

Set the following variables with your credentials:

HOSTED_MENDER_EMAIL=<your.email@example.com>
HOSTED_MENDER_PASSWORD=<yoursecurepassword>

And download it with:

wget --auth-no-challenge --user "$HOSTED_MENDER_EMAIL" --password "$HOSTED_MENDER_PASSWORD" https://downloads.customer.mender.io/content/hosted/mender-gateway/debian/2.0.0/mender-gateway_2.0.0-1%2Bdebian%2Btrixie_armhf.deb

Then install the package with:

sudo dpkg -i mender-gateway_*.deb

Examples package

You should not use this package on production devices.

If you have already installed the mender-gateway package, as shown in Installing Mender Gateway, you can install demo content through the examples package. This will install the following:

  • Self-signed demo certificate and key for *.docker.mender.io
  • Demo configuration file with UpstreamServer configured for hosted.mender.io

Download the Mender Gateway examples package from https://downloads.customer.mender.io/content/hosted/mender-gateway/examples/2.0.0/mender-gateway-2.0.0.tar and download the tarball to a known location on your local system using your hosted Mender username and password:

Set the following variables with your credentials:

HOSTED_MENDER_EMAIL=<your.email@example.com>
HOSTED_MENDER_PASSWORD=<yoursecurepassword>

And download it with:

wget --auth-no-challenge --user "$HOSTED_MENDER_EMAIL" --password "$HOSTED_MENDER_PASSWORD" https://downloads.customer.mender.io/content/hosted/mender-gateway/examples/2.0.0/mender-gateway-examples-2.0.0.tar

Then install the contents with:

sudo tar -C / --strip-components=2 -xvf mender-gateway-examples-2.0.0.tar

Mender Binary Delta

Download

If you are using hosted Mender, set the following variables with your credentials:

HOSTED_MENDER_EMAIL=<your.email@example.com>
HOSTED_MENDER_PASSWORD=<yoursecurepassword>

If you signed up using your Google or GitHub login, use the email address linked to that account and enter x as the password.

Now, download the mender-binary-delta archive with the following command:

wget --auth-no-challenge --user "$HOSTED_MENDER_EMAIL" --password "$HOSTED_MENDER_PASSWORD" https://downloads.customer.mender.io/content/hosted/mender-binary-delta/1.5.1/mender-binary-delta-1.5.1.tar.xz

On the other hand, if you are using on-premise Mender Enterprise, download using the following command:

MENDER_ENTERPRISE_USER=<your.user>
curl -u $MENDER_ENTERPRISE_USER -O https://downloads.customer.mender.io/content/on-prem/mender-binary-delta/1.5.1/mender-binary-delta-1.5.1.tar.xz

The archive mender-binary-delta-1.5.1.tar.xz contains the binaries needed to generate and apply deltas.

Unpack the mender-binary-delta-1.5.1.tar.xz in your home directory:

tar xvf mender-binary-delta-1.5.1.tar.xz

The file structure should look like this:

├── aarch64
│   ├── mender-binary-delta
│   └── mender-binary-delta-generator
├── arm
│   ├── mender-binary-delta
│   └── mender-binary-delta-generator
├── licenses
│   └── ...
└── x86_64
    ├── mender-binary-delta
    └── mender-binary-delta-generator

The mender-binary-delta-generator

You will need this binary on the host to create a delta between two artifacts locally.

The enterprise plan allows auto generation of delta images directly on the mender server.

Copy the generator compatible with your workstation architecture to /usr/bin; for a x86_64 one, it should look like this:

sudo cp mender-binary-delta-1.5.1/x86_64/mender-binary-delta-generator /usr/bin

We welcome contributions to improve this documentation. To submit a change, use the Edit link at the top of the page or email us at .