Add device: platform-aware one-liner installs from the Devices page #5

Merged
gsadmin merged 17 commits from dev into main 2026-08-08 23:54:02 +00:00
Owner

Onboarding for every platform in one click: Devices → + Add device issues a bootstrap token and hands you a paste-ready one-liner for Windows, Linux or macOS. One commit, verified locally (76 + 58 + 89 tests green, svelte-check clean, modal exercised live — it issued a real token and built the Linux command in the screenshot).

Add device modal

  • Horizontal Windows / Linux / macOS selector, single-use or multi-use token choice (24-hour expiry), and Generate command — nothing is created until confirmed; Esc / click-outside / Cancel dismiss without side effects and each open starts fresh. Visible with settings.manage.
  • One-liners per platform:
    • Windows: iwr '<base>/api/enrollment/install?token=…' -UseBasicParsing | iex
    • Linux: curl -fsSL '<base>/api/enrollment/install?token=…&type=linux' | sudo bash
    • macOS: same with &type=osx

Unix install path

  • The install endpoint returns a bash script for type=linux|osx: detects x64/arm64, downloads the matching agent zip from the same origin, unpacks to /opt/executer/agent, configures enrollment via the agent's new cross-platform configure --url --token verb (registry on Windows, /etc/executer/agent.json elsewhere) and registers the systemd unit / launchd daemon via initialize.
  • The agent package service now serves Agent-linux-x64/linux-arm64/osx-x64/osx-arm64.zip alongside Agent.msi/Agent.zip; the CI image bake and the standalone server bundles stage all of them (out-of-band updates via the bind mount keep working per file).

Tests & docs

  • Seven new endpoint tests: PowerShell variants (msi/zip), bash variants with arch-detection markers, and token refusal.
  • README rewrites Bootstrap and URL install around the modal with all three one-liners and the unix flow; new add-device.png capture.

🤖 Generated with Claude Code

Onboarding for every platform in one click: **Devices → + Add device** issues a bootstrap token and hands you a paste-ready one-liner for Windows, Linux or macOS. One commit, verified locally (76 + 58 + 89 tests green, svelte-check clean, modal exercised live — it issued a real token and built the Linux command in the screenshot). ## Add device modal - Horizontal **Windows / Linux / macOS** selector, **single-use or multi-use** token choice (24-hour expiry), and **Generate command** — nothing is created until confirmed; Esc / click-outside / Cancel dismiss without side effects and each open starts fresh. Visible with `settings.manage`. - One-liners per platform: - Windows: `iwr '<base>/api/enrollment/install?token=…' -UseBasicParsing | iex` - Linux: `curl -fsSL '<base>/api/enrollment/install?token=…&type=linux' | sudo bash` - macOS: same with `&type=osx` ## Unix install path - The install endpoint returns a **bash script** for `type=linux|osx`: detects x64/arm64, downloads the matching agent zip from the same origin, unpacks to `/opt/executer/agent`, configures enrollment via the agent's new cross-platform **`configure --url --token`** verb (registry on Windows, `/etc/executer/agent.json` elsewhere) and registers the systemd unit / launchd daemon via `initialize`. - The agent package service now serves `Agent-linux-x64/linux-arm64/osx-x64/osx-arm64.zip` alongside `Agent.msi`/`Agent.zip`; the CI image bake and the standalone server bundles stage all of them (out-of-band updates via the bind mount keep working per file). ## Tests & docs - Seven new endpoint tests: PowerShell variants (msi/zip), bash variants with arch-detection markers, and token refusal. - README rewrites *Bootstrap and URL install* around the modal with all three one-liners and the unix flow; new `add-device.png` capture. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
gsadmin added 1 commit 2026-08-08 16:49:04 +00:00
Add device from the Devices page: one-liner installs for every platform
CI / build-test (push) Successful in 15m53s
CI / images (push) Successful in 2m20s
CI / build-test (pull_request) Successful in 3m26s
CI / images (pull_request) Has been skipped
083e207cc4
Devices gains an Add device modal (visible with settings.manage): a
horizontal Windows / Linux / macOS selector, a single-use or multi-use
token choice (24-hour expiry), and Generate command — nothing is
created until confirmed; Esc, click-outside or Cancel dismiss without
side effects, and each open starts fresh. The generated one-liner is
copy-ready per platform.

