<?xml version="1.0"?>
<!--
  Unraid Docker template for OpenPXE.

  Drop this file into /boot/config/plugins/dockerMan/templates-user/
  on your Unraid box (or import via the Docker tab → "Add Container" →
  "Template Repositories" if you publish it on a Gitea raw URL).

  IMPORTANT: OpenPXE needs host networking for DHCP/TFTP raw broadcasts.
  Bridge mode will NOT work — clients can't see broadcast DHCP from a
  bridged container. The template forces NetworkType=host below.

  Required ports (already host-bound by the binary; no Unraid mapping
  needed in host mode):
    udp/67    DHCP proxy
    udp/69    TFTP
    udp/4011  PXE Boot Server
    tcp/80    HTTP (web UI + iPXE scripts + ISO range streaming)
    tcp/445   SMB (only when Windows boot is toggled on)

  Web UI: http://<unraid-ip>/  (port 80)
-->
<Container version="2">
  <Name>OpenPXE</Name>
  <Repository>gitea.milesward.dev/mward4/openpxe:latest</Repository>
  <Registry>https://gitea.milesward.dev/mward4/-/packages/container/openpxe</Registry>
  <Network>host</Network>
  <MyIP/>
  <Shell>sh</Shell>
  <Privileged>false</Privileged>
  <Support>https://gitea.milesward.dev/mward4/OpenPXE/issues</Support>
  <Project>https://gitea.milesward.dev/mward4/OpenPXE</Project>
  <Overview>
    Air-gapped network PXE boot server. Container-native Rust
    implementation — DHCP proxy + TFTP + iPXE chainload + HTTP ISO
    streaming, all in one process. Web UI for ISO upload, NFS share
    mounting, and Queued Deployment for coordinated launch of one ISO
    across many waiting clients.

    NEVER touches the client OS trust store: no test-signed drivers,
    no testsigning toggle, no httpdisk.sys. Windows boot uses vanilla
    Microsoft-signed WinPE + SMB share.
  </Overview>
  <Category>Network:Other Network:Management</Category>
  <WebUI>http://[IP]/</WebUI>
  <TemplateURL/>
  <Icon>https://gitea.milesward.dev/mward4/OpenPXE/raw/branch/main/crates/webui/src/logo.svg</Icon>
  <ExtraParams>--cap-add=NET_BIND_SERVICE</ExtraParams>
  <PostArgs/>
  <CPUset/>
  <DateInstalled/>
  <DonateText/>
  <DonateLink/>
  <Requires>
    Host networking. Unraid&#39;s built-in DHCP server (if any) must
    not collide with a network that already has DHCP — OpenPXE runs
    in proxy mode and coexists, but only one DHCP _proxy_ should reply
    per broadcast domain.
  </Requires>
  <Config Name="ISOs" Target="/var/lib/openpxe/isos" Default="/mnt/user/appdata/openpxe/isos"
          Mode="rw" Description="Where uploaded and seeded .iso files live."
          Type="Path" Display="always" Required="true" Mask="false">/mnt/user/appdata/openpxe/isos</Config>
  <Config Name="Work dir" Target="/var/lib/openpxe/work" Default="/mnt/user/appdata/openpxe/work"
          Mode="rw" Description="Settings, NFS state, and runtime scratch. Persisted across restarts."
          Type="Path" Display="always" Required="true" Mask="false">/mnt/user/appdata/openpxe/work</Config>
  <Config Name="SMB share root" Target="/var/lib/openpxe/smb" Default="/mnt/user/appdata/openpxe/smb"
          Mode="rw" Description="Where extracted Windows install media lives. Only used when Windows toggle is on."
          Type="Path" Display="advanced" Required="false" Mask="false">/mnt/user/appdata/openpxe/smb</Config>
  <Config Name="Public IP" Target="OPENPXE_PUBLIC_IP" Default=""
          Mode="" Description="IP advertised to PXE clients. Leave blank to auto-detect; set explicitly on multi-homed Unraid hosts."
          Type="Variable" Display="always" Required="false" Mask="false"></Config>
  <Config Name="Log filter" Target="OPENPXE_LOG" Default="info,openpxe=debug"
          Mode="" Description="tracing-subscriber EnvFilter expression."
          Type="Variable" Display="advanced" Required="false" Mask="false">info,openpxe=debug</Config>
</Container>
