How to Install Home Assistant on Proxmox

In this tutorial, we’re going to look at how to install Home Assistant on Proxmox.

There are technically two different ways to set up Home Assistant on Proxmox and we’re going to look at both below. The first way is automated, meaning that you run a script and it will walk you through the different options that you can use. This is incredibly easy, however, many people don’t feel comfortable running scripts, so we’ll look at how to manually install it as well.

Home Assistant on Proxmox

The two options that we’ll look at below will show you how to set up Home Assistant on Proxmox using a script (first option and automated) or manually. Before we do, let’s look at why you might want to run Home Assistant on Proxmox.

Why Run Home Assistant on Proxmox?

If you decide to install Home Assistant on Proxmox, the initial and biggest benefit is that you’ll be running Home Assistant which offers you tons of options. However, there are benefits to running Home Assistant on Proxmox in specific.

Running Home Assistant on Proxmox allows you to take advantage of the stability and performance benefits that come with running Home Assistant in a virtual machine (VM). Using a VM allows you to isolate Home Assistant from other applications, which prevents potential conflicts and improves overall system reliability.

Proxmox also allows you to use powerful features, like automated system backups and snapshots. These features make it easier to troubleshoot problems and recover your Home Assistant configuration if something goes wrong, which isn’t always easy with other Home Assistant install methods.

Finally, by using Proxmox, you can run multiple instances of Home Assistant or other services alongside it, allowing you to utilize your system’s full capacity rather than having an individual device dedicated to Home Assistant.

Installing Proxmox VE

Before you can install Home Assistant, you must have Proxmox VE installed. If you already have Proxmox installed, skip to the next step.

We will look at how to install Proxmox VE below. Please make sure that you download the latest Proxmox VE ISO installer. To write the ISO image to a USB stick, you can use a tool like Etcher for Windows, Mac, or Linux.

Creating a Bootable Proxmox VE USB Drive – Etcher Instructions

After you download and launch Etcher, select the Proxmox VE ISO image, select your USB stick, then Flash! This will write the ISO image to the USB stick.

showing etcher application with the proxmox iso.

After it’s done writing, you’ll have to boot your machine from this USB stick. Every machine will be different, but if you’re having trouble, enter the BIOS and make sure that you can boot from USB.

You must also confirm that the machine you’re using supports virtualization and that it’s enabled in the BIOS.

Proxmox VE Setup Instructions

After you boot from the USB drive that we created in the last step, there are a few different settings that you’ll have to configure in order to finish setting up Proxmox.

1. At the first screen, select Install Proxmox VE.

how to install proxmox - default install page.

2. If you agree with the terms, select I agree.

terms and conditions of proxmox.

3. Select the target hard disk where you’d like to install Proxmox VE. When you’ve selected the correct hard drive, select Options.

showing the hard drive selection of the proxmox installer.

4. These options will allow you to select the filesystem that you’d like to use. If you want to utilize software RAID, you can configure it as well. You also have the option of using other file systems (Ext4 for example) if you only plan on using one hard drive. Select OK and then proceed to the next step.

setting up raid z1 with two hard drives.

5. Select your Country, Timezone, and Keyboard Layout, then proceed.

setting a country and time zone in proxmox.

6. Enter in the administrator password that you’d like to use, an email address, then proceed.

adding a password and email for proxmox the admin user.

7. Select the correct Management Interface, enter in a hostname, then set the IP address that you’d like to use, as well as the gateway and DNS server.

NOTE: If you can set up DHCP leases on your DHCP server (most people’s router), set a DHCP lease for Proxmox so that the IP address never changes.

selecting a management interface, hostname, and IP address, DNS server and gateway.

8. A summary page will appear – confirm all the settings are correct and proceed.

confirming settings of proxmox installer before installing.

9. Proxmox will now install!

proxmox install process.

10. Give the installation process a little while to install and reboot. When it does, you should be able to access Proxmox by navigating to the IP address and port listed below.

