Migrating Home Assistant from a Raspberry Pi to a Mini PC

Notes from moving a long-running Home Assistant installation from an aging Raspberry Pi 4B to a dedicated mini PC.

Why I Moved

I had been running Home Assistant on a Raspberry Pi 4B with 8 GB of RAM since 2020. Its load was consistently above 1, and it would freeze once every week or two.

I assumed the cause was either aging hardware or the increasing weight of Home Assistant after repeated version upgrades, so I decided to move the installation to an unused mini PC.

The mini PC had previously been used with Windows 11, but I rarely used it. I formatted it and decided to dedicate it to Home Assistant.

  • Processor: AMD Ryzen 5 7530U with Radeon Graphics, 2.00 GHz
  • Installed RAM: 16.0 GB (15.4 GB usable)
  • System type: 64-bit operating system, x64-based processor
  • No pen or touch input available for the display

Creating and Downloading a Backup

In Home Assistant, I went to Settings → System → Backups and selected Backup Now in the lower-right corner. Pressing Next and then Recommended starts the backup process.

This part was unintuitive to me. I initially wondered whether I was setting up scheduled backups, but continuing through the prompts created the backup.

Because the installation contained five years of data, creating the backup took about 20 minutes. The file was 12 GB.

I then opened the three-dot menu for the backup in the list and selected Download, saving it to a separate computer. With a large file, using a wired connection on the local network is faster. This was the file I later used for restoration.

Installing Proxmox on the Mini PC

I referred to a post by Sanyosuyo: https://cafe.naver.com/koreassistant/16222

Proxmox is a system that lets one PC run multiple virtual machines. If resources remain available, it can also run other things, such as a Python script for automated cryptocurrency trading.

I configured the FQDN as minipc.local for no particular reason.

The referenced process ran shell scripts twice. My installed Proxmox version was 8.4, while the scripts only specified versions 8.0 through 8.2, causing a version-mismatch error. I downloaded the shell script locally and edited it with nano. Specifically, I changed the regular-expression section that checked pveversion and matched 8\.[0-2] so that it used [0-9] instead. I saved it, gave the script execute permission with chmod +x filename.sh, and ran it again. Installation then completed.

Network and Virtual Machine Settings

I recommend allowing the Proxmox host IP address to be assigned automatically through DHCP. This is separate from the Home Assistant server IP address.

When creating the virtual machine, a MAC address is generated. Entering that MAC address into the router’s DHCP settings allows the VM to be assigned the same IP address that the Raspberry Pi previously used.

It is also worth allocating generous RAM and disk space to the VM. The default was 4 GB of RAM and 32 GB of disk space; I assigned 8 GB and 200 GB. Disk capacity can be increased through Hardware → Disk → Action.

I did not realize that the disk had been automatically set to 32 GB, and I encountered an error while restoring the backup. I changed the setting afterward. Once decompressed for restoration, the backup required roughly 2.5 times its backup-file size.

Passing the Zigbee Coordinator Through to the VM

Connecting the Zigbee coordinator by USB connects it to the Proxmox host, so it must then be passed through to the VM.

On the Proxmox host, I used the lsusb command to identify the coordinator’s Device ID. I then went to Hardware → Add → USB Device → Use Device ID and selected the entry corresponding to that ID.

This passes the USB device attached to the host through to the VM. After rebooting the VM once, it was recognized.

Installing Home Assistant and Restoring the Backup

Installation felt much faster than it had on the Raspberry Pi. I remember the Pi taking 20 to 30 minutes, while this installation felt as though it took less than 10 minutes.

I would first do a fresh installation. Do not use the “upload backup” method during initial setup. Since the backup will overwrite everything anyway, the initial configuration can be rough.

After setup, I went to Settings → System → Backups, opened the three-dot menu in the upper-right corner, and selected Upload backup. I cannot believe that option is hidden there.

After uploading, “1 manual backup” appeared. Opening the list and clicking the filename allowed me to choose which backup items to restore. I selected everything and ran the restoration.

It seemed to take around 30 minutes. Afterward, I updated Home Assistant Core, add-ons, HACS, and other components, and everything was noticeably faster. The Zigbee devices were also recognized immediately without any special configuration, which was the most surprising part.

Afterward

The CPU performance difference makes the system extremely responsive. Everything is fast.

When the mini PC was running Windows, its fan would occasionally spin up and become noisy. Now the load stays around 0.01, so the fan has no reason to run. It is very quiet.

This migration took me six hours of trial and error. I am not confident that I could finish it in under an hour next time. In five years, I will have forgotten it all—and I will be older too.

Maintaining the status quo is not a matter of doing nothing; it is achieved through strenuous effort.