My HomeAssistant install was up and running, but I was not happy with it. Errors and warnings in the logs, filesystem layout not aligning with standard FreeBSD practice. So I decided to fix this stuff.

Another follow-up on HomeAssistant. this stuff isn't done yet! Series:
This blog-post focusses on keeping HomeAssistant update from PyPI on FreeBSD. Goal is to have a HomeAssistant install that does not need internet access at all.
"Stuff" runs in FreeBSD jails on my machines.
Starting point
See the earlier articles. Originally I built HomeAssistant in a jail where it has full internet access.
That has got to change! This is "Local Only" (accessible via internet with extra auth or using VPN).
Before, I would run pip install --upgrade homeassistant in the jail itself, but I find that a bit wonky with the "HomeAssistant builds packages for you" secondary phase at startup.
NOTE: The May updates failed completely due to a problem with the orjson package.
HomeAssistant build container
Created another jail for HomeAssistant. Created the user. Allowed access to the internet.
From here on, there's subtle changes.
Install required packages
Finding out (again) what needs to be installed for everything to build/install proper.
pkg install \
git-lite \
python314 \
py314-sqlite3 \
rust \
pkgconf \
cmake \
googletest \
jpeg-turbo libjpeg-turbo
Create and activate a virtual environment
mkdir /usr/local
python3.14 -m venv hass
cd hass
. bin/activate
The installation is a two-phase thing. First you pip install, then you start HomeAssistant and it will start building more Python packages.
This includes binary packages like cryptography, uv that take some time to build.
As these packages have their own build requirements, we need things like Cmake.
Building
In our homeassistant builder jail:
pip install homeassistant
Once installed, start homeassistant to make it build the additional packages it needs.
$ bin/hass --ignore-os-check
…
2026-06-22 15:43:43.853 ERROR (SyncWorker_3) [aiodhcpwatcher] Cannot watch for dhcp packets: No /dev/bpf handle is available !
Takes quite some time to get through the startup as it will start building things. Monitor the output, stop the program once it's finished. The ffmpeg error can be fixed or ignored, depending on what you want to run. On FreeBSD use [Ctrl-T], or monitor CPU usage.
Installing
NOTE this method works because I've moved the config-dir, database, logs to the appropriate locations /usr/local/etc/hass, /var/db/hass, /var/logs/hass.
On the host, copy the generated stuff to the destination:
openrsync -av --del /jails/hassbuild/usr/local/hass/ /jails/hass/usr/local/hass
This will overwrite out the virtual environment on the target, so be careful!
If you've used the same path inside the builder jail, this was working fine.
In other cases, you will have to update the files in the virtual-env bin in the hass jail.
# Example for moving a venv.
OLDDIR=/usr/local/homeassistant/.venv
NEWDIR=/usr/local/hass
sed -i '' -E "s|${OLDDIR}|${NEWDIR}|" pyvenv.cfg
sed -i '' -E "s|${OLDDIR}|${NEWDIR}|" $(grep -l bin/${OLDDIR})
First startup
In the hass jail
service hass start
Monitoring the startup log (/var/log/hass/homeassistant.log) shows that a couple things are missing
paho-mqttgoodwe
The paho and Goodwe pip modules are missing, these are normally installed when activating the integration. As we have an empty install (without integrations), they where not part of the virtual-env.
In the builder jail, add the modules:
pip install paho-mqtt goodwe==0.4.10
And then re-run the openrsync command to add the new modules to the destination.
service hass restart
Result
No more errors, apart from bpf for DHCP and outbound connections to home-assistant.
2026-06-22 15:43:43.853 ERROR (SyncWorker_3) [aiodhcpwatcher] Cannot watch for dhcp packets: No /dev/bpf handle is available !
Error requesting homeassistant_alerts data: Cannot connect to host alerts.home-assistant.io:443
No more outbound connections! Done!
Stop and deactivate the builder jail for later use. Or wipe it out and redo when updating. I reckon the second method works better for the montly updates, for patch updates you can reuse the jail.
ezjail-admin stop hassbuild
ezjail-admin config -r norun hassbuild
Verify in HomeAssistant Web UI via settings / about
| Installation method | Home Assistant Core |
| Core | 2026.6.3 |
| Frontend | 20260527.6 |
Upgrading
So I used the opportunity to enable/start the builder jail, and update HomeAssistant!
ezjail-admin config -r run hassbuild
ezjail-admin start hassbuild
jexec hassbuild
cd /usr/local/hass
. bin/activate
pip install --upgrade homeassistant
bin/hass --ignore-os-check
# monitor log
# Stop hass [Ctrl-C]
# Leave jail [Ctrl-D]
openrsync -av --del /jails/hassbuild/usr/local/hass/ /jails/hass/usr/local/hass
# loads of updated files for homeassistant and frontend modules
jexec hass service hass restart
| Installation method | Home Assistant Core |
| Core | 2026.6.4 |
| Frontend | 20260527.6 |
