Configuration file

reference

Much of the Mender client's configuration resides in /etc/mender/mender.conf on the root filesystem. This file is JSON structured and defines various parameters for Mender's operation.

On systems where one or more of the configuration options must survive future updates, there is an optional "fallback" configuration file in /var/lib/mender/mender.conf. Because the directory /var/lib/mender is on persistent storage, the fallback configuration file is not overwritten by Mender updates.

The fallback configuration file has the same JSON structure as the main configuration file. Any value set in the main configuration file /etc/mender/mender.conf is chosen, whether or not the setting appears in the fallback file /var/lib/mender/mender.conf. The client only uses a setting in the fallback file if it does not appear in the main file.

Example mender.conf file

Here is an example of a mender.conf file:

{
  "RootfsPartA": "/dev/hda2",
  "RootfsPartB": "/dev/hda3",
  "ServerURL": "https://mymenderserver.net",
  "ServerCertificate": "/etc/site-conf/server.crt"
}

Providing mender.conf

The mechanism for providing the configuration file and specifying the configuration values will depend on your choice of OS distribution or build system.

If you have already built an Artifact containing the rootfs, have a look at modifying a Mender Artifact.

Found errors? Think you can improve this documentation? Simply click the Edit link at the top of the page, and then the icon on Github to submit changes.