I’m going to install Home Assistant on Windows using VirtualBox. It may sound complicated, but it is not and I will show you everything step-by-step.
I decided to move my Home Assistant installation from raspberry to a desktop PC to test is it going to be faster and more stable. It doesn’t matter If you are getting started with a fresh Home Assistant installation or just like me you want to migrate to a more powerful machine. This guide is tailored for you!
Table of Contents
Home Assistant on Windows 10
I’m will use VirtualBox on Windows 10, but you can use Linux or MacOS as your VirtualBox host and all of the steps that you will see in this video will be pretty much the same.
So let’s go:
Download and install VirtualBox for your OS
Nothing fancy here, just go to VirtualBox website then download and install the package for your Operating System. In my case this is Winodws.
If you have any difficulties with this step check my video above for detailed instructions.
Download Home Assistant Image file
Open the following link https://www.home-assistant.io/hassio/installation/ and download the VDI file under “As a virtual appliance (x86_64/UEFI)” bullet.
This is the virtual disk image that contains everything we need to start our Home Assistant on Windows.
Configure and install Home Assistant
To prevent yourself from issues in the future with not enough virtual storage, because by default Home Assistant VirtualDisk is 6GB only it is recommended to execute these several steps first.
Add the downloaded Home Assistant VDI image to Virtual Media Manager.
You will need VirtualBox 6 or higher to have this Virtual Media Manager option.
You can increase the size to whatever is suitable for you. In this example the size will be increased to 100GB.
Apply the changes and you should have something similar (of course your VDI version will be different, newer not 3.13)
Next, create New Virtual Machine in VirtualBox application.
Click on the new button.
After that type a name for you virtual machine and choose either Other Linux 32-bit or 64-bit depending of your system.
On the next dialog select the amount of RAM that you want to dedicate for this virtual machine. Absolute minimum should be 512MB.
The good think about this setting is that you can increase or decrease it at later stage if there is such need.
For the hard disk select the “Use an existing virtual hard disk file”.
On the next dialog click on the “Add” button
To add the VDI file just click Add.
At the end you should see something similar like the picture below, if you resize your VDI the digit under Virtual Size should mach your desired size.
Your final step here is to click the “Create” button.
Before you click “Start” button
Next we have to change some settings in VirtualBox to run our Home Assistant on Windows.
Click on the gear-wheel with the label “Settings” inside VirtualBox window.
In the “System” section under “Motherboard” tab click on “Enable EFI” option.
In the “System” section under “Motherboard” tab click on “Enable EFI” option.
Then click on the Network tab and change from Nat Network to Bridged Adapter – this will allow using your home network IP.
Of course you can increase your virtual processors/cores if your host system allows that, but I don’t see point to put here more than 2 processor. You can find this section again in System -> Processors.
When you are ready with everything click “OK”
Now you can freely click “Start” button (BIG green arrow pointed at right) to start Home Assistant on Windows as a Virtual Machine.
Performing one of the most important task
Now it is time to perform one of the most important parts. Without doing it you are putting the whole installation at risk, so be very careful when you are executing this.
Just look below this text and smash the “Subscribe” button to get my free Getting Started Smart Home Guide and to receive my articles every week via email. Thank you. 🙏
Setting a static IP from Home Assistant (Optional Step)
This step is optional. It is recommended if you are using AdGuard. If you don’t know what AdGuard is – check my video article about it.
Open you Home Assistant and go to:
Supervisor > System > Change IP address > Static
Enter the IP that you wish to set. For example: 10.0.0.2/24.
As Gateway type the IP of your router. The DNS is usually your router, or some public DNS service like 188.8.131.52. And if you use AdGuard you should add the AdGuard IP.
To test if everything is OK open in a new browser/tab the configured by you address on port 8123. For example: http://10.0.0.2:8123.
Using Home Assistant Snapshot for migration (Optional Step)
I’m going to use Home Assistant Snapshot functionality to migrate all of my data and configurations from my Raspberry Pi (old machine) to this new fresh installation. If you don’t have anything to migrate from – go directly to the next step/heading.
I will open my Home Assistant installation on the Raspberry Pi (old machine). And I will go to “Supervisor” in the lower left part of the screen and then on “SNAPSHOTS” tab.
Create a full snapshot or use already existing one if you have such.
Then click on you snapshot that you want to migrate and choose “DOWNLOAD SNAPSHOT” button.
Next go to your new HOST (where you want to migrate everything) and again click on “Supervisor” button, but before you click the Snapshots – click on the “ADD-ON STORE”.
Search and install “Samba” add-on.
Open and install this add-on. Don’t forget to add username and password under Config section. You will need them to access the snapshot that we created earlier.
Click “SAVE” when you update your Samba Configuration.
After you save your changes scroll up a bit and click on the “START” button.
Now you have to open that shared folder. Depending of your Operating system you can do one of the following:
Access shared folder from Windows
In Windows you can press WINDOWS + R buttons simultaneously and in the Run dialog you have to enter:
In my case this is
Access shared folder from macOS
To open a shared folder in macOS, open the Finder and press COMMAND + k, then type something like smb://10.0.0.15 and don’t forget to change the IP.
Access shared folder from Linux
If you are using Linux the universal way is from Terminal using smbclient by typing the following:
smbclient //YOUR_NEW_HA_IP/ -U <user>
Remember to login successfully you have to enter the credentials that you configure in the samba add-on within Home Assistant.
When you open the shared folder find “backup” folder and paste inside the snapshot that you downloaded from your old machine.
paste inside the snapshot that you downloaded from your old machine.
Head back to Supervisor > Snapshots menu in the Home Assistant of your new/target machine and click “refresh” button in the upper right corner.
You should see your snapshot under the “Available snapshot” section.
Click on it and then select “RESTORE SELECTED”.
The only thing left is to wait a bit for the process to finish. It can take up to 20min so be patient please.
Auto Start VirtualBox and Home Assistant after Windows restart
I’m going to configure VirtualBox to automatically start Home Assistant when windows reboots.
Go to your VirtualBox window and right click on your Home Assistant virtual machine and select “Create Shortcut on Desktop”
Then open windows explorer or Run dialog (WINDOWS + R) and type:
this will open a system startup folder in which everything pasted there will try to auto start after restarting Windows.
And we are going to do exactly that. Just paste the created shortcut of your Home Assistant on Windows virtual machine inside this system startup folder.
This is not enough for auto starting VirtualBox and HomeAssistant, because your windows user have to successfully login in order the things inside the startup folder to be executed.
We will fix that “issue” in the next section.
Auto Log in Windows after restart
I’m going to enable auto login feature in Windows, so when the computer restarts our account will be automatically logged in.
And the VirtualBox will auto start Home Assistant virtual machine if you execute the previous step in this tutorial.
Press WINDOWS + R and type
In the window that will be displayed uncheck the “User must enter a username and password to use this computer.”
Then click OK and enter your user password twice and you are ready.
What if netplwiz is not working?
If the above check in netplwiz is not visible for you (and there is a big chance for that if you are using Windows 10 version 1909 or above). Follow these steps:
- Go to windows search (start menu) and type: passwordless sign-in
Then, Click on the result!
- After that disable the following option if it’s enabled.
- Finally execute the netplwiz procedure exactly as described above.
Set your Windows Power Options correctly
Don’t forget to set your power options right to avoid unwanted sleep of your computer after several working hours.
To check if everything is alright open windows control panel and search for “power options” and click on “Change power-saving settings” and then change when the computer sleeps. Last find the option “Put the computer to sleep” and from the dropdown menu select – Never.
Resize Home Assistant Virtual Disk
The following steps are only needed If for whatever reason your Home Assistant Virtual Disk size that you already have is not enough.
How Do I know that my Home Assistant Virtual Disk have not enough space?
You will understand that you have disk space issues when for example you receive warnings in your Home Assistant logs, that your disk is full. Or you cannot update your Home Assistant and/or you can’t create new snapshots anymore. Only if you face any of these symptoms above you will know that it is time to resize your VDI file.
And here is how you can do it.
- Shut down the Home Assistant virtual machine – ensure that the state is set to Powered Off and not to Saved.
- Open command prompt and go to the folder where Virtual Box is installed (C:\Program Files\Oracle\VirtualBox by default) by type the following:
cd “C:\Program Files\Oracle\VirtualBox”
- Then type the following command and don’t forget to replace the full path to your Home Assistant image (VDI file) and to change the size you want to enlarge the image to in Megabytes.
VBoxManage modifymedium disk “C:\FULL_PATH_TO_YOUR_HOME_ASSISTANT_IMAGE.vdi” --resize 81920
- This process doesn’t enlarge the partition on the Home Assistant virtual hard disk, so you won’t have access to the new space just yet. You can use a GParted live CD to resize your virtual machine’s partition.
- Simply boot the GParted ISO image in your virtual machine and you’ll be taken to the GParted partition editor. GParted will be able to enlarge the partition on the Home Assistant virtual hard disk.
- Once GParted is booted, right-click the partition you want to enlarge and select Resize/Move.
- Drag the slider all the way to the right to use all the available space for the partition. Click the Resize/Move button after you’ve specified the space you want to use.
- Finally, apply your changes and enlarge the partition.
- After the resize operation completes, restart your virtual machine and remove the GParted ISO file.
- You will now have a resized Home Assistant on Windows.
Question for You
What kind of device are you using for your main home server?
Raspberry PI, some kind of desktop or laptop or maybe enterprise grade server.
If you are feeling lazy like me these days just put one word in the comments like: raspberry or desktop and I will know for what are you talking about.
That doesn’t mean that you cannot put the full configuration specification if you wish. It will be interesting to see that as well.
Support my Work
Any sort of engagement on this site does really help out a lot with the Google algorithm, so make sure you hit the subscribe If you enjoy this article.
Also feel free to add me on Twitter by searching for @KPeyanski.
You can find me on my Discord server as well. This is the invite link.
I really hope that you find this information useful and you now know how to install Home Assistant on Windows using VirtualBox .
Thank you for watching, stay at home, stay safe and see you next time.