Correct Way to Change Hostname

To manually change a device’s hostname, mostly so it advertises it via mDNS, what is the usual procedure?

I found this post:

But it seems my devices do not have a hostname property:

{
  "apiEndpoint": "https://api.balena-cloud.com",
  "appUpdatePollInterval": 900000,
  "applicationId": "XXXXXXXXX",
  "deltaEndpoint": "https://delta.balena-cloud.com",
  "deviceApiKey": "XXXXXXXXX",
  "deviceApiKeys": {
    "api.balena-cloud.com": "XXXXXXXXX"
  },
  "deviceType": "raspberrypi4-64",
  "listenPort": "48484",
  "mixpanelToken": "9ef939ea64cb6cd8bbc96af72345d70d",
  "registryEndpoint": "registry2.balena-cloud.com",
  "userId": "157471",
  "vpnEndpoint": "vpn.balena-cloud.com",
  "vpnPort": "443",
  "uuid": "XXXXXXXXX",
  "registered_at": 1603202331188,
  "deviceId": 4095300
}

Should I just add it?

Thanks,

A.

Hi,

You can just add it to the config.json, more details can be found in our docs here https://www.balena.io/docs/reference/OS/configuration/#sample-configjson.

Please give it a try and let us know how it goes.