Guide to Changing the Hostname of a Raspberry Pi Using Anthias

Hello, I’m having trouble changing the hostname in BalenaOS. I followed the instructions on the BalenaOS forum and added "hostname": "sample" to the config.json file, but it didn’t work as expected. Could you please guide me on how to properly change the hostname so that everything works smoothly?

Wish I could help, as this could be useful. I’ve set the device name in the Balena Cloud by editing the text field, though that doesn’t seem to associate to the host field, and although that value also shows up in the “Device Name” value under “Settings” for the device, it doesn’t appear to be a configurable value that’s defined under “Device Variables” or “Device Configuration”. Our local network’s DHCP has identified its local hostname as using the device’s UUID as seen from the Device Summary page.

I’ll try to see if I can force a change using a Device Configuration variable, which is where I suspect it will be expected, and I think can be pulled from an external file. I’m weary on messing with a rebuild/push of configurations though as the last time I tried that I had to restore from a backup.

EDIT: Based on the documentation, messing with the config after provisioning isn’t recommended, and I don’t currently have a spare Pi to mess with. What does your current config.json look like that you’re trying to apply?

If you need that level of control, I would recommend that you install Anthias on top of Raspberry Pi OS rather than using the BalenaOS version.