https://PROXMOX_IP:8006

11. Login with the username root and the password you set up above.

proxmox login page.

Installing Home Assistant on Proxmox

There are two different ways you can install Home Assistant on Proxmox. The first utilizes a script that will install the entire OS automatically. However, you can manually install it as well, which is the second option below.

1. Using a Script to Install Home Assistant on Proxmox

1. Make sure that you have Proxmox installed and configured, then review the script that we’ll be running below and ensure you’re comfortable proceeding. To give you my personal input, I have used this every time I’ve set up Home Assistant on Proxmox, but you should review it on your own as well.

NOTE: You can also check out ttecks GitHub page here (creator of the script)!

2. Access the Shell of your Proxmox server.

proxmox shell icon.

3. Run the command below to install Home Assistant.

bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/vm/haos-vm-v5.sh)"
running the command above in the proxmox shell.

4. Select Yes to create a new Home Assistant VM.

creating a home assistant VM.

5. If you’d like to use the default settings, you can, however, I normally select No to configure my Home Assistant setup.

selecting no on the default settings of home assistant.

6. Select the version that you’d like to use.

selecting the stable version of home assistant.

7. Set a virtual machine ID (this can generally stay as-is).

setting a virtual machine ID.

8. Set the hostname that you’d like to use.

creating a VM hostname.

9. Allocate the total number of CPU cores.

allocating CPU cores in proxmox.

10. Allocate the total memory that the VM should have.

setting the memory to use in proxmox.

11. This section will ask you to configure the bridge network. Leave this as default (though your screenshot may look different) and select OK.

selecting the bridge network to use.

12. Leave the MAC Address as default and select OK.

confirming the mac address in proxmox.

13. If you’re using a VLAN and would like this virtual machine to use that VLAN, you’ll have to enter the VLAN tag here. However, if you don’t have VLANs set up, you can select OK.

defining a vlan tag to use.

14. Select Yes to start the VM when it’s finished installing.

confirming the vm should start when completed.

15. Finally, select Yes to create the virtual machine!

selecting yes to create the vm.

16. Home Assistant will now download and install!

vm install progress.

17. Once it finishes installing, you can open the console window for the VM and view the IP address that was assigned or access home assistant by the Home Assistant URL. After connecting to the URL, you’ll have to finish setting up Home Assistant, but it will be ready to go afterward!

confirming the vm shell is up and running.

2. Manually Installing Home Assistant on Proxmox

After looking at how to set up Proxmox using a script, you might not be comfortable running a script that is written and maintained by someone else. The process below will be slightly more involved but will walk you through how to set up Home Assistant on Proxmox manually.

1. Make sure you have Proxmox installed and configured, then navigate to the Home Assistant downloads page and download the KVM/Proxmox (.qcow2) file.

downloading the proxmox qcow2 file.

2. Extract the file, then rename it from .qcow2 to .img on your Mac/PC. This step is important because our goal is to upload it to our ISO images library, then import it into our virtual machine and the ISOs directory doesn’t traditionally store .qcow2 images.

renaming the qcow2 image to img.

3. After you rename the file, upload it to your ISO Images location.

uploading the iso image to proxmox.

4. Select Create VM and then enter a name.

addinga  vm name and vm ID.

5. In the OS tab, select do not use any media.

selecting not to use any media.

6. In the System tab, check off QEMU Agent.

confirming the settings in proxmox.

7. In the Disks tab, delete (red trash can) the scsi0 disk. You shouldn’t have any disks listed after doing this.

removing the scsi0 disk.

7. Set the CPU tab to use two cores.

setting the CPU cores in proxmox.

8. Set the Memory to use 4GB.

setting the memory in proxmox.

9. Navigate to the Confirm tab and ensure that Start After Created is NOT selected. Then select finish to create the virtual machine.

confirming the virtual machine settings in proxmox.

10. Run the command below substituting the current version, VM ID, and Storage Location. After running the command below, the disk will be imported into your VM!

