DEVICE-002: ARM machine-ID fallback — device-tree model + /etc/machine-id combo, then /proc/cpuinfo Serial (all-zero rejected), before the weak hostname fallback. Hardware-bound IDs on DMI-less devices. DEVICE-001: agent detects device_type (server/desktop/phone/tablet) from /sys signals — system battery (scope=Device peripherals excluded, UPS excluded), DRM connector state, framebuffer min-dimension for phone/tablet split. Reports device_type/device_model/os_distro in registration and system-info paths. SERVER-001: migration 061 — device_type, device_type_manual (operator override, never agent-written), device_model, os_distro on agents. effective_device_type computed into every serialized agent. SERVER-002: PUT /admin/agents/:id/device-type — set/clear override, enum-validated, journaled. WEB-001: device-type icons + fleet filter, device model in list, detail header badge with reclassify dropdown, os_distro surfaced. INSTALL-003: arm64 install path unblocked — helper (required manifest component) now cross-built aarch64-unknown-linux-musl via rust-lld in the server image, signed at boot (helperArches += arm64), listed in the release manifest. Install template already handled uname -m and pacman. Plus in-flight: desktop tray wiring, enrollment page polish, CI workflow updates, RAF session-broker/pacman-scanner docs, native installer scaffold.
43 lines
1.7 KiB
Text
43 lines
1.7 KiB
Text
# ============================================================
|
|
# RedFlag Server — native Windows configuration
|
|
# Copy this file to: redflag.env (same folder), edit it, then
|
|
# restart the "RedFlag Server" service (services.msc or:
|
|
# net stop RedFlagServer && net start RedFlagServer
|
|
# ============================================================
|
|
# This is the native-install equivalent of config/.env.example
|
|
# in the main repo — same variables, same semantics. Docker gets
|
|
# these from docker-compose's env_file:; this binary reads this
|
|
# file directly (server/internal/config/config.go loadNativeConfigFile).
|
|
|
|
# --- PostgreSQL ---
|
|
# Point this at a Postgres instance you provide — same as the docker
|
|
# stack's postgres:16-alpine container, just not bundled by this installer.
|
|
REDFLAG_DB_HOST=localhost
|
|
REDFLAG_DB_PORT=5432
|
|
REDFLAG_DB_NAME=redflag
|
|
REDFLAG_DB_USER=redflag
|
|
REDFLAG_DB_PASSWORD=CHANGE_ME_pick_a_strong_db_password
|
|
|
|
# --- Server ---
|
|
REDFLAG_SERVER_HOST=0.0.0.0
|
|
REDFLAG_SERVER_PORT=8080
|
|
|
|
# --- Admin Account ---
|
|
# After first-run setup these are persisted in the database;
|
|
# these values re-apply on service restart.
|
|
REDFLAG_ADMIN_USER=admin
|
|
REDFLAG_ADMIN_EMAIL=admin@example.com
|
|
REDFLAG_ADMIN_PASSWORD=CHANGE_ME_pick_a_strong_admin_password
|
|
REDFLAG_JWT_SECRET=CHANGE_ME_random_string_at_least_32_characters_long
|
|
|
|
# --- Agent Registration ---
|
|
REDFLAG_TOKEN_EXPIRY=24h
|
|
REDFLAG_MAX_TOKENS=100
|
|
REDFLAG_MAX_SEATS=50
|
|
|
|
# --- Ed25519 Signing Key ---
|
|
# Leave blank on first run. Go to http://localhost:8080/setup and click
|
|
# "Generate Keys". Copy the private key here, then restart the service.
|
|
# Without this, agents cannot receive signed commands or upgrade themselves.
|
|
# BACKUP THE PRIVATE KEY. Losing it means re-enrolling every agent.
|
|
REDFLAG_SIGNING_PRIVATE_KEY=
|