This guide walks you through the process of setting up Home Assistant as a Virtual Machine (VM) on your Unraid server. While the simplest way to start with Home Assistant is often with a Raspberry Pi, using your Unraid NAS offers the benefits of more powerful hardware and the convenience of centralizing all your smart home services in one place. We’ll cover the benefits of using a VM, the steps to get started, and tips to ensure a smooth installation.
In a previous post, I explained how to set up Home Assistant for beginners, with the Raspberry Pi being the simplest way to get started. However, if you already have an Unraid NAS set up, it likely has better hardware, more memory, and more storage than a Raspberry Pi. This makes it ideal for concentrating all your smart home services in one place (who said putting all your eggs in one basket is bad?).
Two Ways to Install Home Assistant on Unraid
Home Assistant can be installed in Unraid in one of two ways: either as an “App” through the Apps section, which is essentially a Docker installation, or as a Virtual Machine (VM). While the Docker installation is straightforward and effective, installing Home Assistant as a VM has a significant advantage: it’s the only method that allows you to install add-ons directly within Home Assistant. This capability can be crucial for expanding your smart home system’s functionality, making the VM installation the preferred option for many users.
What is a Virtual Machine (VM)?
For those unfamiliar, a Virtual Machine (VM) is a software-based emulation of a computer system. It allows you to run an operating system (in this case, Home Assistant OS) on top of your existing system (Unraid). This setup creates an isolated environment where Home Assistant operates as if it were running on its own hardware, providing you with more control and flexibility.
Why Choose a VM?
Choosing a VM installation for Home Assistant gives you full access to its powerful add-ons, which are not available in the Docker version. This makes it an attractive option for users who want to maximize the potential of their smart home setup.
How to Install Home Assistant as a VM on Unraid
Step 1: Get the qcow2 Image
- Head over to Home Assistant’s GitHub releases page. Scroll down to find the latest stable release (avoid pre-release versions). Look under the “Assets” link for the file named
haos_ova-xx.y.rc2.qcow2.xz
(with xx.y being the version number). Be careful not to download the version with “aarch64” in the name, as it’s not compatible with most setups.
After downloading this file from GitHub, be sure to unzip it first, as the downloaded file can’t be used as-is.
Step 2: Prepare Unraid
- Navigate to the Settings tab in your Unraid server and ensure that VMs are enabled in the VM Manager settings.
- Check your Shares tab and make sure you have a “domains” share with SMB set to export.
Step 3: Copy the qcow2 Image
- Access the domains share from your computer and copy the downloaded qcow2 image into this share.
Step 4: Set Up the New VM
- Go to the VM tab in Unraid and select “Add VM,” choosing Linux as the type.
- Name your VM (I called mine HomeAssistant OS) and assign the appropriate number of cores (Between 2 to 4 should be enough) and amount of RAM (I defined mine with 4096mb).
- Under “Primary vDisk Location,” select “manual” and choose the image file (with the path) you copied to the domains share (In my setup it was “/mnt/cache/domains/haos_ova-12.4.qcow2”)
- Set “Primary vDisk Bus” to “SATA.”
- Pass through any necessary USB devices, such as Zigbee or Bluetooth hubs, and click “Create.”
- A VNC window will open, running you through the setup. When it’s done it’ll tell you what IP address was allocated for your Home Assistant setup. You can then close the window.
Step 5: Test Access
- Open a browser and go to
[home assistant ip]:8123
to access your new Home Assistant instance (with the IP address you received in the previous step).
Step 6 – Optional: Migrate from a Raspberry Pi installation to Unraid
If you already have Home Assistant set up and running on a Raspberry Pi, migrating to an Unraid VM is a breeze. To do this, start by creating a backup of your current installation. You can do this directly from your Raspberry Pi by navigating to Settings -> Backups -> +Create Backup. Alternatively, I highly recommend using the “Home Assistant Google Drive Backup” add-on, which automatically saves your backups to Google Drive. After creating a backup with the add-on, simply launch Home Assistant as a VM on Unraid. The first screen you’ll encounter offers the option to restore from a backup. Select the backup file you created, and your previous setup will be restored seamlessly. The process was surprisingly painless for me, with no additional steps required.
Final Thoughts: Setting up Home Assistant as a VM on Unraid takes a few extra steps compared to using a Raspberry Pi or a Docker container, but the benefits—especially the ability to use add-ons—make it worth the effort. Plus, it allows you to leverage the superior hardware of your Unraid server, giving you a more robust and reliable smart home system.