Mender Gateway uses a JSON file for configuring the proxy and mTLS settings.
The configuration is loaded from the file /etc/mender/mender-gateway.conf by default,
unless otherwise specified by the --config command line argument.
This section provides a reference for the configuration variables.
{
"Features": {
"ArtifactsProxy": {
"Enabled": true,
"GatewayURL": "https://gateway.mender.io",
"DomainWhitelist": ["s3.amazonaws.com", "s3.my-min.io"],
"ArtifactsCache": {
"Enabled": true,
"Path": "/var/cache/mender-gateway",
"SignatureSecret": "KDbQ+Z9asYtPdRQoakM5lGs6xgkWyNx4",
"LinkExpireDuration": "30m"
}
},
"mTLS": {
"Enabled": true,
"CACertificate": "/var/lib/mender/ca-cert.pem",
"MenderUsername": "gateway@mender.io",
"MenderPassword": "password123",
"BlacklistPath": "/var/lib/mender/mtls-blacklist.txt"
},
"DeviceSystem": {
"Enabled": false,
"SystemID": "REPLACE_WITH_YOUR_UNIQUE_SYSTEM_ID",
"DefaultInventory": [
{
"Name": "region",
"Value": "eu"
}
]
}
},
"HTTP": {
"Enabled": false,
"Listen": ":80"
},
"HTTPS": {
"Enabled": true,
"Listen": ":443",
"MinimumTLSVersion": "1.2",
"ServerCertificate": "/var/lib/mender/server-cert.pem",
"ServerKey": "/var/lib/mender/server-pkey.pem"
},
"UpstreamServer": {
"URL": "https://hosted.mender.io",
"CACertificate": "/etc/ssl/cert.pem",
"InsecureSkipVerify": false
},
"Metrics": {
"Enabled": false,
"Listen": ":9102"
}
}
Hosted Mender is available in multiple regions to connect to. Make sure you select your desired one before proceeding.
Starting from Mender Gateway version 1.3.0, configurations can be overwritten using environment variables.
In the description below, the environment variable names are provided in the parenthesis.
ARTIFACTS_PROXY_ENABLED)ARTIFACTS_PROXY_GATEWAY_URL)ARTIFACTS_PROXY_DOMAIN_WHITELIST)ARTIFACTS_PROXY_CACHE_ENABLED)ARTIFACTS_PROXY_CACHE_PATH)ARTIFACTS_PROXY_CACHE_SECRET)
ARTIFACTS_PROXY_CACHE_LINK_EXPIRE_DURATION)MTLS_ENABLED)MTLS_CA_CERTIFICATE)MTLS_BLACKLIST_PATH)MTLS_MENDER_USERNAME)MTLS_MENDER_PASSWORD)Mender Enterprise Only: Using RBAC you can create a new user with a dedicated role to the user access scope to the preauthorization API endpoint for the gateway user.
This feature requires Mender Gateway version 1.1.0
DEVICE_SYSTEM_ENABLED)DEVICE_SYSTEM_ID)mender_gateway_system_id in the reported inventory data.
HTTP_ENABLED)HTTP_LISTEN)HTTPS_ENABLED)HTTPS_LISTEN)HTTPS_MINIMUM_TLS_VERSION)
["1.0", "1.1", "1.2", "1.3"].1.1.0.
HTTPS_SERVER_CERTIFICATE)HTTPS_SERVER_KEY)UPSTREAM_SERVER)UPSTREAM_SERVER_CA_CERTIFICATE)1.3.0.
UPSTREAM_SERVER_INSECURE_SKIP_VERIFY)Available from Mender Gateway version 2.2.0
METRICS_ENABLED)/metrics endpoint on a separate HTTP server. Disabled by default.METRICS_LISTEN)host:port) the metrics server listens on. Defaults to :9102, which binds every interface; set an IP address to restrict it, for example 127.0.0.1:9102 for the loopback interface only. An interface name cannot be used.The metrics endpoint is not authenticated. Use the Listen address to keep it
on a trusted network; do not expose it on the device-facing network.
Available from Mender Gateway version 2.1.0
Please note This is a not required for the normal operation of Mender Gateway and is only used for specific use cases.
These configurations are available as environmental variables only.
HTTP_PROXYuser:password@host URL format.HTTPS_PROXYuser:password@host URL format.NO_PROXY.example.com to bypass the proxy for all *.example.com URLs.