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. 🙏
[sibwp_form id=2]
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 8.8.8.8. 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:
\\YOUR_NEW_HA_IP\
In my case this is
\\10.0.0.15\
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:
shell:startup
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
netplwiz
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.
Very interesitng staff!. I am using Rasperry PI 3, but I will be considering upgrading to a PI 4 as soon as I see things start to slow… In regads to using a Windows machine with a virtual machine, won’t that also slow down a bit HA?. although it is an alternative most probably for a new hardware instalation wouldn’t it be faster if you install hassio on top of Linux?. Of course in that way you will only be able to run other linux apps
Hey Luis, It won’t slow down the HA if your hardware is decent (any 4-8 years old desktop or laptop with enabled virtualisation should be ok). Have in mind that this is one of the official supported way to have Home Assistant, but there are a lot of ways to skin a cat after all 🙂 The best thing with VirtualBox is that you can execute almost the same steps that I’m describing on all major Operating Systems – Windows, Linux, MacOS. Thanks for your comment and I hope that I manage to give you an answer.
How do I open avi .cz file and save it as a complete file > I can open with 7zip
but it breaks it up into individual files ? I am a total novice but couldn’t get past
having a file like the tutorial.
Edit from above I meant vdi .gz the hassos-_ova-4.12…vdi.gz is compressed and I don’t know how
unzip it properly for use. 7zip opens it into separate files.
I’m also using 7zip and it works fine. Just right click on the vdi.gz file and select “7-Zip > uncompress here”
Hi, thanks fo a nice guide. After updated to 112 it wont connect to my xiaomi . It says that o should type ipadress of my gw, but it dosent work anyway. If i reed homeassistant guide for xiaomi it says, f you are using Home Assistant in Docker, make sure to use –net=host . Is it possible to use –net=host in Oracle virtualbox?
Does it means that before HA 112 your xiaomi worked fine? There is no -net=host in virtualbox and there is no need for that. In Virtualbox you can play with the VM network interface (NAT, Bridge, etc.)
Thanks I was too stupid to know “extract here”. old and slow. .
Thanks again.
Great to hear that it worked. And there is no stupid question. We are all learning…
Yes , before 112 xiao,i gw works fine. If i update it soent work, and thwn i restore to a snapshot i did before installation and it works fine again
So maybe there is some breaking change or something
I have the same issue with my new install not seeing Chromecast devices.
Are they in the same network?
I can’t access hassio on virtual box hosted on a Windows 10 machine. I have tried myipaddress:8123,
Hassio.local, home assistant.local
Hi, can you tell me what do you finally see in the HassOS console? Are you see the login: prompt?
The guide is very nice and made clear.
Whatever i try i cannot open the HA page…I have done exactly, step by step following your guide. Even managed to download the old version you are using VB 6.1.6. I am back to VB 6.1.12, vdi 4.12, Windows 10…Are there any other settings i need to do. Very often i have “FAILED” for network manager when server is loading.
Please, any idea is welcome.
Hi Plamen,
at what mode you set your VirtualBox network adapter? NAT or Bridged?
Hi Kiril
It’s at “bridge”.
I noticed when loading reaches the “homeassistant login:” it goes ahead by it self until ends at cursor blinking. Is this the end when i can open the web page? If yes, nothing is happening “Page cannot be found!”
Hi Plamen, double check that you are opening the right IP and port (8123). You can share some screens and configs in my Discord server.
Hi Kupe
I used your guide as well…but with the same result.
In fact i cannot see what IP to use. Also i enabled the BIOS/UFEI.
When type “nmcli” it’s telling me it is invalid command.
Is it possible something wrong with my windows or PC…
Hi Kiril
I think i finally made it…but i am not sure what is wrong.
I have 3 wifi networks available and 3 browsers on the PC.
Wifi are two open with login page and one is my iPhone hotspot.
Browsers are Chrome, Mozila and Edge.
HA is loading only with Mozila and only when connected to the open Wifi networks.
Also i ran the “dns stats” so i can see the host name and that was actually what i enter as IP “homeassistant.local:8123” and it opens. Still cannot figure out how to set static IP, even following the recommended steps. After the “root” and then “login” i have the cursor blinking near after this “#”. The “nmcli> print ipv4″” command is not recognized.
To execute nmcli> print ipv4, you first have to execute: nmcli con edit “HassOS default” exactly as stated in the instructions.
Hi Kiril
Yes. You are right. I used a paper printout and exactly this sentence was missing.
I have manage to make it as instructed but still http://10.0.0.15:8123 has no effect. Even checked with IP scanner app it does not appears.
Also i cannot install any add-on. It reports an unknown error.
One more thing: how/where can i find the config folder of HA? I would like to integrate some Sonoff devices but i need to paste in that folder…
No, no, no, no 10.0.0.15 was mine IP that I used in the demo. You should replace this with an IP from your subnet. For example if your router interface is accessible on 192.168.0.1 and the clients connected to it are in this range 192.168.0.2-255 you should replace 10.0.0.15 with 192.168.0.15 (if there is no such client in your network already). I should make this section more clear in the article. Thank you for making me notice that. And the config folder is located in /mnt/data/supervisor/homeassistant in the VM, but you better use the File editor or Samba add-ons from the add-on store.
I’ve updated the article a bit. I hope it is more clear now.
Hi Kiril
Thanks for the replay.
I am worry now that i am so not familiar with these…things that i may annoying you with my questions…of which i am sorry. I just want to make it work full capacity.
Please, correct me if i am wrong: once i have login to HA using the wifi LAN (no internet) i should see all my devices log in to the same LAN. I use sonoff devices and i need to install sonoff in HA. How can i do that if the “install” button reports an error?
Can you share what is the error? You can get it from the HA logs. Also do you able to install other add-ons except or they are all failed to install?
Hi Kiril
Please, see bellow my iPhone hot spot network:
SSID: iPhone
Protocol: Wi-Fi 4 (802.11n)
Security type: WPA2-Personal
Network band: 2.4 GHz
Network channel: 1
Link-local IPv6 address: fe80::9d29:160b:4bc8:d79d%30
IPv4 address: 172.20.10.2
IPv4 DNS servers: 172.20.10.1
Manufacturer: Intel Corporation
Description: Intel(R) Dual Band Wireless-N 7260 #2
Driver version: 18.33.17.1
Physical address (MAC): 80-19-34-80-86-7B
I did change the HA ip to this: 172.20.10.20/24 , dns and gateway to this:172.20.10.1
Is this correct? Because now i cannot enter HA via any browser…
Also i have install error to any app i try to instal when i had the HA access.
What is the way to paste image here or is not possible?
I can’t get past powering up the VM because hassos_ova-4.14.vdi has an expired certificate. (It’s apparently valid 2019-02-20 as opposed to 2020-10-20.) Any suggestions?
Wow that is a bug that I believe it will be fixed very soon. It will be best if you open a GitHub issue for this to let them know and to fix it faster.
Thanks for the guide! Unfortunately Home Assistant hogged the 6 gigs of storage in under a week. Have you thought of making a guide for expanding the storage size? Seems to be that adjusting the drive size in Virtual Media Manager is not enough so the HA could use more than 6 gigs.
Hi there, you can try these tutorials: http://derekmolloy.ie/resize-a-virtualbox-disk/ and probably the same steps but less detailed: https://github.com/home-assistant/operating-system/issues/169#issuecomment-478710790
Let me know if they worked! Wish you success.
when I get Welcome to Home Assistant
homeassistant login::
I can enter user name but passeword can’t
and get ”incorrect login”
If you are talking about the console login try using the user “root” and then type “login” without quotes.
Nice write-up! Got HA installed and working. I am curious about how the config folder inside the HA container. Is that folder shared as a volume within the linux VM? Could not find it under /var/lib/docker/volumes directory. How does it stay persistent?
Hi there, you can find the Home Assistant config folder inside the virtual machine on the following path – /mnt/data/supervisor/homeassistant
You don’t need to access it through Docker, just login in the Home Assistant os and go that folder. But if you want to edit the files there I recommend to use File Editor or samba add-ons available in the supervisor menu.
Thanks! That is very helpful. I noticed the snapshots also show up in the backups folder. That would allow for a handy way to save offline copies of the config/snapshots. I saw some of your posts describing how to do that to Github or google drive.
Yes, I have a tutorial showing how to backup the config folder on GitHub automatically. You can find it here – https://peyanski.com/automatic-home-assistant-backup-to-github
Perfect introduction. I have installed the VirtualBox on my iMac installed the .vdi file and made the adjustments you suggest to the Virtualbox manager. I can start the virtual machine without problem and HA starts up in a separate window. What is not happening is that the HA gui is not opening! I am left with a command prompt “Welcome to Home Assistant”, log in. If I log in with “root” and no password I get a greeting to the Home Assistant command line, nothing more. What do I need to do to start the HA gui?
Hi Peter, you have to open a new browser and to enter the Virtual Machine IP and port 8123. For example http://192.168.1.2:8123
That’s it nothing more 🙂 Good luck
Thanks Kiril, problem is that the Virtual Machine does not appear to have been given an IP address. Have checked my router and no ip address has been allocated.
Try to open the IP of the host of the VM with 8123 as a port. BTW did you choose Bridged as network adapter?
Wouldn’t it be easier to use a scheduled task to start the VM? I wrote about it in the HA forums:
https://community.home-assistant.io/t/windows-powershell-scripting-to-control-your-home-assistant-and-other-virtual-machines/198998/5
Good tip, I should try it and it seems very easy indeed. Thanks for sharing!
My install is stuck on the screen that says “Preparing Home Assistant (this can take up to 20 minutes)”. I’m using a Intel NUC with windows 10 home. Any idea what could be causing this issue?
Have you selected bridged adapter as your network in VirtualBox?
Nice write up. Got through the install easily. Only issue I have is USB type and access. VirtualBox shows it only supports USB 1.0. I need at least USB 2.0 so I can use a ZWave USB stick. How do you enable or add USB 2.0 or higher?
Try to install VirtualBox Extension Pack as it is having support for USB 2.0 and USB 3.0
Nice guide, thank you.
However i lost my login credential at the hassio os level any idea how i can get them back?
thank you
Check this guide – https://www.home-assistant.io/docs/locked_out/
Let me know what happened after that!
Hi Kiril, great guide! Everything works great for me with your help. One related question though, related to the virtual/bridged IP address. The HA server can be accessed on my network at the address showing in the VirtualBox window, say 192.168.2.69. However, I do not always see this address when I look in my Unifi devices list. The Dell PC on which I’m running HA has an IP of 192.168.2.70, and I see the Unifi window show this switching back and forth with the .69 and the .70. I guess this is expected behavior due to the Virtualbox bridging. I’m worried about setting up Adguard if the other machines on the network won’t constantly be able to see the homeassistant server.
Something is not OK, it shouldn’t be that way. Try to set a static IP both in your UniFi controller and in Home Assistant > Supervisor > System > Host
Hello Kiril. I am a newbie to home assistant. So I ended up installing home assistant on a virtual machine using windows 10 hyper-v as test. I have login credentials now for home assistant. I am hoping to start over completely from scratch since the vm is running on a laptop that I don’t have powered on constantly. If I were to delete the virtual machine and virtual hard disk would it also erase my login credentials so I could reuse the user name and password? Remember I am wanting to start from scratch. I don’t really care about my integrations since I only had one device linked as a test. Please respond.
Yes, if you delete your VM and virtual disk it will erase everything including your credentials and you will start from scratch
Hi KP, thanks for the guide! I was previously using a Pi Zero W for my home automation stuff (Domoticz) but lost everything when my Micro SD card corrupted. I’ve now decided to migrate from Smartthings to Home Assistant on my Windows 10 Surface Pro 3 Virtual Box and was wondering if it’s easy to simply pick up my VM clone and move it to a new PC should my Surface Pro 3 ever die one day? I also use the BLE plugin with the Surface Pro 3’s built-in Bluetooth and a Sonoff Zigbee 3.0 USB dongle. Hoping that my Surface Pro 3 lasts at least a few more years but also planning for the worst should it die.
Hi Kiril, Is this method available without ethernet cable connection. I mean via wifi connection. When I start VM, this error occurs ” A strat job is running for Wait Until Kernel Time Synchronized”. Pls help me.