diff --git a/DOCKER.md b/DOCKER.md index 91cbf16..7e158fc 100644 --- a/DOCKER.md +++ b/DOCKER.md @@ -67,6 +67,88 @@ Services: - go2rtc: http://localhost:1984 - Frigate: http://localhost:5000 +## Podman + +Strix uses raw sockets for network scanning. Podman drops these capabilities by default, +so you need to add them explicitly. Rootless mode does not support host network scanning — +run with `sudo`. + +### Using Podman Run + +```bash +sudo podman run -d \ + --name strix \ + --network host \ + --cap-add=NET_RAW \ + --cap-add=NET_ADMIN \ + --restart unless-stopped \ + eduard256/strix:latest +``` + +- `NET_RAW` — required for network scanning (ARP, ICMP) to discover cameras +- `NET_ADMIN` — required for network interface and routing operations + +### Using Podman Compose + +```yaml +version: '3' + +services: + strix: + image: eduard256/strix:latest + container_name: strix + restart: unless-stopped + network_mode: host + cap_add: + - NET_RAW + - NET_ADMIN + environment: + - STRIX_LOG_LEVEL=info + - STRIX_LOG_FORMAT=json + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:4567/api/v1/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 10s +``` + +```bash +sudo podman-compose up -d +``` + +### Using Quadlet (systemd) + +Recommended for production. Create `/etc/containers/systemd/strix.container`: + +```ini +[Unit] +Description=Strix Camera Stream Discovery +After=network-online.target +Wants=network-online.target + +[Container] +Image=docker.io/eduard256/strix:latest +ContainerName=strix +Network=host +AddCapability=CAP_NET_RAW CAP_NET_ADMIN +Environment=STRIX_LOG_LEVEL=info +Environment=STRIX_LOG_FORMAT=json +AutoUpdate=registry + +[Install] +WantedBy=multi-user.target +``` + +```bash +sudo systemctl daemon-reload +sudo systemctl enable --now strix +sudo systemctl status strix +``` + +Quadlet auto-generates a systemd service from the `.container` file. +The container starts on boot and restarts on failure automatically. + ## Building Locally ```bash diff --git a/README.md b/README.md index 550ece2..18b9510 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,14 @@ Open **http://YOUR_SERVER_IP:4567** sudo apt update && command -v docker >/dev/null 2>&1 || curl -fsSL https://get.docker.com | sudo sh && command -v docker-compose >/dev/null 2>&1 || { sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose; } && curl -fsSL https://raw.githubusercontent.com/eduard256/Strix/main/docker-compose.yml -o docker-compose.yml && docker-compose up -d ``` +### Podman + +```bash +sudo podman run -d --name strix --network host --cap-add=NET_RAW --cap-add=NET_ADMIN --restart unless-stopped eduard256/strix:latest +``` + +Strix uses network scanning to discover cameras. Podman blocks this by default, so `NET_RAW` and `NET_ADMIN` capabilities are required. Must run as root (`sudo`). See [DOCKER.md](DOCKER.md) for Podman Compose and Quadlet (systemd) setup. + ### Home Assistant Add-on **Installation:**