NOTE: If you’re using a separate location for your ISOs like a Synology NAS, you’ll have to navigate to that storage location. Once again, you might have to update the version below to match what you downloaded.

qm importdisk <VMID> /var/lib/vz/template/iso/haos_ova-8.4.img <STORAGE_LOCATION>
navigating to the iso image folder and importing it to the VM.

11. Select the virtual machine and edit the unused disk that we just imported.

viewing and editing the unused disk just imported in proxmox.

12. Select Add to add the disk to the VM.

adding the hard disk to the VM in proxmox.

13. Next, select Add and then EFI Disk. Select your EFI Storage, uncheck pre-enroll keys, then select OK.

selecting where to add the disk.

14. Finally (for the hardware changes), select Edit on the BIOS and set it as OMVF (UEFI).

changing the BIOS setting to UEFI.

15. Select Options, then Edit the boot order.

editing the boot order in proxmox.

16. Uncheck ide2 and net0 and then check scsi0. Select OK to save these settings.

enabling the new disk and disabling everything else.

16. You can now start the virtual machine! It will take a little while to boot up the first time.

starting the VM.

17. Once it finishes booting, you can open the console window for the VM and view the IP address that was assigned or access Home Assistant by the Home Assistant URL. After connecting to the URL, you’ll have to finish setting up Home Assistant, but it will be ready to go afterward!

how to set up home assistant on proxmox - VM is installed properly and accessible by IP address.

Passing Through a USB Drive for Home Assistant

If you’re running Home Assistant on Proxmox, you might have a USB drive that you’d like Home Assistant to utilize. You can use the steps below to find and pass through the USB drive to the Home Assistant virtual machine. Please keep in mind that this is not mandatory.

1. The first step is to determine what USB device you’d like to pass through to Home Assistant on Proxmox. Open the Shell and run the command below to see all USB devices currently plugged into the Proxmox host.

lsusb
running the lsusb command in proxmox. how to pass through USB devices in Proxmox.

2. In my case, the USB device that I plugged in is abcd:1234 (take note of this ID). If you aren’t sure what ID your USB device is, you can unplug it, run the command above, then plug it in again and run the command again. That will allow you to see what was removed/re-added and then can use that ID.

3. There are two ways you can then add the USB device to a virtual machine. You can do so by using the Shell, or you can add it by using the GUI. We will look at both options below.

If you’d like to add a USB device to a Virtual Machine using the command-line interface, run the command below substituting the VM ID and the ID of the USB device we found above. If you are adding multiple USB devices, make sure you increment the USB number.

qm set [VM_ID] -usb0 host=[USB_ID]
lsusb output showing the plugged in USB.

4. If you’d rather use the GUI, select the Hardware section of the VM, then select Add and USB device.

proxmox gui adding a usb.

5. From there, you can select Use USB Vendor/Device ID and select the correct ID. Alternatively, you can choose a USB port to use, though you must keep in mind that this will be for the port and the port only.

This means that if you change the USB device that’s there, the new device will be added to the VM automatically.

selecting the USB ID in the Proxmox GUI.

6. That’s it! In the Home Assistant Virtual Machine, the USB device will be passed through and you’ll be able to use it!

Installing HACS – Home Assistant on Proxmox

If you’re running Home Assistant on Proxmox, HACS will unleash the true power of the device so that you can install various other packages through the Home Assistant Community Store.

I would strongly urge you to follow these steps to install HACS on Home Assistant.

Conclusion – Home Assistant Proxmox Setup Process

This tutorial looked at how to set up Home Assistant on Proxmox. The two options above will have the exact same end result, meaning that Home Assistant will be installed and you’ll be able to use the supervised version. However, the way that you go about them is entirely different. Depending on if you’re comfortable running scripts on your Proxmox server, that will probably determine if you’d like to use the first option.

Thanks for checking out the tutorial on how to set up Home Assistant on Proxmox. If you have any questions on how to set up Home Assistant on Proxmox, please leave them in the comments!