Running the Mender Server 3.7 on a Raspberry Pi 4

Introduction

Starting with Mender release 3.7, running the management server on the arm64 architecture is supported. This does not only enable moving to energy and cost saving instances in the cloud, but also hosting a Mender backend on low-power development boards such as the Raspberry Pi 4.

Version notes

This tutorial has been verified on Debian 11, as of 2024-04-26.
The setup is based on the docker-compose evaluation example as given in the documentation.

Prerequisites

To follow this tutorial, you will need:

  • A Raspberry Pi 4 (8GB) running Debian 11 (bullseye) or a derivative OS

Installing prerequisites and docker

The Mender management server is provided through the demo script in the integration repository. It requires the curl and jq tools, and to clone it you need to have git installed. Install those requirements:

apt install curl git jq

To use the latest and recommended version of docker, follow the installation instructions in the docker documentation.

Getting the integration repository and adjusting it

Clone the integration repository from GitHub, selecting the latest 3.7 version:

git clone https://github.com/mendersoftware/integration -b 3.7.x

For making the setup work on a RaspberryPi specifically, the docker-compose.demo.yml file nees some minor adjustments:

  • comment the following section out or delecte it, located under minio:
        networks:
            mender:
                aliases:
                    - minio.s3.docker.mender.io
  • to cope with the comparatively slow CPU, add two sleep statements
sleep 5

at the end of the start_server() function.

sleep 30

at the beginning of the create_user() function.

Starting the server

Change into the integration directory and run the server

cd integraion
./demo up

This will pull the required containers and spin up a Mender backend instance. If you are doing it for the first time, a user and password will be issued on the terminal. Make sure to note it down, as it will not be printed again.

Stopping the server

You can shut down the server by pressing Ctrl-C. This will stop the server in a coordinated fashion and keep the data.

Resetting the server

To wipe all accumulated data of the server, run the ./demo down command in the integration directory

Conclusion

The Mender Server being able to run on arm64 offers additional flexibility and sustainability in the long run. While not being the recommended platform, it also enables hobbyists and tinkerers to run the full backend on an affordable and energy efficient single board computer such as the Raspberry Pi 4.


If this tutorial was useful to you, please press like, or leave a thank you note to the contributor who put valuable time into this and made it available to you. It will be much appreciated!