The install endpoint grew unix variants: ?type=linux|osx returns a bash
script that detects the architecture, downloads the matching agent zip
from the same origin, unpacks to /opt/executer/agent, configures
enrollment through the agent''s new cross-platform `configure --url
--token` verb (registry on Windows, agent.json elsewhere) and registers
the systemd unit / launchd daemon. The agent package service serves the
four unix zips alongside Agent.msi/Agent.zip, and both the CI image
bake and the standalone server bundles stage them.

Covered by seven endpoint tests (PowerShell variants, bash variants
with arch detection, token refusal); modal verified live — it issued a
real token and built the Linux one-liner in the shot.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin added 1 commit 2026-08-08 18:03:04 +00:00
Token use limits: any count up to 9999, or unlimited
CI / build-test (push) Successful in 23m19s
CI / images (push) Failing after 3m1s
CI / build-test (pull_request) Successful in 3m56s
CI / images (pull_request) Has been skipped
6b76a13282
The Add device modal keeps the single/multi flow: multi now takes a
use count (default 1, up to 9999) or an Unlimited checkbox instead of
the hardcoded 100. MaxUses 0 is the unlimited sentinel — enrollment
only counts uses against a positive limit, expiry and revocation still
gate the token, and creation validates the 0-9999 range. The Settings
token form and list follow (0 = unlimited input hint, infinity in the
uses column, Consumed/Revoke logic aware of unlimited).

Changing the count or unlimited flag after generating invalidates the
shown command — limits are properties of the token, so a new one is
issued on the next confirm. Five new endpoint tests cover the sentinel
round-trip, the bounds and the rejections (the test client now sends
the double-submit CSRF header for cookie-authenticated POSTs).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin added 1 commit 2026-08-08 18:06:29 +00:00
The install command re-issues live as token options change
CI / build-test (push) Successful in 15m14s
CI / images (push) Successful in 2m10s
CI / build-test (pull_request) Successful in 3m19s
CI / images (pull_request) Has been skipped
80e62ef4c7
After the first Generate, switching single/multi, editing the use
count or toggling Unlimited re-issues the token automatically
(debounced 600ms) — the command dims with an updating hint and the
superseded token is revoked so toggling never leaves live tokens
behind. A pending debounce is cancelled on dismissal to avoid minting
an orphan after the modal closes. Platform switching still reuses the
current token, since only the command text differs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin added 1 commit 2026-08-08 19:41:47 +00:00
Trust reverse proxies from private networks by default
CI / build-test (push) Successful in 15m30s
CI / images (push) Successful in 2m13s
CI / build-test (pull_request) Successful in 3m29s
CI / images (pull_request) Has been skipped
0e014b7e1d
Forwarded headers now work with zero configuration behind any cloud or
LAN reverse proxy: the default trust set is loopback (127/8, ::1),
RFC1918 (10/8, 172.16/12, 192.168/16) and CGNAT (100.64/10). Explicit
TRUSTED_PROXIES / TRUSTED_NETWORKS replaces those defaults with an
allow-list for networks where peers are untrusted, and TRUST_PROXY=0
opts out entirely — the old fail-at-startup requirement is gone, and
the applied trust set is logged at boot. Five unit tests pin the
semantics (defaults present, explicit replacement, opt-out, options
wiring); README and .env.example describe the new model.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin added 1 commit 2026-08-08 19:44:06 +00:00
Standalone servers surface the proxy trust and public URL knobs
CI / build-test (push) Successful in 15m19s
CI / images (push) Successful in 2m2s
CI / build-test (pull_request) Successful in 3m19s
CI / images (pull_request) Has been skipped
2bd87f8924
The Windows and Linux binaries are the same backend, so they already
honor the private-network trust defaults; setup now pre-writes the
optional keys — PUBLIC_SERVER_URL, TRUST_PROXY, TRUSTED_NETWORKS,
TRUSTED_HOSTS — as empty placeholders in the generated appsettings.json
(empty means unset everywhere), and QUICKSTART/README explain the
configuration model: flat keys in appsettings.json next to the binary
or the same names as environment variables, env winning.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin added 1 commit 2026-08-08 19:56:22 +00:00
Multi-instance standalone servers: port, bind and service-name control
CI / build-test (push) Successful in 15m19s
CI / images (push) Successful in 2m11s
CI / build-test (pull_request) Successful in 3m54s
CI / images (pull_request) Has been skipped
872a09724e
`setup` gains --http-port (default 9080), --bind (default 0.0.0.0, IPv6
literals bracketed automatically), and --nats-port/--nats-ws-port/
--nats-monitor-port for the loopback-only sidecar listeners — all
flowing into the generated nats.conf and appsettings.json, with the
sidecar health poll reading NATS_MONITOR_URL instead of a hardcoded
8222. `service install|uninstall --name <n>` registers instances side
by side (Windows service or systemd unit). One directory per instance
owns its config, database, keys, NATS state and agent packages, so
instances never share anything. Re-running setup over existing config
now says so instead of silently keeping old ports.

