Home assistant & rpi

Not advised, but here you find a how-to

Otherwise (better supported) is to use a HA Container installation