Home Assistant Core -- FreeNAS Community Plugin

My Quick Start for Home Assistant Core on FreeNAS 11.3


Home Assistant Core is now available as a FreeNAS Community Plugin

  • This will create an 11.3-RELEASE iocage-jail for Home Assistant Core
  • This will install Home Assistant Core using a python virtualenv

The FreeNAS Community Plugin provides these basic configuration files to help get started


NAME SERVICE VIRTUALENV PORT USER CONFIG DIR
Home Assistant Core homeassistant /srv/homeassistant 8123 hass /home/hass/homeassistant
Hass Configurator configurator /srv/configurator 3218 hass /home/hass/configurator
AppDaemon appdaemon /srv/appdaemon 5050 hass /home/hass/appdaemon
HA Dashboard appdaemon /srv/appdaemon ^^^^ hass /home/hass/appdaemon

Home Assistant Core is available from the Community Plugins page on FreeNAS 11.3

This FreeNAS plugin is intended to be a quick start to help get up and running.


At a minimum you only need to enter a name for this jail to enable the save button. I manage all of my device IP address from my router, so I leave DHCP checked and click save to begin the install. Grab a coffee or something. The jail takes about 5 minutes to install but Home Assistant Core will still need an additional 10-15 minutes for the initial startup.


You can also install this in a standard-jail

Use the standard-jail if you need to compile packages from the ports tree or if you need more advanced control over the FreeBSD system itself. With regards to Home Assistant Core and the other services running in virtualenvs, there should be no advantage to using a standard-jail.

The current release should work with FreeNAS 11.2-U7 or later

Click Here

Script Install

Click Here

  • The name of the jail will be JAIL_NAME
  • Change JAIL_NAME to a desired name

Make a pkglist and create a jail using it to install requirements

echo '{"pkgs":["autoconf","bash","ca_root_nss","git-lite","gmake","pkgconf","python37","py37-sqlite3"]}' > /tmp/pkglist.json
iocage create -r 11.3-RELEASE dhcp=on bpf=yes vnet=on boot=on allow_raw_sockets=1 -p /tmp/pkglist.json --name JAIL_NAME

Git script and begin install

iocage exec JAIL_NAME git clone -b 11.3-RELEASE https://github.com/tprelog/iocage-homeassistant.git /root/.iocage-homeassistant
iocage exec JAIL_NAME bash /root/.iocage-homeassistant/post_install.sh standard

Manual Install - Coming Soon

  • Steps to manually produce the same result as using the script install

After the Home Assistant Core jail has finished installing there will still be an additional 10-15 minutes before Home Assistant is reachable. It takes my FreeNAS about 15 min from the time I press install until I am able to login for the first time. This amount of time will vary depending on your FreeNAS setup and hardware. After the initial startup is complete, you will able to reach Home Assistant Core by pressing MANAGE. This will only show up under plugins if you actually install the plugin

The first time you connect to Home Assistant, you will need to complete the onboarding process. At the end of onboarding you will be given an opportunity to add any auto discovered integrations. I just skip this step for now. At this point, we are just interested in getting the Configurator, AppDaemon and HACS (Home Assistant Community Store) installed. Any of these extras are of course optional.


Installing other services

Click Here

You can install the extra services using the jails console or shell, its the same thing. Don’t worry, there are no commands to copy paste at this point. You can ssh if you want but I tried to make this all work from the browser. Back in FreeNAS, your Home Assistant Core plugin will show up under both, plugin and jails, it is still a jail after all. Enter the jails console by pressing SHELL

I have made a simple console menu to help with some common functions inside the jail. From the main console menu, number 2 will be the configurator. Use option 8 to install.

After the install has finished, use the given link to open the Configurator in a new browser tab. We’re gonna use it in the next steps to add the long lived access tokens to the configuration file(s). Leave the Configurator open and head back over the Home Assistant tab in your browser.

We’re gonna create two tokens at this point. One for the Configurator and one AppDaemon. Hopefully, this is where the included configuration starts to make things easy. You can create your your long lived access token from your profile page. Starting with by creating an access token for the Configurator and copy it to your clipboard.

Use the Configurator to add the token you just created to configurator/configurator.yaml.. Paste your access token to the second line where indicated. Be sure to save the file!

Next, if you plan to install appdaemon, you should set that up now as well. The configuration I included with AppDaemon is set up to share the Home Assistant secrets file to store it’s access token and location information. Go back to you Home Assistant profile page and create another long live access token for AppDaemon. Use the Configurator to add the token to homeassistant/secrets.yaml. While you there, you should also configure your correct location information as well. Make sure you save your changes!

We are done with the Configurator for now. You can close it’s browser tab and head back over to FreeNAS. From the Configurator service menu, select 3 to restart the configurator.

After the Configurator restarts, press 1 to return to the main menu, then press 3 to enter the AppDaemon service menu. Use option 8 to install


But wait! There’s one last thing before you restart Home Assistant. Installing HACS. There’s no service menu since HACS is a custom integration. This is just a little shortcut I added to download the latest HACS release and extract it to homeassistant/custom_components/hacs. This is the most advanced step, it is the only command that requires typing… Are you ready?

At the main console menu of the jail, type install hacs and press enter.

Finally head into the Home Assistant Core service menu and select 3 to restart Home Assistant. Notice here that option 8 is check_config. The service will also check_config automatically before restarting Home Assistant. The first time check_config used, you may see an additional package or two get installed. This is normal and only happens the first time.

After you restart Home Assistant you should have links to the Configurator and AppDamon added to the side panel. There are simply iframes that have been enabled in:
homeassistant/packages/freenas_plugin.yaml

At this point, it’s all yours! Head to the integrations to finish add HACS!



Using a USB Z-Wave or Zigbee controller

To directly access USB devices like the Aeotec Gen-5 USB Stick, Nortek HUSZB-1 or similar USB controllers inside an iocage-jail, you will need to use a custom devfs_ruleset. Before a jail can use the custom devfs_ruleset, it must first be created on the FreeNAS host.


My FreeNAS Community plugins
Click Here

Most of these are available on the community plugin page in FreeNAS

  • ESPHome
  • Gogs
  • Home Assistant Core
  • Node-RED
  • Mosquitto (MQTT Broker)
  • TasmoAdmin

The current artifact files for this plugin can be found HERE
All of my FreeNAS plugin manifests can be found HERE





Thanks for stopping by!

The FreeNAS plugin is only a quick start to get things up and running
Further configuration will likely be required to meet your specific needs

1 Like

Troy, your work is amazing for the Freenas-User-Community. I’ve been following your installation guides since version 11 (your initial post from 2017) and you’ve been a great (!) help! Keep on this fabulous work, please! Thank you!

1 Like