Verified live: setup with custom ports produced matching nats.conf and
appsettings values, and --bind 127.0.0.1 landed in Urls.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin added 1 commit 2026-08-08 20:04:27 +00:00
Server MSI wizard gains a Network settings page
CI / build-test (push) Successful in 15m2s
CI / images (push) Successful in 2m13s
CI / build-test (pull_request) Successful in 3m23s
CI / images (pull_request) Has been skipped
228c1791e5
Bind address, HTTP port and the three loopback-only NATS ports join the
wizard with their defaults and an inline explanation for each — bind
0.0.0.0 vs 127.0.0.1-for-a-local-proxy, what the HTTP port serves, and
why the NATS ports never need exposing — so a next-next-next install
works and informed changes are one field away. The values flow through
the same public properties silent installs use and into the binary''s
`setup` flags. Service naming stays out of the MSI deliberately: it
installs exactly one instance; multi-instance boxes use the ZIP with
distinct ports and service names.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin added 1 commit 2026-08-08 20:17:38 +00:00
Server MSI finish page offers to open the console
CI / build-test (push) Successful in 15m11s
CI / build-test (pull_request) Successful in 3m22s
CI / images (pull_request) Has been skipped
CI / images (push) Successful in 5m24s
0c6abc65b0
Checked-by-default exit checkbox launches the UI via WixShellExec; the
URL resolves at Finish time so wildcard binds (0.0.0.0, ::) open
http://localhost:<port> while a concrete bind address opens directly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin added 2 commits 2026-08-08 20:26:52 +00:00
States plainly that in-service SSL termination is out of scope and
points at edge terminators (Caddy, nginx/Nginx UI, HAProxy, Zoraxy)
that renew certificates and provide layer-7 visibility, including the
Windows-friendly options for the standalone server.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CI: run only when buildable paths change
CI / build-test (push) Successful in 20m52s
CI / images (push) Successful in 1m58s
CI / build-test (pull_request) Successful in 3m33s
CI / images (pull_request) Has been skipped
03bce4de65
Docs-only commits were queueing full build/test runs. Both workflows
now filter on src/tests/scripts/assets, the workflow files and the
root build manifests, so README/docs pushes skip the runner queue.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin added 1 commit 2026-08-08 20:50:59 +00:00
Optional Self-Signed TLS: encrypted proxy-to-server hop
CI / build-test (push) Successful in 15m9s
CI / images (push) Successful in 2m15s
CI / build-test (pull_request) Successful in 3m17s
CI / images (pull_request) Has been skipped
28e4878cc9
TLS_SELF_SIGNED=1 (env/appsettings), setup --tls 1, or the new MSI
checkbox switch the listener to HTTPS with a managed ECDSA chain —
root > intermediate > leaf, issued on first boot, auto-renewed ahead
of expiry and hot-swapped via Kestrel's certificate selector without
a restart. Windows persists the chain in the machine stores (Trusted
Roots / Intermediate CAs / Personal, so local browsers trust it);
Linux/macOS/containers use PEM files under <data>/tls with a
fullchain.crt for pinning. Reverse proxies either skip verification
(the hop stays encrypted — the roots just aren't distributed) or
import root+intermediate, re-importing when the chain rotates.

The MSI finish link follows the checkbox to https; short port flag
aliases keep the setup command inside the 255-char CA column, and the
quoted empty ENABLETLS keeps unchecked installs on plain HTTP.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin added 2 commits 2026-08-08 21:18:45 +00:00
TLS_SELF_SIGNED defaults on everywhere (0 / setup --tls 0 / unchecking
the pre-checked MSI box opts out); the compose stack alone keeps its
internal hop plain HTTP by default because the bundled nginx site
proxies http upstreams. On Windows the machine stores stay
authoritative, but every chain settle now also mirrors certs, keys and
fullchain.crt to <data>/tls (keys marked exportable for refresh) so a
local Caddy / Nginx UI / nginx can bind or trust the files and
renewals keep them current. Test hosts opt out to avoid chain
generation racing across parallel fixtures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Agents follow self-signed servers: skip-verify via registry/GPO
CI / build-test (push) Successful in 15m39s
CI / images (push) Successful in 3m27s
CI / build-test (pull_request) Successful in 3m54s
CI / images (pull_request) Has been skipped
b2aa8a1a13
New TlsSkipVerify agent setting (DWORD, GPO policy key beats local
registry, ADMX template included) accepts the server certificate
without validation on both the enrollment HTTP call and the NATS
websocket — for servers on the managed self-signed chain with no proxy
in front; the connection stays fully TLS-encrypted. Set it via
configure --skip-tls-verify, the agent MSI SKIPTLSVERIFY=1 property
(remember-pattern like the rest), GPO, or the registry directly.

The server detects direct self-signed serving (HTTPS + no forwarded
headers) and the UI one-liners plus all generated install scripts pick
the correct scheme and add the skip-verify bits automatically —
PS5-safe callback on Windows, curl -k on unix — and configure the
agent to match. Proxied deployments are untouched: agents validate the
edge certificate normally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin added 1 commit 2026-08-08 21:32:52 +00:00
Trim TLS docs, drop the MVP section, agent MSI gains a skip-verify box
CI / build-test (push) Successful in 14m59s
CI / build-test (pull_request) Successful in 3m21s
CI / images (pull_request) Has been skipped
CI / images (push) Successful in 3m29s
c80f0b909d
The self-signed TLS docs now state the default plainly without
deployment-specific caveats, the README loses the MVP demo sequence,
and the agent installer's Connection page gets a Skip TLS certificate
verification checkbox — unchecked by default, prefilled from the
registry on upgrades, same SKIPTLSVERIFY property silently.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin added 1 commit 2026-08-08 22:11:35 +00:00
Caddy and HAProxy edge samples alongside nginx
CI / build-test (push) Successful in 17m9s
CI / build-test (pull_request) Successful in 3m44s
CI / images (pull_request) Has been skipped
CI / images (push) Successful in 6m7s
a2cbc53a3e
Same single-file shape as the nginx site: banner header with routes and
BEFORE-USE placeholders, forwarded headers with the trust note,
WebSocket handling, commented IP allow-lists, enrollment/sign-in rate
limits where the engine supports them natively, and the commented
TLS_SELF_SIGNED upstream variant (skip verify or pin the exported
roots). The Caddyfile is validated with caddy itself.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin added 1 commit 2026-08-08 22:51:33 +00:00
nginx sample: split http-level directives for Nginx UI
CI / build-test (push) Successful in 16m6s
CI / images (push) Successful in 2m44s
CI / build-test (pull_request) Successful in 3m21s
CI / images (pull_request) Has been skipped
3a0797ebf4
limit_req zones and the WebSocket map move to executer-http.conf
(conf.d / Manage Configs) because Nginx UI site files expect
server/upstream blocks and http-level directives there fail its config
check. The site keeps a pointer, and the commented allow-lists gain the
CGNAT range.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin added 1 commit 2026-08-08 22:59:06 +00:00
nginx sample: only the WebSocket map is http-level
CI / build-test (push) Successful in 15m47s
CI / images (push) Successful in 2m20s
CI / build-test (pull_request) Successful in 3m20s
CI / images (pull_request) Has been skipped
5f9e915a82
The rate-limit zones sit fine in the site file, so they move back into
executer.conf; executer-http.conf keeps just the upgrade map that Nginx
UI cannot host in a site.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gsadmin merged commit 2b962a81ae into main 2026-08-08 23:54:02 +00:00
Sign in to join this conversation.