Changed open balena domain but balena os downloaded from old registry domain

Hi.
I changed my open balena domain and generated new cert, configured and flashed new image to balena os device but the device does not use new domain instead used old domain and failed to download new image.

How can I configure this correctly? I already check all config in open-balena folder and my local config. all url has been changed to new domain.

1 Like

Hey @awis welcome to the forums!

This is odd, as the device should gets its endpoint from the image that you flashed. I imagine some config has been left over which is causing the images to still point to the previous domain.

What was the method you used to switch the domain name?

I use the script provided in the get started tutorial.

./scripts/quickstart -U <email@address> -P <password> -d mydomain.com

Any chance that I can change the url remotely without flashing all the devices again?

Hi there,

If you’ve changed the domain name and certificates, then you can update each device, but you’ll need to do this individually and change the appropriate details for all hostnames and certificates in the /mnt/boot/config.json file for each device you want to update.

It may be quicker to individually reprovision each device. When you earlier tried this, did you use something like Etcher to reflash an SD card (for example) and then reprovision the device that should have contacted the new domain?

Best regards, Heds

I used etcher to flash new device after I changed the name and then I discovered that my devices downloaded images from old domain. it failed because new cert only valid for new domain.

By the way, thanks for the tips on changing /mnt/boot/config.json file. I’ll try tomorrow morning. It’s night time here.

No problem, let us know if you have further issues and we’ll try and help you out!

Best regards, Heds

Hi. I ssh into the device and edited /mnt/boot/config.json file and it works but I tried configuring new balenaos image, mounted it and the config.json files seems to be correct. it’s configured to use new domain but still after I flashed it into the device, the new device’s config.json uses old domain. What did I do wrong?

I also discovered that in /mnt/data/resin-data/resin-supervisor/database.sqlite that the image url is taken from old domain. Do I need to push new image to fix it?

I pushed new image from cli and it works. all devices downloaded from the new domain.

Thanks.

Glad to hear it’s working fine now : )