Install lm-sensors on "Host OS" on a Raspberry Pi?


Is it possible to install lm-sensors and other applications directly on the “Host OS”?

I’m running balena-sound but would like to see the temperature of the device.

It this possible or do I have to start another container for this?


Hi @Noiden,

Accessing device resources should be possible from any container that you’ve marked privileged: true in your docker-compose.yml file. A single-container app has these privileges by default, but multi-container apps don’t so it needs to be explicitly set. Here’s documentation on that. You shouldn’t need to add a separate container just to access device (what you call “Host OS”) resources. They can be part of any service container.

For example, running cat /sys/class/thermal/thermal_zone0/temp in a privileged container will reveal an RPi’s CPU temp. I believe all the balenaSound containers are privileged and should support that. What kind of device are you using?


Hi @jtonello,

Thanks for the answer.

I was thinking of installing lm-sensors directly on the “Host OS” that is balenaOS where I come when I do a "balena ssh ".

But I can’t find any package manager on the “core” and I don’t want to install it on the containers that comes with “balena-sound”.

I’m running balena-sound on a Raspberry Pi 3.


In this case, I’d suggest adding a new container specifically for lm-sensors. We don’t recommend installing tooling on the Host OS.


1 Like

Cool… Will do that thanks.