Installation manuals / Agent
Agent Installation
Install PortGuard Agent on each endpoint managed by your Console. Choose the endpoint's operating system below.
Have a running Console and its Server URL, for example http://192.168.1.10. Use the address that opens Console in your browser (port 80); backend port 8100 is internal. See the Console installation manual if the server is not installed yet.
Agent and Console have separate packages and version numbers. Use the release notes supplied with your Agent package.
Agent installers by platform
| Endpoint OS | Availability | Installation |
|---|---|---|
| Windows x64 | Agent 0.1.17 · Testing | Windows instructions |
| Linux x86-64 / ARM64 | 0.1.7 Stable · 0.1.8 Testing | Install with curl |
| macOS 14+ · Apple Silicon / Intel | 0.1.16 Testing · hardware acceptance pending | Terminal installer |
PortGuard supports mixed Windows, Linux and macOS fleets through one Console. Platform releases can differ in feature coverage and device-control behavior. Central log forwarding is configured in Console and includes Agent activity received by it; see the Console log-server guide. The current Testing Console release is required for RFC 5424 forwarding.
Windows Agent Testing
Run the complete block in PowerShell. Downloads are stored in your user Downloads folder, so the current directory can be System32 or any other directory. Download directly from PowerShell using curl.exe, verify the checksum, then run the installer. Windows x64 and administrator access are required. The package includes its .NET runtime. This Testing package is unsigned; confirm its official URL and checksum.
$ErrorActionPreference = 'Stop'
$base = 'https://portguard.kamindo.co/downloads/agent/windows/0.1.17'
$file = 'PortGuardAgent-0.1.17-windows-x64.exe'
$folder = Join-Path $env:USERPROFILE 'Downloads\PortGuard'
New-Item -ItemType Directory -Path $folder -Force | Out-Null
$installer = Join-Path $folder $file
$checksum = "$installer.sha256"
curl.exe --fail --location --retry 3 --output "$installer" "$base/$file"
if ($LASTEXITCODE -ne 0) { throw 'Installer download failed' }
curl.exe --fail --location --retry 3 --output "$checksum" "$base/$file.sha256"
if ($LASTEXITCODE -ne 0) { throw 'Checksum download failed' }
$expected = ((Get-Content -LiteralPath $checksum -Raw).Trim() -split '\s+')[0]
if ($expected -notmatch '^[a-fA-F0-9]{64}$') { throw 'Invalid checksum file' }
if ((Get-FileHash -LiteralPath $installer -Algorithm SHA256).Hash -ne $expected) { throw 'Checksum mismatch' }
Write-Host 'Download verified. Complete the installer wizard and click Finish.'
$process = Start-Process -FilePath $installer -WorkingDirectory $folder -Verb RunAs -Wait -PassThru
if ($process.ExitCode -ne 0) { throw "Installer exit $($process.ExitCode). Check $env:TEMP\PortGuard-install.log and PortGuard-install-error.txt" }
$service = Get-Service -Name PortGuardAgent -ErrorAction Stop
Write-Host "Installer completed. Agent service: $($service.Status). Approve the endpoint in Console."Enter the Console address in the wizard. For an IP/HTTP installation, explicitly select Allow HTTP on a trusted network. The Agent connects outbound; no Agent inbound port or manual enrollment JSON transfer is required. A Console supporting administrator approval is required.
Open Console → Endpoints → Connected agents, compare the installation UUID shown in the tray, and approve the device. A pending device occupies no license seat. Approval allocates one seat; its accepted heartbeat then marks it online. Verification and lifecycle instructions.
Installer window, tray and troubleshooting
A 100% download bar confirms only that the file arrived. Accept the Windows administrator prompt, complete the installer window (check the taskbar or Alt+Tab if it is behind PowerShell), and click Finish. PowerShell waits until installation completes, then displays the service status. Do not include Markdown backslashes or the PS>/>> prompts when copying.
The tray is registered for every sign-in and startup is requested immediately in the signed-in desktop session, without restarting Windows. Windows may put the icon under the notification-area arrow. Open Start → PortGuard Agent to show its status window. On unattended machines without a signed-in desktop, the tray appears at the next sign-in; the Agent service runs independently.
If installation reports an error, keep %TEMP%\PortGuard-install.log and %TEMP%\PortGuard-install-error.txt for troubleshooting. A direct EXE download is also available. Native Windows installation, tray startup and sign-in acceptance for this release must be completed by the testing team.
Linux Agent 0.1.8 Testing
Install and upgrade directly in the Linux terminal using the complete curl commands below. Requirements: Linux x86-64 / ARM64, systemd, Python 3.9 or newer, curl, sudo, and an existing non-root Linux account. One installer supports x86_64/AMD64 and ARM64/aarch64, including Ubuntu ARM64 VMs hosted on Apple Silicon.
New installation · Upgrade an existing Agent · Verify
1. Prepare Console for administrator approval
Update Console to 0.2.2 build 0002 — Testing first, activate its license and ensure an available endpoint seat. Agent 0.1.8 keeps heartbeat independent from command-result retries and slow inventory; this Console build also accepts persistent USB protection reports when no USB is attached. Native service installation validation of this Testing release is pending.
For a new Agent, supply the Console address and approve the connection from Console. No enrollment JSON download is needed. The installer needs access to the download server; enrollment and normal operation only need access to your Console. Use a trusted network for IP/HTTP connections: HTTP traffic is not encrypted.
2. Install from the Linux terminal
Run from the non-root account that will own the Agent. Replace http://192.168.1.10 with the address used to open your Console, including its configured port when needed, for example http://192.168.1.10:8080. Copy the complete block:
curl -fLO https://portguard.kamindo.co/downloads/agent/linux/0.1.8/portguard-agent-linux-0.1.8.run &&
curl -fLO https://portguard.kamindo.co/downloads/agent/linux/0.1.8/portguard-agent-linux-0.1.8.run.sha256 &&
sha256sum -c portguard-agent-linux-0.1.8.run.sha256 &&
sh portguard-agent-linux-0.1.8.run --check &&
sudo sh portguard-agent-linux-0.1.8.run --console-url http://192.168.1.10 --allow-insecure-httpIf logged in as root, add --agent-user USER to the final command, replacing USER with an existing non-root account. For HTTPS Console URLs, omit --allow-insecure-http. Each command runs only after the previous command succeeds.
The installer configures the storage helper and Agent service and enables linger so the Agent continues after logout. It prints the installation ID and finishes with awaiting Console approval.
- Open Endpoints → Enroll agents in Console.
- Compare the installation ID with the one printed on the Linux terminal, then approve the matching request. Pending connections do not consume a license seat.
- The Agent retrieves its enrollment configuration automatically after approval and begins authenticated heartbeat. Requests expire after 24 hours; rejection or expiry requires operator recovery.
Upgrade an existing Agent to 0.1.8
Update Console first as described above. Run this complete block from the same Linux user that owns the installed Agent. The saved Console address, identity, license seat and USB policy are preserved. No new enrollment file or approval is required for an already-enrolled device.
curl -fLO https://portguard.kamindo.co/downloads/agent/linux/0.1.8/portguard-agent-linux-0.1.8.run &&
curl -fLO https://portguard.kamindo.co/downloads/agent/linux/0.1.8/portguard-agent-linux-0.1.8.run.sha256 &&
sha256sum -c portguard-agent-linux-0.1.8.run.sha256 &&
sh portguard-agent-linux-0.1.8.run --check &&
sudo sh portguard-agent-linux-0.1.8.run --allow-insecure-httpIf logged in as root, add --agent-user USER to the final command for the existing Agent owner. Remote Agent update from Console is not implemented; run this command on each endpoint.
3. Verify heartbeat and storage control
systemctl --user status portguard-agent.service
systemctl status portguard-storage.service
journalctl --user -u portguard-agent.service --since "5 minutes ago" --no-pagerAfter approval, both services should be active. Confirm repeated heartbeat_accepted events and an Online endpoint in Console for more than one minute. Test Check Status, Block USB Storage and Allow USB Storage with no USB attached; results should complete while heartbeat continues.
Protected means the storage helper has saved Block and will apply it to subsequently attached USB storage. Unprotected means Allow is active or protection is not confirmed. No USB is required to save Block/Allow.
Unmount USB filesystems safely before testing Block with a device; the Agent refuses mounted/busy devices. Block targets USB mass-storage interfaces, including USB HDD/SSD. Keyboard, mouse, internal non-USB disks and native Thunderbolt/NVMe storage are outside this adapter. Hotplug enforcement uses a periodic scan, so a newly attached device can be briefly accessible; a device mounted before enforcement is left attached.
Change the Console address
Replace the example below with the new address, including its configured port. Run as the existing Agent owner. The new address must reach the same Console database/instance; another Console is rejected before enrollment credentials are reused. Identity and seat are preserved.
curl -fLO https://portguard.kamindo.co/downloads/agent/linux/0.1.8/portguard-agent-linux-0.1.8.run &&
curl -fLO https://portguard.kamindo.co/downloads/agent/linux/0.1.8/portguard-agent-linux-0.1.8.run.sha256 &&
sha256sum -c portguard-agent-linux-0.1.8.run.sha256 &&
sh portguard-agent-linux-0.1.8.run --check &&
sudo sh portguard-agent-linux-0.1.8.run --console-url http://192.168.1.20 --allow-insecure-httpFor HTTPS, omit --allow-insecure-http. If logged in as root, add --agent-user USER. If validation fails, restore connectivity to the same Console and retry. A reserved LAN IP or stable hostname avoids repeated manual changes; automatic discovery is not implemented.
Remove the Agent
First restore USB access in Console. From the directory containing the verified 0.1.8 installer downloaded above, run:
sudo sh portguard-agent-linux-0.1.8.run --uninstallIf logged in as root, add --agent-user USER. Removal checks USB restoration and retains identity, policy history, version files and linger configuration. Retire the device in Console to release its seat; an offline Agent still counts. Do not delete state to troubleshoot connectivity.
macOS Agent Testing
Install from Terminal on macOS 14 or later. Separate Apple Silicon and Intel packages include their Python runtime; no browser or dependency download on the endpoint is required after the package is available. Enter the Console address and approve the installation UUID in Console. Pending connections do not consume a seat.
Fresh installations enable USB storage control with initial Allow. Block, Allow and Check Status are available after approval when the helper is ready. Heartbeat and internal disk capacity continue independently. Shared APFS capacity pools count once.
arch="$(uname -m)"
case "$arch" in arm64|x86_64) ;; *) echo 'Unsupported architecture'; exit 1 ;; esac
base='https://portguard.kamindo.co/downloads/agent/macos/0.1.16'
file="PortGuardAgent-0.1.16-macos-${arch}.tar.gz"
curl --fail --location --output "$file" "$base/$file" &&
curl --fail --location --output "$file.sha256" "$base/$file.sha256" &&
shasum -a 256 -c "$file.sha256" &&
tar -xzf "$file" &&
cd "PortGuardAgent-0.1.16-macos-${arch}" &&
sudo ./macos/install.sh install --console-url http://IP-CONSOLE --allow-insecure-httpReplace http://IP-CONSOLE with your Console address. HTTP is not encrypted; use a trusted LAN or valid HTTPS. Add --plan for a preview without installation. Add --telemetry-only to omit USB control; upgrades preserve the existing mode unless --enable-usb-control or --telemetry-only is specified.
Reuse this Mac with a newly installed Console
Use this procedure only when deliberately enrolling into a different Console database. If the Mac is already connected to the intended Console, no reset or reinstall is needed. A fresh Console database has a new identity, even if its IP address is unchanged. Ordinary Agent upgrades and uninstall/reinstall retain the existing Agent identity.
The message New address does not belong to the enrolled Console; existing configuration retained means the target did not match the enrolled Console identity or expected protocol. A successful package checksum does not change that binding. For the same Console with a new IP, keep its database and use the normal installer/address-change flow; do not reset the Agent.
For a genuinely new Console, run the following from the extracted, verified macOS Agent package. Replace http://NEW-CONSOLE-IP with the new Console origin. This stops the existing services and moves the complete active Agent data directory to a private backup before creating a new enrollment. Existing backups are retained.
sudo ./macos/install.sh uninstall &&
backup="/Library/Application Support/PortGuard Agent/data-before-enrollment-$(date +%Y%m%d-%H%M%S)" &&
sudo test ! -e "$backup" &&
sudo mv "/Library/Application Support/PortGuard Agent/data" "$backup" &&
sudo ./macos/install.sh install \
--console-url http://NEW-CONSOLE-IP \
--allow-insecure-http \
--enable-usb-controlIn the new Console → Endpoints → Enroll agents, compare the new installation UUID and select Approve enrollment. Confirm Online heartbeat and the intended Console address. Storage control starts in Allow. A free seat is required in the new Console; the old endpoint and seat are not retired automatically in the old Console. The backup contains credentials and retains its private permissions; do not copy it to another Mac or share it with support.
USB mount control and testing
Block denies new external USB mounts and attempts a normal, safe unmount of USB volumes that are already mounted. Protected is reported only after native completion and verification that no targeted volume remains mounted. If macOS refuses because files or applications are using a drive, the command reports failure: close them and retry Block. Pending or incomplete operations are not reported as verified protection. The Agent never force-unmounts, closes applications, or erases disks. This is mount control, not hardware disablement or prevention of privileged raw disk access. Allow permits mounting; reconnect or use Disk Utility to mount again. Unknown backing and unavailable guard evidence remain unverified.
This Testing release is not Developer ID signed or notarized. Native service lifecycle, reboot, USB/UASP/APFS and Intel execution acceptance remain pending. Test on a spare Mac with a disposable flash drive; do not disable Gatekeeper/SIP. No tray GUI is included. Full terminal guide and team acceptance checklist.
Status and uninstall
sudo launchctl print system/co.kamindo.portguard.agent
sudo launchctl print system/co.kamindo.portguard.mount-guard
# From the extracted package directory:
sudo ./macos/install.sh uninstallUninstall stops mount control and removes services, retaining identity, logs and program files for recovery. Retire the endpoint in Console separately to release its seat.
Windows Agent lifecycle
Install or upgrade
Use the terminal download commands in the Windows tab. Rerun the new installer with the same Console address to upgrade. The installer stops the service and tray before replacing binaries; installation ID, enrolled Agent ID, token, heartbeat sequence, policy and command journal are retained in ProgramData. Do not copy enrolled state into a golden image.
The service starts automatically. The tray starts at sign-in, or open C:\Program Files\PortGuard\PortGuardAgentTray.exe. It shows connection state, installation UUID, last accepted heartbeat and USB policy. Configuration changes require administrator access. HTTP traffic is not encrypted; choose HTTPS only when your Console has valid TLS configured.
Verify the Agent
Get-Service PortGuardAgent
Get-Content "$env:ProgramData\PortGuard\agent-status.json"
& "$env:ProgramFiles\PortGuard\PortGuardAgent.exe" statusBefore approval, expect pending_approval. After approval, check online and the heartbeat timestamp. Heartbeat, command/result handling and disk collection run independently. Disk capacity refreshes about once per minute and includes internal mounted volumes. Temporary network/authentication failures preserve identity; revoked credentials require administrator recovery, not automatic reenrollment.
USB control and limits
Only USB storage identified through USBSTOR or a verified USB parent chain is targeted. Block, Allow and Status report native PnP evidence. A mounted drive can be blocked: Windows performs its normal PnP removal checks. If Windows rejects the operation, close files and applications using that drive and retry. The Agent never forces device removal or automatically reboots. A restart-required response remains unverified until Windows confirms the target state. Hotplug enforcement uses a periodic scan, so this is not a kernel-level guarantee that no access occurs before blocking. USBSTOR flash storage is tested on Windows 10. UASP follows the same verified USB-parent selection and Block/Allow path; physical UASP hardware acceptance is still pending. Internal NVMe/SATA and USB keyboards are excluded.
Change Console address or rotate credentials
Open the tray as administrator and save the new Console origin. An enrolled device checks the pinned Console before accepting an address change. A different Console database needs a deliberate migration; do not delete state to bypass the identity check. To request credential rotation from an elevated terminal:
& "$env:ProgramFiles\PortGuard\PortGuardAgent.exe" rotate-tokenCheck the service status after rotation. The old/new recovery pair remains private until the new token has been verified. Never share ProgramData\PortGuard\private.
Uninstall and reinstall
Use Windows Apps & Features → PortGuard Agent → Uninstall, or run the installed uninstall.exe as administrator. Uninstall first restores USB storage and stops if restoration cannot be verified. Identity is retained for reinstall. Retire the endpoint in Console separately when it should release its seat; uninstall alone does not release it.
Include your Agent package version, endpoint OS, Console Server URL and error message when reporting a problem. Keep passwords and tokens out of shared logs. For server installation or GUI updates, use the Console manual.