Install_snap - installing a snap package through a Mender Artifact


The install_snap Update Module is able install packages to the device running Mender using the snap tooling.

Example use-cases:

  • managing devices running the snap app store, specifically Ubuntu


Module name install_snap
Supports rollback no
Requires reboot no
Artifact generation .script yes
Full operating system updater no
Source code GitHub

Please be aware that Mender Update modules are meant to update parts of the operating system and if not configured properly they could potentially delete parts or even the full operating system. Always inspect the code carefully and only test modules on device that you can recover easily.

It is not recommended to install a Mender Artifact on your workstation

Prepare the device

This section describes how to setup your target device, i.e. the device to be updated. This will also be referred to as the device environment.

All commands outlined in this section should be run in the device environment.


This update module has the following prerequisites for the device environment:

Install the Update Module

Download the latest version of this Update Module by running:

mkdir -p /usr/share/mender/modules/v3 && wget -P /usr/share/mender/modules/v3 && chmod +x /usr/share/mender/modules/v3/install_snap

Prepare the development environment on your workstation

This section describes how to set up your development environment on your workstation.

All commands outlined in this section should be run in the development environment.


This Update Modules has the following prerequisites for the development environment:

Create Mender Artifacts

To download install_snap-artifact-gen, run the following:

wget && chmod +x install_snap-artifact-gen

Generate Mender Artifacts using the following command:

./install_snap-artifact-gen \
--artifact-name ${ARTIFACT_NAME} \
--device-type ${DEVICE_TYPE} \
<name of snap> ...

An example to create an artifact installing the hello-world snap package on a raspberrypi4 machine could be:

./install_snap-artifact-gen \
--artifact-name ${ARTIFACT_NAME} \
--device-type ${DEVICE_TYPE} \

You can either deploy this Artifact in managed mode with the Mender server (upload it under Releases in the server UI) or by using the Mender client only in Standalone deployments.

Artifact technical details

This is a use case of an artifact exclusively using meta data as its payload. Find more on the concept in this article.