- Download Tiny PXE Server for Windows
- Check
ProxyDHCP
setting and verify the DHCP server is on the appropriate network interface (if you have multiple) - Update the Boot File filename field to ipxe-x86_64.efi
- Download the latest Clear Linux PXE release and put it in the Tiny PXE Server files directory. I used the
files/iso
folder$ cd pxeserv/files/iso $ curl -o /tmp/clear-pxe.tar.xz \ https://download.clearlinux.org/current/clear-$(curl \ https://download.clearlinux.org/latest)-pxe.tar.xz $ tar -xJf /tmp/clear-pxe.tar.xz -C .
- Edit
menu.ipxe
to include the following menu option. You may need to update the kernel version number. Since I was running from Windows, creating a symlink was troublesome. Just pointing to the fresh kernel did the trick though.item clos_netboot Clear Linux OS (Netboot) :clos_netboot kernel ${boot-url}/iso/org.clearlinux.native.5.3.11-868 \ init=/usr/lib/systemd/systemd-bootchart initcall_debug tsc=reliable \ no_timer_check noreplace-smp root=mmcblk0 rw initrd=initrd initrd ${boot-url}/iso/initrd boot || goto failed goto start
- Click the button to set the server
Online
in Tiny PXE - Connect the Atomic Pi to an HDMI monitor (or TV), a keyboard, your LAN, and a suitable power supply.
- The Atomic Pi will boot into the iPXE menu, navigate and select your new
Clear Linux OS (Netboot)
menu option. - When the installer comes up, select to install to
mmcblk0
, add an admin user account, and any other configuration you want. - Let the installer run and reboot when complete
- On your PC you can now ssh into the Atomic Pi using the account you created in the installer.
- Install the Docker bundle
sudo swupd bundle-add containers-base
- (Optional) Configure Docker to expose the management port
- Generate self-signed certs
- Copy the CA and server certificates to
/etc/docker/certs
- Modify the dockerd systemd configuration
- Add this file
/etc/systemd/system/docker.service.d/tls-exec.conf
[Service] ExecStart= ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376 --tlsverify --tlscacert=/etc/docker/certs/ca.pem --tlskey=/etc/docker/certs/server-key.pem --tlscert=/etc/docker/certs/server-cert.pem
- Reload the daemon
sudo systemctl daemon-reload
- Add this file
- Start docker
sudo systemctl enable docker.service
sudo systemctl start docker.service
- Pull the Home Assistant docker image
docker pull homeassistant/home-assistant:latest
- Create a folder on the host to store configuration data
sudo mkdir -p /srv/hass/config
- Start Home Assistant in docker
docker run --init -d --name="home-assistant" -v /srv/hass/config:/config -v /etc/localtime:/etc/localtime:ro -p 8123:8123/tcp
- If you have a hardware device (like a USB Z-Wave gateway) add
--device=/dev/ttyACM0
to the docker run command above
- Automatically update the Home-Assistant docker image using Watchtower. Start the Watchtower instance using the command below
docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock v2tec/watchtower home-assistant
Because I am using NGINX as a reverse proxy managing exteral access, I only am using self-signed certs on my internal network. If you want to forward a port from your router to the Home Assistant server directly, follow the TLS/SSL via Let's Encrypt guide in the Home Assistant documentation.
- Use self-signed certs to secure the local connection to Home Assistant. Generate self-signed certs using the command below on the Atomic-Pi
openssl req -sha256 -newkey rsa:4096 -nodes -keyout privkey.pem -x509 -days 730 -out fullchain.pem
- Copy the certificate and key to the Home Assistant config directory
sudo mkdir -p /srv/hass/config/certs
sudo cp privkey.pem /srv/hass/config/certs/
sudo cp fullchain.pem /srv/hass/config/certs/
- Add the SSL certs to the Home Assistant configuration in
/srv/hass/config/configuration.yaml
. Note the paths in this file will be relative to the mapped volumes in the docker container (i.e./config/
instead of the host's/srv/hass/config/
)http: ssl_certificate: /config/certs/fullchain.pem ssl_key: /config/certs/privkey.pem
- Restart Home Assistant
You are now ready to setup the Home Assistant configuration as you like!