After that I used the balenaEtcher tool to flash the SD card but the pi was not able to register with the balena cloud. The device was not shown on the dashboard. I could ssh to the pi directly though using the device’s ip address (balena reused the same ip address on the same raspberrypi). The ssh key is configured properly as I can ssh directly to the device now but the device failed to register with balena.
Any idea? Is balena config inject the right command to update the config.json on the image?
Hi,
This behaviour is expected. balena inject will overwrite the config.json already present in the image with the new one, it does not perform any form of merger of the two.
Your new config.json lacks the configuration needed to connect to our backend. Here is an example of a config.json that would connect to the backend with an pubkey added:
You can download this configuration file from the dashboard under Advanced, in the same form where you download your OS image you will see a tick box: Download configuration file only. There you can get a valid config.json that will connect to that application, after you have this configuration file append your configuration and inject it into the image.
Kind regards,
Theodor