How to install Home Assistant on a Raspberry Pi

Disclosure: This post contains affiliate links. If you click through and make a purchase, I will earn a commission, at no additional cost to you. Read my full disclosure here.
The Raspberry Pi 4 Model B on a wooden floor.

With your newfound knowledge of Home Assistant and the necessary hardware, it's time to put it into action. This comprehensive guide will walk you through the process of setting it up using the powerful Raspberry Pi 4 Model B. To get started, you'll need the following:

  • I do not recommend older models than the Raspberry Pi 4 Model B (highly recommended) or Raspberry Pi 3 Model B+. You will also need a power supply, and I recommend using only the official one.
  • A microSD card that is capable of handling Home Assistant and a microSD or SD card reader with the appropriate adapter. I would like to point out that the one pictured is what I received as part of a kit, I will not be using it long-term.
  • To be able to write the microSD card, you require a computer running Windows, Linux, or macOS with balenaEtcher installed.
  • Finally, make sure you have the option of hooking up the Raspberry Pi to your switch or router using an Ethernet cable.
  • You can optionally also purchase a case and fan for the Raspberry Pi, or 3D-print one. I had one as it came as part of the kit.

Why I don't recommend using the Raspberry Pi Imager to install Home Assistant

Installing the Home Assistant OS on a Raspberry Pi has never been easier, thanks to the Raspberry Pi Imager. This official software from the Raspberry Pi Foundation not only allows you to install Raspberry Pi OS, but also other operating systems without the need for any additional configuration or downloads. However, there is one potential downside to using the Raspberry Pi Imager: the Home Assistant OS image you'll be installing may be out of date.

The Raspberry Pi Imager's main interface displaying the options to choose an OS and storage medium
A screenshot showing how an operating system can be chosen in the Raspberry Pi Imager
A list of operating systems in the Raspberry Pi Imager displaying OctoPi, info-beamer digital signage, Homebridge, Home Assistant, and TLXOS.
Two variants of the Home Assistant Operating System, being Shown in the Raspberry Pi Imager: Home Assistant OS 7.6 for the Raspberry Pi 4 and Home Assistant OS 7.6 for the Raspberry Pi 3.

While you can easily update Home Assistant Core, the Home Assistant Supervisor, and Home Assistant Operating System from the UI, I recommend a clean installation using the latest release. At the time of writing, the latest image in the Raspberry Pi Imager Repository is Home Assistant Operating System 7.6, while the latest release is version 8.1. To put those numbers into context, the Raspberry Pi Imager is two full releases behind.

Flashing Home Assistant Operating System to a microSD card using balenaEtcher

The recommended way of installing the Home Assistant Operating System, which includes the Supervisor and Home Assistant Core, is by using balenaEtcher. You can install this application on your Windows, macOS, or Linux device, and additionally, there is a portable version available to download too. Once installed, you can copy the URL of the latest release from GitHub.

If you are using a Raspberry Pi 4 Model B that would currently be haos_rpi4-64-8.1.img.xz. The filename can be deciphered in the following manner:

Part in filenameDescriptionExample
haosHome Assistant Operating System
rpi4PlatformRaspberry Pi 4
6432/64-Bit Version64-Bit
8.1VersionHome Assistant Operating System 8.1

It is recommended to use the 64-Bit versions of Home Assistant Operating System for both the Raspberry Pi 4 Model B and Raspberry Pi 3 Model B+. As such, you would copy the following URL for the Raspberry Pi 4:

And the following URL for the Raspberry Pi 3 Model B+:

With the URL to the latest Home Assistant Operating System release copied, you can launch balenaEtcher and select the option titled 'Flash from URL'.

Enter the URL you previously copied in the pop-up that appears. You don't have to bother with any authentication.

Back in balenaEtcher's main window, you will now be able to select a target. Make sure you select the correct microSD card and don't overwrite any secondary external hard-drives. In my experience, balenaEtcher does a good job of hiding anything you want to avoid using for this operation.

Starting the Raspberry Pi running Home Assistant for the first time

