compose up -d leaves NATS on its old config when only the bind-mounted
nats.conf changed, so the 8 MB max_payload never applied on upgrades.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- PUBLIC_SERVER_URL and TRUSTED_HOSTS left at .env.example's sample
(control.example.com, any RFC 2606 name) are ignored with a startup
warning: links follow the forwarded headers and devices download from
the server URL they already use. .env.example ships them empty and
deploy.sh clears sample values from an existing .env.
- The screen host is built from its own folder so .cargo/config.toml's
+crt-static applies; the shipped exe imported VCRUNTIME140.dll and died
without output on devices without the Visual C++ runtime ("the screen
host gave no answer"). The build now refuses an exe with CRT imports.
- A failed screen host probe is retried with backoff (30 s up to 10 min)
and the inventory is republished once it answers; the warning and the
reason carry the exit code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docker-compose.yml gains a postgres service (EXECUTER-DB-00001, official
image pinned by major and digest like NATS, INTERNAL network only, no host
port, pg_isready health check, shm_size, runs as PUID:PGID, data in
${STACK_BINDMOUNTROOT}/${STACK_NAME}/Postgres/Data). It is in the "postgres"
Compose profile; COMPOSE_PROFILES in .env turns it on, and the backend waits
for it healthy (depends_on required: false, so SQLite and external databases
start without it). The backend defaults to DATABASE_PROVIDER=postgres with
DATABASE_CONNECTION_STRING and DATABASE_PASSWORD from .env.
docker-compose.postgres-port.yml publishes a host port, opt-in through
POSTGRES_BIND.
deploy.sh decides the database: what .env names when the operator set it;
else SQLite when API/Data/app.db exists (written to .env, with a note on how
to move); else the bundled Postgres, its password generated into .env (and
exported), never regenerated over an existing database. COMPOSE_PROFILES
follows. The decisions are functions that scripts/tests/Test-DeployDatabase.sh
runs on fixtures without Docker. Compose 2.20.2+ is checked; a new .env is
mode 600. New-LocalSecrets.ps1 generates the password for a new .env and
keeps an existing .env's database settings on -Force.
README: deploy, secrets, Compose, database providers, Postgres backups and
pg_restore, and Moving from SQLite to Postgres (migrate-database).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A VPS running only ExecuteR puts its edge on the standard ports; the app
services stay on their upstream ports on loopback. The HTTP redirect and the
deploy summary name the HTTPS port only when it isn't 443.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
deploy.sh sourced .env before the keys existed, so the shell's empty values
overrode the keys it then wrote; and compose reads .env beside the first
compose file, so a manual upgrade ran without them too. Keys are now written
and exported on every run, compose gets --env-file, and IaC/compose/.env links
to the stack's .env. The deploy waits on /api/ready and says what is missing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
App ports (backend, webui, NATS WS) now publish on 0.0.0.0 by default so an
edge proxy on another host can reach them without extra config. deploy.sh
--with-proxy flips an unset BIND_EXTERNAL_ADDRESS to 127.0.0.1, since the
bundled proxy reaches services over the compose network. An explicit value
always wins.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
NATS resolves `include` paths relative to the config file's own directory,
so `include /etc/nats/resolver.conf` became /etc/nats/etc/nats/resolver.conf
and the server exited on startup ("no such file or directory"). Use the
relative `include resolver.conf`, which resolves to /etc/nats/resolver.conf
where it is mounted.
The backend and webui run as PUID:PGID (default 1000) but the bind-mount
data tree was created root-owned, so the backend could not write /data.
chown the stack's data tree to PUID:PGID after creating it. NATS runs as
root and is unaffected.
Neither file is baked into an image (nats.conf is mounted, deploy.sh is
fetched), so no rebuild is needed — [skip ci].
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The backend image runs as a non-root user, so the key-gen container could
not write operator.nk et al into the root-owned secrets/nats bind mount
(UnauthorizedAccessException / Permission denied), failing a fresh deploy.
Pass --user "$(id -u):$(id -g)" so the ephemeral container writes as whoever
runs deploy.sh — the same identity that created the directory — so the keys
always land. The runtime services keep their own non-root users.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
An empty INITIAL_ADMIN_PASSWORD now means generate and record: the one-time
password goes to <data>/initial-admin-password.txt (Administrators, SYSTEM and
the server's own account only; mode 600 elsewhere) and the log only says where.
The file is removed once the password is changed or reset. reset-admin (alias
auth-reset) reads the standalone appsettings.json, so it reaches the same
database with the service running or stopped, takes --user/--password, turns
the account back on and is audited. The compose scripts stop generating the
password into .env.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build, Test and the packaging scripts take the version from
Get-Version.ps1 and the short commit from the same place. Both MSIs get
the four-field version as ProductVersion (X.Y.Z.0 for a release, X.Y.Z.N
between releases) instead of the calendar transform. Checksums and release
assets take only their own version's files (1.4.0 no longer matches
1.4.0.7's).
Publish-Release.ps1 creates the tag vX.Y.Z on the released commit and the
release "ExecuteR X.Y.Z" with semantic-release's notes (-NotesFile,
-Prerelease), reuses both on a re-run of the same commit, refuses a version
already tagged on another commit and skips assets uploaded whole.
deploy.sh builds from source with the git version (0.0.0.0 without git)
and runs the images it built by that tag. Test.ps1 runs the watchdog
tests too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent trust for self-signed servers is now abstracted from operators.
The server exposes its public CA chain at GET /api/enrollment/ca; a new
pinned trust mode (TlsTrustMode=pinned) makes the agent fetch, pin,
install and validate against that CA for both enrollment HTTPS and the
NATS WebSocket, and a background CaRefreshService re-pins it across
renewals so trust never lapses. Install scripts, the agent MSI
(TRUSTMODE property), the ADMX template and the Add Device modal all
drive pinned trust for self-signed servers; skip-verify/insecure
remains an escape hatch.
Backend ingest subscriptions (presence, inventory, agent events, job
output/progress) now use a NATS queue group, so multiple backend
replicas share the load instead of each writing duplicates.
Deployment manifests move to IaC/: compose (moved from root, paths
rebased; deploy.sh and docs updated), swarm (replicated stack: Postgres,
3-node JetStream cluster, API replicas + single scheduler worker, shared
key-ring volume), and k8s (namespace/config, Postgres + NATS
StatefulSets, API Deployment + HPA, single worker, WebUI, ingress).
Wiki gains a Scaling and HA page with an HA topology diagram covering
stateless vs stateful tiers, NATS cluster/supercluster, overlay
(Tailscale/NetBird), shared storage (MicroCeph) and service discovery.
Verified: solution builds, Backend 100 / Agent 60 tests, svelte-check
clean, agent + server MSIs build.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The images were already being published to Gitea's own registry, but the
workflow required REGISTRY_HOST/USERNAME/PASSWORD to be seeded first, which
made it look and behave like an external registry.
- CI now defaults to the built-in registry with no configuration: the host is
derived from github.server_url, the user is github.actor, and the password
is the GITEA_TOKEN that Actions injects per run (verified against
/v2/token - it returns a valid registry bearer). The REGISTRY_* secrets
remain as an opt-in override for publishing elsewhere
- Initialize-GiteaSecrets.ps1 no longer writes registry credentials unless
-ExternalRegistry is passed; the seeded ones have been removed from the repo
- deploy.sh logs in before pulling when REGISTRY_USERNAME/REGISTRY_TOKEN are
set, which private-repo packages require
- README documents the registry path and the two Gitea API quirks (secrets use
"data" not "value"; GITEA_/GITHUB_ prefixes are reserved)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Compose:
- Backend and webui now reference ${REGISTRY}/<image>:<tag> (Gitea container
registry) with pull_policy: missing, keeping the build section as the
fallback path
- docker-compose.proxy.yml adds an OPT-IN in-stack nginx (EXECUTER-PROXY-00001)
on uncommon host ports with bind-mounted config, certs, logs and ACME webroot
scripts/deploy.sh:
- Bootstrappable straight from a URL (curl ... | bash) or run from a checkout;
fetches only the files it needs when there is no clone
- Pulls published images first and builds from source only if the pull fails
(--build / --no-pull to force either way)
- Creates .env with a generated initial admin password, prepares the
bind-mount tree, and generates real NATS operator/account keys by running
the backend image's own nats-auth CLI (no dotnet SDK needed on the host)
- --with-proxy is opt-in and rewrites the nginx site to reach services by
compose service name; --host supplies the public hostname
- Waits for backend health and prints the resulting endpoints
.env.example: REGISTRY/IMAGE/VERSION/pull-policy, proxy settings, and
DEVICE_ORPHAN_AFTER_DAYS.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>