Home Assistant
Deployment rootful
1. Prepare the host
Prerequisites once as root
Install Podman (needs podman 4.3 or newer; Ubuntu 22.04 ships 3.4 and is too old, use 24.04)
apt update && apt install -y podman
2. Choose a format and deploy
The same pod in four forms. Pick one and follow only its steps.
Each tab says which podman it needs. Check yours with podman --version:
Debian 12 ships 4.3, Ubuntu 24.04 4.9, Debian 13 5.4, Fedora 5.8, Arch 6.x.
Kubernetes YAML for podman kube play, started by systemd through a Quadlet .kube unit (podman 4.4+; older podman like Debian 12 uses podman-kube@, see the version check below).
Kubernetes YAML
apiVersion: v1
kind: Pod
metadata:
name: homeassistant
labels:
app: homeassistant
spec:
restartPolicy: Always
containers:
- name: homeassistant
image: ghcr.io/home-assistant/home-assistant:stable
env:
- name: TZ
value: Europe/Vienna
volumeMounts:
- name: vol-0
mountPath: /config
hostNetwork: true
volumes:
- name: vol-0
persistentVolumeClaim:
claimName: homeassistant-config
Save the YAML file
sudo mkdir -p /etc/containers/ sudo nano /etc/containers/homeassistant.yaml
Test the pod (without systemd)
sudo podman kube play /etc/containers/homeassistant.yaml # Status: sudo podman pod ps && sudo podman ps # Stop: sudo podman kube down /etc/containers/homeassistant.yaml
Check your podman version
podman --version
4.4 or newer: continue with step 3 below.
Older, e.g. 4.3 on Debian 12? There is no Quadlet yet: use podman's own podman-kube@ service instead of steps 3–5
sudo systemctl enable --now podman-kube@$(systemd-escape /etc/containers/homeassistant.yaml).service # Status & logs: sudo systemctl status podman-kube@$(systemd-escape /etc/containers/homeassistant.yaml).service sudo journalctl -u podman-kube@$(systemd-escape /etc/containers/homeassistant.yaml).service -f
The day-to-day commands below have a block for this service.
Create Quadlet .kube file (systemd)
[Unit] Description=homeassistant pod After=network-online.target Wants=network-online.target [Kube] Yaml=/etc/containers/homeassistant.yaml [Service] Restart=always [Install] WantedBy=multi-user.target
Save to /etc/containers/systemd/:
sudo mkdir -p /etc/containers/systemd/ sudo nano /etc/containers/systemd/homeassistant.kube
Start systemd service (rootful)
sudo systemctl daemon-reload sudo systemctl start homeassistant.service
Status & Logs
sudo systemctl status homeassistant.service sudo journalctl -u homeassistant.service -f sudo podman pod ps sudo podman ps
Enable automatic image updates optional
Requires AutoUpdate=registry in the .kube file. Podman checks for new images and restarts the pod automatically:
sudo systemctl enable --now podman-auto-update.timer # Check status: sudo systemctl status podman-auto-update.timer # Trigger manually: sudo podman auto-update
- Containers run as root — only use trusted images
- Ports < 1024 can be bound directly
- No
loginctl enable-lingerneeded — systemd manages the service - Quadlet path:
/etc/containers/systemd/(not~/.config/)
Day-to-day logs, restart, update, remove (click to open)
Logs & shell into a container
sudo podman logs -f homeassistant-homeassistant sudo podman exec -it homeassistant-homeassistant /bin/sh
Restart
sudo systemctl restart homeassistant.service
Update an image by hand
Pull the new version, the restart recreates the containers from it:
sudo podman pull <image>:<tag> sudo systemctl restart homeassistant.service
Stop & remove
Stop through systemd, otherwise Restart=always brings the pod back. To remove it for good, delete the unit files and reload:
sudo systemctl stop homeassistant.service sudo rm /etc/containers/systemd/homeassistant.kube sudo systemctl daemon-reload
podman older than 4.4 (podman-kube@ from step 3)
sudo systemctl restart podman-kube@$(systemd-escape /etc/containers/homeassistant.yaml).service # Update an image: pull, then restart as above sudo podman pull <image>:<tag> # Stop and remove from autostart: sudo systemctl disable --now podman-kube@$(systemd-escape /etc/containers/homeassistant.yaml).service
Delete the data — permanent, only after stop & remove
sudo podman volume rm homeassistant-config
Native systemd units without the Kubernetes YAML: one .pod plus one .container per container.
Each container becomes its own systemd service (restart, logs and ordering per container).
Needs podman 5.0 or newer — Debian 12 ships 4.3, use the Kube YAML tab there.
Save the unit files
[Unit] Description=homeassistant pod [Pod] PodName=homeassistant Network=host
[Unit] Description=homeassistant-homeassistant container [Container] Image=ghcr.io/home-assistant/home-assistant:stable Pod=homeassistant.pod ContainerName=homeassistant-homeassistant Environment=TZ=Europe/Vienna Volume=homeassistant-config:/config:Z [Service] Restart=always [Install] WantedBy=multi-user.target
Save all of them to /etc/containers/systemd/:
sudo mkdir -p /etc/containers/systemd/ sudo nano /etc/containers/systemd/homeassistant.pod sudo nano /etc/containers/systemd/homeassistant-homeassistant.container
Start the pod
The pod service pulls in every container service. Autostart at boot comes from the [Install] section of the units, no enable needed.
sudo systemctl daemon-reload sudo systemctl start homeassistant-pod.service
Status & Logs
sudo systemctl status homeassistant-pod.service sudo journalctl -u homeassistant-homeassistant.service -f sudo podman pod ps && sudo podman ps
Day-to-day logs, restart, update, remove (click to open)
Logs & shell into a container
sudo podman logs -f homeassistant-homeassistant sudo podman exec -it homeassistant-homeassistant /bin/sh
Restart
sudo systemctl restart homeassistant-pod.service
Update an image by hand
Pull the new version, the restart recreates the containers from it:
sudo podman pull <image>:<tag> sudo systemctl restart homeassistant-pod.service
Stop & remove
Stop through systemd, otherwise Restart=always brings the pod back. To remove it for good, delete the unit files and reload:
sudo systemctl stop homeassistant-pod.service sudo rm /etc/containers/systemd/homeassistant.pod sudo rm /etc/containers/systemd/homeassistant-homeassistant.container sudo systemctl daemon-reload
Delete the data — permanent, only after stop & remove
sudo podman volume rm homeassistant-config
A docker-compose.yml for podman-compose. Handy if you already work with Compose; there are no per-container systemd services.
Install podman-compose as root
apt install -y podman-compose
Save the compose file
services:
homeassistant:
image: ghcr.io/home-assistant/home-assistant:stable
restart: always
environment:
- TZ=Europe/Vienna
network_mode: host
volumes:
- homeassistant-config:/config:Z
volumes:
homeassistant-config: null
sudo mkdir -p /opt/homeassistant sudo nano /opt/homeassistant/docker-compose.yml
Start, status & logs
cd /opt/homeassistant sudo podman-compose up -d sudo podman-compose ps sudo podman-compose logs -f # Stop: sudo podman-compose down
Start after reboot
podman-restart.service starts every container with restart: always at boot:
sudo systemctl enable podman-restart.service
Update images
cd /opt/homeassistant sudo podman-compose pull sudo podman-compose up -d
Day-to-day logs, restart, update, remove (click to open)
Logs & shell into a container
sudo podman logs -f homeassistant_homeassistant_1 sudo podman exec -it homeassistant_homeassistant_1 /bin/sh
Restart
cd /opt/homeassistant sudo podman-compose restart
Stop & remove
cd /opt/homeassistant sudo podman-compose down
Delete the data — permanent, only after stop & remove
sudo podman volume rm homeassistant_homeassistant-config
Plain podman pod create / podman create commands. Good for a quick test or to see what happens under the hood.
Save the script
#!/bin/bash set -e # ── Create named volumes ─────────────────────────────────────────── # Named volumes are created automatically — no UID/GID permission adjustment needed. sudo podman volume exists homeassistant-config || sudo podman volume create homeassistant-config # ── Create pod ───────────────────────────────────────────────────── sudo podman pod create \ --name homeassistant \ --network host # ── Container: homeassistant-homeassistant ───────────────────────────────────────────── sudo podman create \ --pod homeassistant \ --name homeassistant-homeassistant \ --restart always \ -e TZ='Europe/Vienna' \ -v homeassistant-config:/config:Z \ ghcr.io/home-assistant/home-assistant:stable # ── Start pod ────────────────────────────────────────────────────── sudo podman pod start homeassistant # ── Stop & clean up ─────────────────────────────────────────────── # sudo podman pod stop homeassistant # sudo podman pod rm homeassistant
nano homeassistant.sh
Run it, status & logs
bash homeassistant.sh sudo podman pod ps && sudo podman ps sudo podman logs -f <container-name>
Start after reboot
podman-restart.service starts every container with --restart always at boot:
podman 6.1 does not bring rootful pods created by hand back after a reboot (the infra container fails with stale file handle, and the failing podman-restart.service then stops the other containers it started). If the pod must survive reboots, use the Kube YAML or Quadlet tab.
sudo systemctl enable podman-restart.service
Remove or rebuild
The script creates the pod once. To apply changes or new images, remove the pod and run the script again (named volumes stay):
sudo podman pod rm -f homeassistant bash homeassistant.sh
Day-to-day logs, restart, update, remove (click to open)
Logs & shell into a container
sudo podman logs -f homeassistant-homeassistant sudo podman exec -it homeassistant-homeassistant /bin/sh
Restart
sudo podman pod stop homeassistant sudo podman pod start homeassistant
Stop & remove
sudo podman pod rm -f homeassistant
Delete the data — permanent, only after stop & remove
sudo podman volume rm homeassistant-config
Ports < 1024 (e.g. 80, 443)
Rootless cannot open privileged ports. Solution:
sysctl net.ipv4.ip_unprivileged_port_start=80
Make persistent in /etc/sysctl.d/99-podman.conf.
Containers communicate via localhost
All containers in the pod share the same network namespace. Always use localhost, not container names.
# Correct (e.g. app → db): localhost:5432 # Wrong (doesn't work in a pod): db-container:5432
List open ports
Which ports are the running containers publishing? See the PORTS column:
podman ps
Custom DNS for the pod
Set a custom DNS server (e.g. local Pi-hole) in the generator under DNS server. Every format picks it up.
Set volume ownership
Fix permission errors by adjusting UID/GID in the user namespace:
podman unshare chown 1000:1000 /path/to/volume
SELinux volume labels
On SELinux systems (RHEL, Fedora) set the volume suffix:
/host/path:/container/path:Z # private /host/path:/container/path:z # shared
List all volumes
podman volume ls podman volume inspect <volume-name>
Volume backup
Back up data from a named volume:
podman run --rm \ -v <volume-name>:/data:ro \ -v $(pwd):/backup \ busybox tar czf /backup/backup.tar.gz /data
Cleanup
Remove unused images, containers and volumes:
podman system prune -f # containers + images podman image prune -f # untagged images only podman volume prune -f # unused volumes
Check for outdated images
List local images; auto-update only covers units with AutoUpdate= (Kube and Quadlet tabs):
podman images podman auto-update --dry-run
All containers, including stopped ones
podman pod ps podman ps -a
Resource usage
podman stats --no-stream