With the microSD card successfully flashed, you can remove it from your computer and insert it into the Raspberry Pi. Connect your Raspberry Pi to your network using an Ethernet cable. Wait for a few minutes, then open a browser on your computer and navigate to http://homeassistant.local:8123/. Don't fret if your browser displays an error message. If your router doesn't support mDNS, you will need to look up the Raspberry Pi's IP address.

Finding the IP of the Raspberry Pi running Home Assistant using your DHCP server

There are multiple ways of finding the IP address of any device connected to your network. The first is to log in to your DHCP server, which will most likely be your router/modem. To access it, follow these steps on Windows:

The IP of a Windows computer, being displayed in a command prompt window after using the command 'ipconfig'.
  1. Open the Command Prompt by pressing the ⊞ Windows + R keys and entering cmd into the prompt.
  2. Enter the command ipconfig and hit the ↵ Return key.
  3. Look for the 'Default Gateway'. In most cases, its IP will be or
  4. Enter the IP into a browser to access your router/modem's interface.

The steps are similar on macOS and Linux devices; however, the command is slightly different: Open the Terminal and execute the command ifconfig -a.

You can find out how to find the list of clients by googling for your router/modem model

Somewhere in the web interface, you will find a list of all the devices that the DHCP server has assigned an IP address. This location of this list is dependent on who made the device. What you are looking for here is a device describing itself as 'homeassistant'. Once found, you can enter the IP, followed by :8123 in your browser. In my case, it is

Finding the IP of the Raspberry Pi running Home Assistant using an application

Alternatively, there are also apps that will help you find the IP address of devices on your network. Advanced IP Scanner is such an application, and it can be installed for free on Windows. Once you have it running, start a scan by entering the IP range your computer is in.

The results of running the Advanced IP Scanner application let me find the IP of Home Assistant

As I know from running the ipconfig command that my computer has the IP address, I will enter You might need to adjust the third number depending on your range. In a minute or so, the application will have discovered the devices, including the Raspberry Pi running Home Assistant. As I am unable to test any macOS applications, I will refer you to the website AlternativeTo, to find similar applications.

Setting up Home Assistant

Now that you know how to access Home Assistant, you can do so. Depending on how long the Raspberry Pi has already been running, you will be greeted by an image telling you to wait. You don't have to do anything at this time, besides waiting. The setup will continue automatically once Home Assistant is prepared.

A screenshot of the Home Assistant interface preparing for a first launch.
The Home Assistant interface prompting the user to enter a name for the Home Assistant instance, a username, and a password.

Once complete, you are prompted to add your name, username, and password. Make sure you don't forget your password or, even better, store it in a password manager. I can highly recommend Bitwarden, which I use daily and have no affiliation to.

You are then prompted to add some basic data such as your time zone, elevation, unit system, and currency. You can also have Home Assistant fill in this information by clicking the button labelled 'detect'. This will make a one-time request to an external service, though, and you won't be able to use it if you have the Raspberry Pi blocked from the internet. You can find your elevation using a barometer or one of the many websites that will do this using a mapping service.

The Home Assistant interface prompting the user to enter a name for the installation, a time zone, elevation, unit system, and currency.
The Home Assistant interface displaying integrations it has auto-discovered.

If you have any devices that Home Assistant can automatically discover, they will appear in the next step. However, you can add these just as easily in a later step, so I will be skipping them for now.

And with that, the setup is complete. You now have access to your Home Assistant Dashboard.

Frequently asked questions

Below are answers to questions I frequently read or receive personally. If there is anything else you would like answered, you can either contact me directly or, even better, leave a comment for everyone to see.

How do I power off Home Assistant Operating System safely?

You might be thinking about giving your Raspberry Pi a permanent home now that you have installed and configured Home Assistant. It isn't advised to unplug a Raspberry Pi while it is running, as that might reduce the microSD card's lifespan. To power off the Home Assistant Operating System, enter the developer tools, select the tab title services, and execute the 'poweroff the host system' service.

Can I attach a monitor to a Raspberry Pi running Home Assistant Operating System?

You can, but you won't be able to do anything useful with it. The Home Assistant Operating System running on a Raspberry Pi running does have a graphical interface. You will not see your Home Assistant Dashboard, nor is there any way of displaying it.

1 thought on “How to install Home Assistant on a Raspberry Pi”

Leave a comment

Share to...