Home / Projects / Home Assistant setup

Home Assistant setup

1 November 2025Rafael44p

Why Home Assistant

I started with Home Assistant back when it was still a small project, long before it became the big name in smart homes. The idea has not changed: every smart device comes with its own app and its own cloud, and Home Assistant brings them together in one local system - one dashboard, one place for automations, and it keeps working when the internet or a manufacturer's server is down.

Today it runs as a virtual machine on my Supermicro server under TrueNAS SCALE.

An example Home Assistant dashboard in dark mode with a weather forecast, room temperature cards, energy gauges, an energy flow diagram for grid, solar, gas, battery and home, and an hourly energy usage chart
An example of what a Home Assistant dashboard can look like: weather, every room at a glance and where the energy goes - all from local data, in one screen.
Diagram: Home Assistant in a VM on TrueNAS SCALE, connected to integrations, automations, energy and sensors, and backups, and serving dashboards, the companion app and remote access through the VPN
Everything goes through one local hub.

Why not the TrueNAS app?

TrueNAS SCALE has Home Assistant in its app catalogue, but that is the container version: no Supervisor, no add-on store and no built-in full backups. I wanted the complete Home Assistant OS (HAOS) with all its functions, and that needs a virtual machine.

The obvious way would be to create a VM straight from the HAOS disk image - but at the time the TrueNAS VM wizard could not import a disk image; it only installs from an ISO, and HAOS does not come as an installer ISO. So I worked around it: create an empty disk and a VM, then write the HAOS image onto that disk by hand from the TrueNAS shell.

Guide: HAOS as a VM on TrueNAS SCALE (the workaround)

1. Create an empty zvol for the VM disk

Datasets > select the pool or dataset for VMs > Add Zvol. 32 GB is the minimum Home Assistant asks for; I gave it a bit more for history and add-ons.

2. Create the VM around it

  • Boot method: UEFI - HAOS will not boot with legacy BIOS.
  • 2 vCPUs and 4 GB RAM is plenty for a normal home.
  • Disk: use the existing zvol from step 1 instead of creating a new one.
  • Installation media: skip it - there is nothing to install from.
  • Network: attach it to the LAN bridge so Home Assistant can discover devices.
  • Do not start it yet.

3. Write the HAOS image onto the zvol

Open System > Shell in TrueNAS, download the KVM image (haos_ova-<version>.qcow2.xz) from the Home Assistant release page, unpack it and write it straight onto the zvol. Replace the version and the zvol path with your own:

cd /mnt/tank/downloads
wget https://github.com/home-assistant/operating-system/releases/download/<version>/haos_ova-<version>.qcow2.xz
unxz haos_ova-<version>.qcow2.xz
qemu-img convert -p -O raw haos_ova-<version>.qcow2 /dev/zvol/tank/vms/homeassistant

Double-check the zvol path before you press Enter - writing to the wrong device overwrites it without asking.

4. First start

Start the VM, wait a few minutes, and open http://homeassistant.local:8123 (or http://<VM-IP>:8123). The onboarding wizard creates the owner account and finds most devices on the network by itself.

5. Backups

Settings > System > Backups: schedule automatic backups and keep a copy off the VM (for example on a Nextcloud or NAS share). Together with ZFS snapshots of the zvol, a broken update is a five-minute rollback.

6. Remote access

I do not expose port 8123 to the internet. The companion app on my phone reaches Home Assistant through the StrongSwan VPN.

The result

Full Home Assistant OS - Supervisor, add-on store, backups and updates from the interface - on the same server as everything else, protected by ZFS snapshots. A little more work up front than clicking "install" on the app, but nothing is missing.

« Nextcloud - my own cloud Owncast - my own live-streaming server »