Install the homeassistant image as explained on this page below.
https://www.home-assistant.io/installation/raspberrypi