{% extends "ui/_layout.html" %} {% block title %}Settings - bty-web{% endblock %} {% block content %}

Settings

Authentication

bty-web is gated by the OS password of the {{ service_user }} account. To rotate the credential, run sudo passwd {{ service_user }} on the server. Sessions are server-signed cookies (Starlette's SessionMiddleware) with a sliding 7-day TTL. To invalidate every existing session in one shot, rotate the session secret: sudo rm /var/lib/bty/session-secret && sudo systemctl restart bty-web. The restart regenerates the secret on startup; no reboot needed.

PXE proxy-DHCP

Controls the dnsmasq proxy-DHCP block: when active, bty-web responds to PXE queries on the chosen interface. Pick the interface facing the target machines, supply the subnet they're on, and click Activate. Deactivate removes the active config and restarts dnsmasq back to TFTP-only.

{% if missing_netboot_artifacts %} {# Netboot env incomplete: activating PXE now would let clients chain into iPXE but they'd 404 fetching the kernel. Surface the precondition prominently so the operator sees it before they activate (or right after, when the activate handler's warning flash arrives). #}
Netboot environment incomplete. Missing under {{ boot_root }}: {% for name in missing_netboot_artifacts %} {{ name }}{% if not loop.last %}, {% endif %} {% endfor %}. PXE proxy-DHCP can still be activated, but clients chaining into bty's iPXE script will 404 on the kernel fetch until these files are present.
Boot artifacts
{% endif %} {% if pxe %} {% if pxe_iface_present %} {# Healthy active state: configured interface still exists. #}
Active on interface {{ pxe.interface }}, subnet {{ pxe.subnet }}.
{% else %} {# NIC-gone state: configured interface is no longer present. Likely renamed across a reboot (USB ethernet adapters, systemd predictable-name churn). dnsmasq is failing to bind silently in the background. #}
PXE is configured for interface {{ pxe.interface }} but that interface is not currently present. dnsmasq is failing to bind. Deactivate and re-activate on a present interface below.
{% endif %} {% else %}
PXE is currently not active. Machines with boot_policy=flash won't actually be served until you activate it here.
{% endif %}

{% if pxe %}Change binding{% else %}Activate{% endif %}

{# ``form_interface`` / ``form_subnet`` are set by the activate- failed path so the operator's typed values survive the re-render. Falls through to the active config, otherwise to the first detected interface's auto-detected subnet. #} {% set pxe_iface = form_interface or (pxe.interface if (pxe and pxe_iface_present) else (interfaces[0].name if interfaces else '')) %} {% set pxe_subnet = form_subnet or (pxe.subnet if pxe else (interfaces[0].subnet if interfaces and interfaces[0].subnet else '')) %}
Network address of the segment PXE clients live on. Pre-filled from the selected interface's IPv4 address; edit if needed.

Proxy-DHCP only: bty assumes there is already a DHCP server on this segment. Full DHCP is intentionally not offered here - misconfigured rogue-DHCP would conflict with the LAN's real DHCP server. Run a dedicated DHCP daemon next to bty if you need one.

{# Recent activity for settings: PXE activate / activate-failed via the per-subject events card. #} {% with events=settings_events, title="Recent settings activity", link_to_full="/ui/events?subject_kind=settings" %} {% include "ui/_events_card.html" %} {% endwith %} {% endblock %}