Server reference

Commands

potaru-server run [flags]                      run the server process (foreground)
potaru-server create-enrollment-token [flags]   mint a token for a new agent to enroll with
potaru-server install / exec-install [--bin DIR]   place this binary on PATH
potaru-server uninstall / exec-uninstall [--yes]   remove it
potaru-server version                           print version and exit

run flags / env vars

Flag Env var Default Description
--state-dir POTARU_STATE_DIR ./state directory for the sqlite database
--tunnel-addr POTARU_TUNNEL_ADDR :7000 agent tunnel listener
--https-addr POTARU_HTTPS_ADDR :8443 admin web UI/API listener
--self-signed POTARU_SELF_SIGNED false required for now — serves an ephemeral self-signed cert on both listeners
--verbose POTARU_VERBOSE false debug-level logging

TLS is currently self-signed only — real ACME-issued certificates are a planned addition. Agents must connect with --insecure (POTARU_INSECURE=true); browsers must click through the certificate warning.

create-enrollment-token flags

Flag Default Description
--label (none) human-readable label
--max-uses 1 how many machines may redeem this token (0 = unlimited)
--ttl 24h how long the token stays valid (0 = never expires)
--state-dir ./state must match the running server's state dir

This is a headless equivalent of the dashboard's "Enroll a new agent" panel — it opens the sqlite database directly (safe alongside a running server; sqlite's WAL mode supports concurrent access).