Dan Čermák
Dan Čermák
Software Developer @SUSE | |
i3 SIG, Package maintainer | |
Developer Tools, Testing and Documentation, Home Automation | |
https://dancermak.name | |
dcermak / D4N | |
@DefolosDC | |
@Defolos@mastodon.social |
Why should I use Home Assistant?
Do I need a Pi 4 for HA?
No
-CHECKSUM
from getfedora.orgdnf install gnupg2 arm-image-installer
curl -O https://getfedora.org/static/fedora.gpg
gpgv --keyring ./fedora.gpg *-CHECKSUM
sha256sum -c *-CHECKSUM
/dev/
entry via udiskctl
, lsblk
or fdisk -l
$ arm-image-installer --image=Fedora-IoT-[version].raw.xz \
--target=rpi4 --media=/dev/XXX \
--addkey=/path/to/pubkey \
--resizefs
$ mkdir /path/to/conf/dir
$ podman run -d -v /path/to/conf/dir:/config:Z \
-v /etc/localtime:/etc/localtime:ro \
--privileged --network=host \
--name=homeassistant \
ghcr.io/home-assistant/home-assistant:stable
Visit http://rpi_ip:8123 and follow onboarding
THE END
$ podman generate systemd --new homeassistant > \
/etc/systemd/system/homeassistant.service
$ podman stop homeassistant
$ systemctl daemon-reload
$ systemctl enable --now homeassistant
--label "io.containers.autoupdate=registry"
podman auto-update
systemctl enable --now podman-auto-update.timer
$ podman secret create fullchain_pem /path/to/fullchain.pem
$ podman secret create privkey_pem /path/to/privkey.pem
--secret fullchain_pem --secret privkey_pem
configuration.yaml
:http:
ssl_certificate: /run/secrets/fullchain_pem
ssl_key: /run/secrets/privkey_pem
server_port: 443
rpm-ostree install wireguard-tools
cd /etc/wireguard
umask 077
wg genkey | tee privatekey | wg pubkey > publickey
/etc/wireguard/wg0.conf
:
[Interface]
Address = 10.200.200.1/24
ListenPort = 51820
PrivateKey = # insert private key here
# optional
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
PublicKey = # insert pubkey of peer
AllowedIPs = 10.200.200.N/32
/etc/wireguard/wg0.conf
:
[Interface]
PrivateKey = # insert private key here
Address = 10.200.200.N/24
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o wlp59s0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o wlp59s0 -j MASQUERADE
ListenPort = 51820
[Peer]
PublicKey = # pubkey of server
Endpoint = # IP of the server
AllowedIPs = 10.200.200.0/24
PersistentKeepalive = 25
systemctl enable --now wg-quick@wg0
rpm-ostree
auto-updatesD4N/nest2022
Answers!