Home Assistant is the most widely used way to run a smart home without your devices depending on a manufacturer’s cloud. Everything runs in your house: if your internet goes down, your lights and switches keep working.

This guide takes you from a blank Raspberry Pi to a working system. Budget about ninety minutes, roughly twenty of which you spend waiting.

Why a Raspberry Pi? You don’t have to. Home Assistant runs fine in a virtual machine or on a mini PC. But a Pi is silent, draws about 5 watts (roughly €12 a year) and is a dedicated device you won’t accidentally repurpose.

Choose the right hardware

Three decisions that are painful to reverse later:

The model. A Raspberry Pi 5 with 4 GB is plenty for an average home. A Pi 4 still works well. Don’t go below 4 GB: Home Assistant itself fits, but the moment you add a database, Zigbee2MQTT and a camera stream, you’ll hit the ceiling.

Storage. This is the important one. Home Assistant writes to its database constantly, and microSD cards die under that load — usually within one to two years. An SSD over USB costs about €25 more and lasts for years. If you do use an SD card, buy one rated for continuous writing (a SanDisk Max Endurance, for example) and make sure your backups actually work.

The power supply. Use the official adapter. The Pi 5 wants 5 V at 5 A; a random phone charger doesn’t deliver that, and the result looks exactly like software trouble — random reboots, card corruption, USB devices vanishing. This costs people days of debugging.

Networking. Use a cable if you can. Wi-Fi works, but this box is about to become the foundation your lighting and security run on. You don’t want that depending on a signal that’s just barely in range.

Flash Home Assistant OS to the card

Home Assistant has its own operating system (Home Assistant OS). Install that, not Raspberry Pi OS with Home Assistant on top — the add-on store and automatic updates only exist on HAOS.

  1. Download and install Raspberry Pi Imager.
  2. Insert the microSD card or SSD into your computer.
  3. Open Imager, click Choose device, pick your Pi model.
  4. Click Choose OSOther specific-purpose OSHome assistants and home automationHome Assistant → the image for your model.
  5. Click Choose storage → your card or SSD.
  6. Click Next and confirm. Imager warns that everything will be erased — that’s correct.

Writing and verifying takes five to ten minutes.

Skip the OS customisation Imager offers (username, Wi-Fi, SSH). Those settings are for Raspberry Pi OS; Home Assistant OS ignores them.

Boot it and wait

Put the card in the Pi, connect the network cable, and only then the power.

The first boot takes a long time: Home Assistant unpacks itself, creates its partitions and pulls updates. Expect fifteen to twenty minutes. Nothing visible happens during that time, and that’s normal. Don’t pull the plug.

Then open:

http://homeassistant.local:8123

Nothing? Then mDNS (the .local address) isn’t working on your network — true of some routers and most corporate networks. Find the IP address of the homeassistant device in your router’s admin page and use http://<that-ip>:8123 instead.

Work through the onboarding

You’ll create your administrator account here. Two things worth pausing on:

The password. This account controls everything you’ll ever attach to your house: locks, cameras, heating. Use a unique password from your password manager, not a variation on something you use elsewhere.

The location. Home Assistant asks for your address to calculate sunrise and sunset. That’s genuinely useful — a lot of automations key off it. You can reduce the precision by picking the middle of your street rather than your house number; it makes no difference to sun times.

At the end, Home Assistant offers to add devices it found on your network. Skip that for now. Foundation first, devices second.

Turn on backups before anything else

This is the most-skipped step and the most expensive one to skip. Once you have thirty automations and two hundred devices, a dead SD card without a backup is a lost weekend.

Go to SettingsSystemBackups and set:

  • Automatic backup: on, daily.
  • Retention: 3 backups is enough for most people.
  • Location: pick at least one that is not the Pi itself. A backup on the same card that can fail is not a backup. Home Assistant can write to a network share; otherwise connect Google Drive or Nextcloud through an add-on.

Take a manual backup now and download it to your computer. That gives you a clean starting point.

Secure remote access

If you only use Home Assistant at home, skip this. If you want access while you’re out, do it properly.

What not to do: forward port 8123 on your router. That puts your house controls unprotected on the open internet, and automated scanners find it within days.

Two good options:

  • Home Assistant Cloud (Nabu Casa), €7.50/month. Encrypted remote access plus Alexa and Google Assistant integration, and it funds development. For most people this is the right call.
  • A VPN into your home network, e.g. WireGuard on your router. Free, but you maintain it.

Either way, enable two-factor authentication in your profile, at the bottom of the page. Do it even if you only ever log in from home.

What to do next

You now have a working local system. The logical next steps:

  • Add devices. Go to SettingsDevices & services. Things you already own (Philips Hue, Sonos, your smart meter) are often discovered automatically.
  • Set up a Zigbee network if you want sensors and switches that don’t use Wi-Fi. That’s its own project — see our Zigbee2MQTT guide.
  • Start small with automations. One that works and that you notice every day beats ten you’ll finish someday.

Common mistakes

“My Pi reboots at random.” Almost always the power supply. Try the official adapter before you go looking for software bugs.

“After a few months everything is slow or broken.” Worn-out SD card. Move to an SSD and restore your backup.

“I can’t reach homeassistant.local.” mDNS isn’t working on your network. Use the IP address, and pin it in your router (DHCP reservation) so it stops changing.

“I installed Raspberry Pi OS and then Home Assistant.” That’s the Container or Core install. It works, but you lose the add-on store and built-in backups. For a first install, start over with Home Assistant OS.