Skip to main content

Get started with Home Assistant: install it and build your first automation

Put Home Assistant OS on a Raspberry Pi 4 or 5 and finish setup in your browser. Then add an integration, build one automation and turn on backups.

KBY Makers and home lab 7 min read Checked 23 November 2026
Smart home devices laid out on a white surface around a phone: a smart bulb, a camera, a hub and two small wireless sensors
Photo: Jakub Zerdzicki on Pexels

Underlined words are defined in the KBY Lexicon. Tap or click one to see what it means.

Install Home Assistant on a Raspberry Pi 4 or 5 with Raspberry Pi Imager, plug the Pi into your router and open homeassistant.local in a browser. Create your account there, add your first integration and build one automation. Then turn on automatic before you build anything else.

Home Assistant is software that runs your smart home on your own hardware, at home. Every step and menu path here comes from Home Assistant's own documentation, version 2026.11.2, read on 23 November 2026.

Choose where it will run

Home Assistant says that because it runs on your own hardware, your smart home keeps working when the internet is down. Your data also stays at home with you. Its installation page gives three main routes.

  • Home Assistant Green is Home Assistant's own hardware, which comes with Home Assistant Operating System already on it. You connect power and your network, with no assembly or flashing.
  • Your own hardware means writing Home Assistant Operating System to a Raspberry Pi, an Odroid or an x86-64 computer. Home Assistant recommends this for most people who bring their own hardware.
  • A container or virtual machine suits people at ease with the command line, or virtual machines. The container version does not include apps, the add-on software that Home Assistant OS can install.

Home Assistant Operating System, or Home Assistant OS, is a small operating system built only to run Home Assistant. Its Supervisor keeps it up to date, so you do not manage a separate system. This guide uses it on a Raspberry Pi.

Put Home Assistant OS on a Raspberry Pi

Home Assistant's Raspberry Pi page lists this kit:

  • A Raspberry Pi 5 or Raspberry Pi 4 with at least 2 GB of RAM, and its power supply.
  • A microSD card of at least 32 GB. Home Assistant suggests one marked A2 (Application Class 2), which copes better with small reads and writes.
  • A card reader for your computer, if it has no card slot.
  • An Ethernet cable. It is required for installation. Wi-Fi works afterwards, but Home Assistant calls a wired connection more reliable and highly recommended.

Use a proper power supply for the Pi. Home Assistant warns that phone chargers may not be suitable, and that a computer's USB ports do not supply enough power and must not be used.

Write the card

You do not need to install another system on the Pi first. On your computer:

  1. Install Raspberry Pi Imager from the Raspberry Pi website, and open it.
  2. In the OS step, select Other specific-purpose OS > Home automation > Home Assistant.
  3. Choose the Home Assistant OS that matches your Pi, RPi 4 or RPi 5.
  4. Insert the card and select it as the storage. Everything on the card will be overwritten.
  5. Select Next, then Write, and wait while Home Assistant OS is written.
  6. Select Finish and eject the card.

Start it up

  1. Put the card in the Pi.
  2. Connect an Ethernet cable from the Pi to your router or a network switch. Use the same network as your computer, with internet access.
  3. Connect the power supply to start the Pi.
  4. In a browser on your computer, go to homeassistant.local.

On a Raspberry Pi 4 or 5, Home Assistant says the page should appear within a minute. If the address does not open, try homeassistant.local:8123. On older Windows versions or stricter networks, you may need the Pi's IP address instead.

If nothing appears after 5 minutes, the image may not have been written properly. Write the card again, perhaps with a different card.

Create your account in the browser

The first page you see is Preparing Home Assistant, while it downloads its latest version. Home Assistant says this can take 20 minutes or more, depending on your hardware and internet connection. The welcome screen then opens.

  1. Select Create my smart home.
  2. Enter a Name, a Username and a Password, then repeat the password under Confirm password. The username must be lowercase with no spaces.
  3. Select Create account. This is the owner account, an administrator that can change every setting.
  4. Enter your home's location by searching your address, selecting Detect, or dragging the marker on the map. Select Next.
  5. On the Help us help you screen, choose what usage data to share, if any, then select Next. Sharing is off by default.
  6. Select Finish to open your dashboard.

Store the username and password somewhere safe, such as a password manager. Home Assistant says there is no way to recover the owner's credentials.

Before you select Finish, the last screen lists any compatible devices Home Assistant found. Some are added already, while others need a few more settings.

Add your first integration

An integration connects Home Assistant to a device, a service or a brand. Home Assistant works with devices and services from over a thousand brands, and most can be added from the screen in a few steps.

  1. Go to Settings > Devices & services.
  2. If anything appears under Discovered, select Add on it and follow the steps.
  3. To add one yourself, select Add integration in the bottom-right corner, search for it and follow its steps.

