scripts/render_installers.go used strings.ReplaceAll on the signing key placeholder, which also rewrote the unpinned-key sentinel in install.sh and install.ps1 and caused rendered installers to skip ssh-keygen signature verification. Pin only the key assignment and refuse changed templates.
Update scripts/install.ps1 to invoke ssh-keygen directly and stream raw binary bytes into stdin instead of calling cmd.exe /d /s /c (whose outer-quote stripping breaks quoted paths) or Start-Process -RedirectStandardInput (which re-encodes binary payloads).
In scripts/install.sh, derive curl's sha256// public-key pin from the certificate verified by --server-fingerprint and pass --pinnedpubkey on all six curl request lists so subsequent requests remain bound to the verified peer even with -k.
Contract-Neutral: Security hardening of installer verification and privilege boundaries without public contract delta
An interactive installer does not exit PowerShell, so remove the original owned download after successful destination preparation rather than retaining a second executable until engine exit. Keep a failed source cleanup before the SCM boundary, cover its real Windows sharing refusal, and bind the native preparation controls into the existing canonical installer test file.
Contract-Neutral: Complete the same implementation-only destination preparation without changing installer trust, service-removal, saved-state or completion contracts.
Change-source: pulse-maintainer
Copy the verified download into an exclusive, checksum-bound destination-directory leaf while the original service is still intact. Inherit destination ACLs and track only the created stage for cleanup, then use that prepared leaf for the existing replacement path. Register native PowerShell 5.1 real-file, refusal, state, ACL and cleanup controls alongside portable wiring checks. Late publication and service startup remain separate failure boundaries.
Contract-Neutral: Implementation-only destination preparation preserves the existing installer trust, service-removal, saved-state and completion contracts; no API, rendered surface or release orchestration change.
Change-source: pulse-maintainer
The agent can report a failed container's last log lines since #4342,
but only through a flag or an environment variable on the agent itself.
Nobody installing from the copied command would find it, and the
installer rejected the flag as an unknown argument.
The shell installer now takes --enable-failure-logs and
--disable-failure-logs, and the PowerShell installer takes
-EnableFailureLogs or PULSE_ENABLE_FAILURE_LOGS. Each writes the flag
into the service arguments. An update or reinstall that names neither
keeps what the installed service has, so the choice survives agent
updates, and the disable flag is the way off: without it the recovered
service argument would turn the option back on.
The install screen gains "Send the last log lines of a failed
container" beside the copied commands, outside the advanced options and
unticked by default. Command access sat behind the advanced fold until
#1728 because people missed it there. Ticking it adds the flag, or the
PowerShell environment assignment, to every copied install command. It
mints no token and changes no scope, and it cannot reach an agent that
is already installed. The text says what leaves the host, that masking
can miss a secret, and how to turn it off.
It is still a local choice. Nothing here gives the server a way to turn
it on.
Return noninteractive installer errors without a desktop dialogue. Exercise saved-only authenticated unregistration against refused and malformed acknowledgements in the existing native lifecycle, preserving recovery bytes and ACLs until exact-ID confirmation and independently checking repeated cleanup.
Change-source: pulse-maintainer
Contract-Neutral: Honour the existing NonInteractive flag and qualify the existing exact-ID retention contract; no change to public installer arguments, enrolment, identity selection, TLS policy or server unregistration semantics.
The shared SCM helper can return when the service was already absent, so do not claim this attempt removed it. Retain the same fail-closed recovery boundary and apply the exact formatter output returned by the prepared offline frontend proof.
Contract-Neutral: Corrects service-observation wording and mechanically formats a consuming test; no change to removal, exact-ID acknowledgement, authentication, TLS or erasure requirements.
Change-source: pulse-maintainer
Require a Boolean success acknowledgement for the exact saved agent ID before erasing local credentials, identity, logs or executable. Keep service-removal ordering and saved TLS/authentication, stop on uncertain registration, and never select a duplicate hostname. Add complete-branch Windows controls to the existing native suite and align consuming Help with partial-removal recovery.
Change-source: pulse-maintainer
Replace suppressed stop/delete failures with bounded SCM stop and absence evidence before replacement or uninstall. Retain binary and agent state on uncertainty, and report incomplete local cleanup. Add production-function failure controls to the existing native Windows test route and pin both destructive callers.
Change-source: pulse-maintainer
install.ps1 set ServicePointManager's certificate callback to a
PowerShell scriptblock. ServicePointManager can invoke that callback on
a worker thread that has no runspace, where a scriptblock delegate
fails closed, so agent downloads died with a TLS error even though the
certificate policy would have accepted them (hit by an rc.6 tester with
Skip TLS verification enabled). The copied install command already
migrated to a compiled validator for exactly this reason in rc.6; the
downloaded script now does the same. Validation policy is unchanged,
with fingerprint pinning first, then insecure, then clean chains, then
the custom CA. Verified with pwsh covering all four policy branches
plus the callback running on a runspace-free worker thread.
Contract-Neutral: installer TLS callback implementation moved to a compiled type; same validation policy, no payload or endpoint change
Use the installer-owned ProgramData directory consistently for token lookup, enrollment state, agent identity, receipts, and service runtime data. Pass that directory explicitly to the Windows service and retain the existing Linux default elsewhere.
Contract-Neutral: Windows agent state-path alignment preserves the existing installer and agent public contract
Contract-Neutral: Legacy Windows PowerShell TLS enum compatibility preserves the existing installer transport contract without changing its public interface
The Windows installer compared the downloaded agent's --version output
(v6.0.5) against the server's /api/version value (6.0.5) literally, so
every matching install still warned about a version mismatch (#1527).
Strip the leading v from both sides before comparing, matching what
install.sh already does.
Tighten v5-to-v6 upgrade safety, release installability, provider MSP mode handling, AI cost accounting, metrics flushing, and frontend guardrails for the v6.0.0 GA candidate.
The UI only showed a bash uninstall command which doesn't work on Windows.
Added PULSE_UNINSTALL env var support to install.ps1 and updated the UI
to display platform-specific uninstall commands for both Linux/macOS and
Windows.
Related to #1176
- Add /api/agents/host/uninstall endpoint for agent self-unregistration
- Update install.sh to notify server during --uninstall (reads agent ID from disk)
- Update install.ps1 with same logic for Windows
- Update frontend uninstall command to include URL/token flags
This ensures that when an agent is uninstalled, the host record is
immediately removed from Pulse and any linked PVE nodes have their
+Agent badge cleared.
Switch from sc.exe create to PowerShell's New-Service cmdlet for
creating the Windows service. New-Service provides better error
handling and is more reliable. Keep sc.exe only for configuring
service recovery options (restart on failure), which New-Service
doesn't support.
Related to #776
The binPath parameter value needs outer quotes when it contains
embedded quotes and spaces. Without this, SC.EXE parses the value
incorrectly and fails to create the service.
Related to #776
- Add error handling for sc.exe delete in uninstall logic
- Add error handling for legacy agent service deletion
- Add error handling for existing service deletion before reinstall
- Show warnings when service deletion fails instead of silently continuing
Related to #735
The unified installer was missing --agent-id support that existed in
the legacy host-agent installer. This parameter allows users to specify
a custom agent identifier instead of using auto-generated IDs.
Updated both install.sh (Linux/macOS/Synology/Unraid) and install.ps1
(Windows) to accept --agent-id and pass it through to the agent binary.
Related to #772
- Add Administrator privilege check at script start
- Replace silent `| Out-Null` with proper error handling for sc.exe
- Exit with error if service creation fails
- Add try/catch for Start-Service with proper error reporting
Related to #735, #760, #751
Issues found during scenario testing:
1. Version propagation: The hostagent and dockeragent packages were
reporting their own Version (0.1.0-dev) instead of the unified
agent's version. Added AgentVersion config field to pass the
parent's version down.
2. macOS legacy cleanup: The install.sh script was missing cleanup
for pulse-docker-agent on macOS.
3. Windows legacy cleanup: The install.ps1 script was missing cleanup
for legacy PulseHostAgent and PulseDockerAgent services.
These fixes ensure:
- Unified agent reports consistent version across host/docker metrics
- Legacy agents are properly removed on all platforms during upgrade
- Users migrating from legacy agents get a clean transition
Implement self-update capability for the unified pulse-agent binary:
- Add internal/agentupdate package with cross-platform update logic
- Hourly version checks against /api/agent/version endpoint
- SHA256 checksum verification for downloaded binaries
- Atomic binary replacement with backup/rollback on failure
- Support for Linux, macOS, and Windows (10 platform/arch combinations)
Build and release changes:
- Dockerfile builds unified agent for all platforms
- build-release.sh includes unified agent in release artifacts
- validate-release.sh validates unified agent binaries
- Install scripts (install.sh, install.ps1) use correct URL format
Related to #727, #737
Fixes#755. Adds interactive pauses and graphical popups (where available) to installer scripts when critical errors occur, ensuring troubleshooting guides are readable. Also clarifies 'build from source' instructions.