Agent Updates
The PatchCTL agent includes a self-update mechanism to ensure you always have the latest features and security fixes.
How Updates Work
- On each heartbeat, the agent reports its current version
- The API compares this with the target version for your fleet
- If an update is available, the API includes the download URL in the response
- The agent downloads and verifies the new binary
- The agent restarts itself with the new version
┌─────────────┐ ┌─────────────┐
│ Agent │ │ API │
│ v1.0.12 │────────►│ │
└─────────────┘ │ "Update │
│ available: │
┌─────────────┐ │ v1.0.13" │
│ Agent │◄────────│ │
│ v1.0.13 │ └─────────────┘
└─────────────┘
Update Notifications
When an update is available, you'll see:
- Dashboard banner - Notification on the Overview page
- Server status - "Update available" indicator
- Agent logs - Update download and installation messages
Automatic Updates
By default, agents update automatically when a new version is released. The update process:
- Downloads new binary to temporary location
- Verifies SHA256 checksum
- Replaces current binary
- Restarts via systemd
Updates typically complete in under 30 seconds with minimal interruption.
Manual Updates
Check Current Version
# Via agent command
/opt/patchctl/bin/patchctl-agent --version
# Via systemd
sudo journalctl -u patchctl | grep "version"
Force Update Check
Restart the agent to trigger an immediate update check:
sudo systemctl restart patchctl
Manual Binary Update
If automatic updates fail, you can update manually:
# Stop the agent
sudo systemctl stop patchctl
# Download new binary (choose your distro variant)
sudo curl -fsSL -o /opt/patchctl/bin/patchctl-agent \
https://downloads.patchctl.com/latest/patchctl-agent-linux-amd64
# Make executable
sudo chmod +x /opt/patchctl/bin/patchctl-agent
# Start the agent
sudo systemctl start patchctl
Version Information
Viewing Version in Dashboard
- Go to Servers
- Click on a server
- View Agent Version in the details panel
Version History
Recent agent versions and their changes are listed in the release notes on the dashboard.
Update Failures
Common Causes
- Network issues - Can't download new binary
- Disk space - Insufficient space for download
- Permissions - Can't write to
/opt/patchctl/bin/ - Checksum mismatch - Download corrupted
Troubleshooting
Check agent logs for update errors:
sudo journalctl -u patchctl | grep -i "update"
Common error messages:
| Error | Solution |
|---|---|
| "Download failed" | Check network connectivity |
| "Checksum mismatch" | Retry update, check for proxy issues |
| "Permission denied" | Verify agent runs as root |
| "No space left" | Free disk space |
Rollback
If an update causes issues:
# Stop the agent
sudo systemctl stop patchctl
# Download previous version (replace VERSION)
sudo curl -fsSL -o /opt/patchctl/bin/patchctl-agent \
https://downloads.patchctl.com/v1.0.12/patchctl-agent-linux-amd64
# Make executable
sudo chmod +x /opt/patchctl/bin/patchctl-agent
# Start the agent
sudo systemctl start patchctl
Disabling Automatic Updates
Disabling automatic updates may leave you vulnerable to security issues.
To disable automatic updates, contact support to configure your fleet settings.