Home Assistant's own tutorial uses the Workday integration, because it needs no smart device. It works out whether a day is a workday, a day off or a holiday.

  1. Select Add integration and type workd, then select Workday.
  2. Select your country, then select Submit.
  3. To check whether tomorrow is a workday, enter 1 under Offset. For regional holidays, choose your region under Subdivision of country. Select Submit.
  4. Choose the area it belongs to, such as office, and select Finish.

Select the integration, then its service, to see what it made. Workday gives you two entities, a binary sensor that is on during a workday and a calendar. An entity is one sensor, switch or function that Home Assistant can read or control.

Build your first automation

An automation has three parts. A trigger starts it, conditions check whether something is true, and actions are what it does. You build all three in the visual editor, with no code.

Home Assistant's first example turns the lights on 30 minutes before sunset. You need a light already added through an integration, and assigned to an area such as Living room.

  1. Go to Settings > Automations & scenes, and select Create automation > Create new automation.
  2. In the When section, select Add trigger, then search for and select Sunset.
  3. Under Offset, select Before, and under Duration enter 30 minutes.
  4. In the Then do section, select Add action, then search for and select Turn on light.
  5. Under Targets, select Add target and choose the area with your lights.
  6. Select Save, give it a clear name and select Save again.

Use a name you will recognise later, such as Turn on living room lights before sunset. Home Assistant suggests specific names, so you can find each automation once you have many.

Add a condition

Conditions go in the And if section. Home Assistant's second example uses the Workday sensor from earlier.

It starts at a fixed time, such as 21:45. A State condition then checks that the Workday sensor is On, so it continues only before a workday. Under Then do, an If-then block checks that the light is on before it dims it.

Two lit smart bulbs glowing white and pink beside a smart plug, a security camera and a smart home hub
Photo: Jakub Zerdzicki on Pexels

Turn on backups before you build more

Home Assistant says to back up regularly, because a setup can take many hours to build. A backup also lets you move to new hardware. Backups are encrypted by default.

  1. Go to Settings > System > Backups.
  2. On the Set up backups card, select Set up backups.
  3. Under Download emergency kit, select Download, and keep the file somewhere safe. You need the encryption key inside it to restore your backups.
  4. Select Next, then choose Recommended.

The Recommended setting backs up everything every day except media, the share folder and the local apps folder. It keeps the last 3 backups, stored on the Pi itself, and on Home Assistant Cloud if you are signed in.

A backup kept only on the Pi is hard to reach if the Pi fails. Home Assistant recommends keeping a copy on another system, and ideally one away from home too. To download one, go to Settings > System > Backups, select Show all backups, then use the three dots menu on a backup and select Download.

For a backup straight away, select Backup now on the same page, then Manual backup.

This guide keeps Home Assistant on your home network only. Home Assistant's remote access page says that by default it can only be reached from your local network. Before you open it to the internet, work through the project's securing checklist.

A hand holding a slim external drive connected by cable to a laptop, next to a notebook and a cup
Photo: Arina Krasnikova on Pexels

Common questions

Can I run Home Assistant on a Raspberry Pi 3?
Not as Home Assistant OS, which Home Assistant lists for the Raspberry Pi 4 or 5 with at least 2 GB of RAM. Its container version, Home Assistant Container, lists the Raspberry Pi 3, 4 or 5, but it needs Docker and the Linux command line, and it does not include apps.
What if I forget the owner account's password?
Home Assistant's onboarding page says there is no way to recover the owner's credentials. Store the name, username and password somewhere safe when you create the account, such as in a password manager.
Does Home Assistant need the internet to work?
Home Assistant says it keeps working when the internet is down, because it runs on your own hardware. It does need internet access during setup, when it downloads its latest version.

Sources

Every setting, menu path, spec and price in this guide comes from these pages, read on 23 November 2026. Menus, specs and prices change with updates: check the source before you rely on one.

  1. Remote access (Home Assistant)
  2. Securing (Home Assistant)
  3. Installation, Documentation 2026.11.2 (Home Assistant)
  4. Raspberry Pi, Documentation 2026.11.2; Home Assistant OS 18.5 images (Home Assistant)
  5. Onboarding Home Assistant, Documentation 2026.11.2 (Home Assistant)
  6. Adding integrations, Documentation 2026.11.2 (Home Assistant)
  7. Tutorial: Create your first automation, Documentation 2026.11.2 (Home Assistant)
  8. Backups, Documentation 2026.11.2 (Home Assistant)

Spotted something wrong or out of date? Tell us and we will correct it.

About this page

Dates

Published

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Keep reading

More Makers and home lab guides

All Makers and home lab guides
Share this guideXLinkedInFacebookEmail

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

All Makers and home lab guides

The KBY Brief

A short email about twice a week for IT teams: new runbooks, configuration traps and fixes, and the Microsoft and Apple deadlines coming up.