# Automated update of balena hostOS

**URL:** <https://forums.balena.io/t/automated-update-of-balena-hostos/368993>\
**Category:** balenaOS\
**Tags:** hostos\
**Created:** [September 25, 2023, 8:24am UTC](https://forums.balena.io/t/automated-update-of-balena-hostos/368993 "2023-09-25T08:24:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![roland-k](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@roland-k](https://forums.balena.io/u/roland-k)\
**Post date:** [September 25, 2023, 8:24am UTC](https://forums.balena.io/t/automated-update-of-balena-hostos/368993/1 "2023-09-25T08:24:28Z")

</div>

Hello,

I am having the following challenge:

Assume I have tens of thousands of devices on a production fleet and I need to deploy a new firmware release that only works with a newer version of the Balena hostOS. Unlike the firmware releases I cannot pin an offline device to a specific version of Balena hostOS. Meaning at the moment I would have to manually pin every single device when they come online (assume there are offline devices in stock that are not yet installed, and in transit) which is quite a hassle.

My question is whether there is a way to automate pinning a device to a specific Balena hostOS version?

Ideally it would be great if I could do it from a privileged application container, or during a docker building process of the containers.

I looked at balenaHUP, but it seems they do not support Raspberry Pi 4s. I am also using BalenaCloud and not openBalena.

Let me know if this issue has already been explored, or further clarification is needed.

Thanks,  
Roland

---

<div class="post-metadata">

**Author:** ![rcooke-warwick](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@rcooke-warwick](https://forums.balena.io/u/rcooke-warwick)\
**Post date:** [September 25, 2023, 9:01am UTC](https://forums.balena.io/t/automated-update-of-balena-hostos/368993/3 "2023-09-25T09:01:05Z")

</div>

Hi there,

As you’ve noticed, there is no built-in balena cloud feature right now to pin a fleet or a device to a specified HostOS version. You could take a look at this block: [GitHub - balena-labs-projects/autohupr: Automatically keep your balenaOS host release up-to-date with this block!](https://github.com/balena-labs-projects/autohupr) - while I haven’t used it personally I believe its been designed to do what you’ve described - worth a try!

---

<div class="post-metadata">

**Author:** ![roland-k](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@roland-k](https://forums.balena.io/u/roland-k)\
**Post date:** [September 25, 2023, 9:30am UTC](https://forums.balena.io/t/automated-update-of-balena-hostos/368993/4 "2023-09-25T09:30:15Z")

</div>

Thanks Ryan,

I will give this a go and report back!

---

<div class="post-metadata">

**Author:** ![roland-k](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@roland-k](https://forums.balena.io/u/roland-k)\
**Post date:** [September 27, 2023, 12:57pm UTC](https://forums.balena.io/t/automated-update-of-balena-hostos/368993/6 "2023-09-27T12:57:05Z")

</div>

Hi Ryan,

I can confirm that this approach works for automating hostOS updates.

Thanks for the help! The thread can be closed as solved.

Cheers,  
Roland
