Homelab Installation

Home Assistant : How to set up your server on Proxmox

This post will help you install Home Assistant (or Hass.io) on a server running Proxmox 7.0. This has been tested on my own Proxmox system (a custom AMD build with 32GB RAM) and should work on any x86/64 bit machine.

All installation images are supplied directly from Home Assistant (they have got better at creating these recently) and this should be considered medium difficulty, with some terminal and linux work required.

💡 As with any tutorial – I’d recommend you understand each line as you run it – just blindly running these commands could get you in trouble if you already have a VM with the same ID setup or your setup is different from mine.

For the benefit of this guide – I am assuming you have already setup Proxmox on your server – if not – follow the getting started guide on the Proxmox site here.

If you would rather keep things simple – you can choose to install Home Assistant directly on to a raspberry pi (the default installation method), however I found I would often hit SD card corruption after around 1-2 years due to the amount of disk writes my smart home would produce, causing significant problems with our automations.

By moving to a Proxmox install, I can manage and backup the installation – ensuring its easily monitored and restored if required.

What is Home Assistant?

Home Assistant is one of a few open source projects aimed at bringing together multiple smart home technologies and ecosystems into one cohesive UI and interface. If you’re just getting started in the smart home space – this is the application to install.

Setting up Home Assistant on Proxmox 7.0

  1. Download the disk image to Proxmox. Firstly we’ll need to download the disk image to our Promox server. To achieve this open a shell (you can use SSH if you would prefer) by clicking on your Proxmox server in the left hand pain, and selecting “shell” in the top right. Head to the Home Assistant “alerternative” install link here and copy the link to the KVM/Proxmox, which should be in the format “.qcow2”. In the Proxmox shell, navigate to the pve “images” folder by going cd /var/lib/vz/images Then download the latest VM image using wget by running wget <https://github.com/home-assistant/operating-system/releases/download/6.5/haos_ova-6.5.qcow2.xz> (link is correct at time of writing) Once downloaded the image will then require extracting using xz xz -d hasos_ova-6.5.qcow2.xz
  2. Setup the VM in Proxmox Next, we want to setup the Virtual Machine in Proxmox. Create a new VM (as usual) setting.
    • VMID – I set my VM ID’s to be the same as the last part of the IP address I assign (so in this case 10200 for 192.168.10.200). In your setup this can be anything you would like.
    • Name – Set this to “Home-Assistant”
    • Media – Deselect any media options (we won’t be installing from an ISO) and ensure the Linux and “5.x – 2.6 Kernel” is selected.
    • System – Ensure you set the bios to “OVMF (UEFI)” otherwise the system, wont boot, I also set the machine to “q35” – but this is a personal preference. Make sure you de-select “Pre-Enrolled Keys” or you’ll fail to boot!. Leave other options at default.
    • Disk – Leave this as is – we’ll be replacing this shortly, but take note of the storage “name” you would like this to run on for step 3.
    • CPU – Select at least 2 cores
    • RAM – Leave this at 2048 (2Gb)
    • Network – Ensure “VirtIO” is selected, and set any VLAN tags you may need.
  3. Import the Disk Finally, we’ll want to import the correct disk into the VM, for me this was qm importdisk 10200 /var/lib/vz/images/haos_ova-6.5.qcow2 local-lvm Once this is complete, you’ll see a new “unused disk” in the Proxmox GUI. Remove the original Hard Disk (first by detatching, then removing) and “Add” the new unused disk.
  4. Boot up! Finally, its time to boot our new machine. Check the boot order is set to scsi0 first (otherwise the bios will attempt to boot off the network) and start the machine.

Leave a Reply

Your email address will not be published. Required fields are marked *