Agent Updates
Keep your CastellanAI agents up-to-date with the latest security features, performance improvements, and bug fixes.
Regular updates ensure you have the latest threat detection capabilities, performance improvements, and security patches.
Checking Agent Versions
In the Portal
View agent versions from the Customer Portal:
- Log in to your Customer Portal
- Click Agents in the header navigation
- The Version column shows each agent's installed version
Compare versions across your fleet to identify agents that need updating.
On the Endpoint
Check the installed version directly on any endpoint:
castellan-agent version
This displays:
- Agent version number
- Platform (Windows, Linux, or macOS)
- Runtime version
Updating Agents
Currently, agents are updated by reinstalling the latest version. The agent preserves its enrollment during the update process.
When updating an agent, credentials and configuration are preserved. No re-enrollment is required.
- Windows
- Linux
- macOS
Windows Update
# 1. Stop the service
Stop-Service "Castellan Agent"
# 2. Download and run the latest installer
# (Get installer from Portal or your deployment system)
# 3. Verify the new version
castellan-agent version
# 4. Start the service
Start-Service "Castellan Agent"
Use Group Policy, SCCM, or other deployment tools to push updates across your organization.
Linux Update
# 1. Stop the service
sudo systemctl stop castellan-agent
# 2. Install the new version (preserves enrollment)
# Debian/Ubuntu:
sudo dpkg -i castellan-agent_NEW_VERSION_amd64.deb
# RHEL/CentOS:
sudo rpm -U castellan-agent-NEW_VERSION.x86_64.rpm
# 3. Verify the new version
castellan-agent version
# 4. Start the service
sudo systemctl start castellan-agent
macOS Update
# 1. Stop the service
sudo launchctl unload /Library/LaunchDaemons/com.castellanai.agent.plist
# 2. Install the new package
sudo installer -pkg castellan-agent-latest.pkg -target /
# 3. Verify the new version
castellan-agent version
# 4. Start the service
sudo launchctl load /Library/LaunchDaemons/com.castellanai.agent.plist
Enrollment Preservation
When updating an agent:
| What's Preserved | What's Updated |
|---|---|
| ✅ Credentials (Customer ID, API key) | ✅ Agent binary |
| ✅ Configuration settings | ✅ Dependencies |
| ✅ Enrollment status | ✅ Feature capabilities |
If you need to re-enroll for any reason:
castellan-agent enroll --token YOUR_TOKEN --portal-url https://api.castellanai.com --force
Post-Update Verification
After updating, verify the agent is working correctly:
1. Check Version
castellan-agent version
Confirm the version matches the expected update.
2. Check Status
castellan-agent status
Verify the agent shows as enrolled with correct credentials.
3. Check Portal
In the Customer Portal, verify:
| Check | Expected |
|---|---|
| Agent status | Connected (green dot) |
| Version column | New version number |
| Events Today | Increasing (events being collected) |
4. Check Logs
Review logs for any errors after the update:
- Windows
- Linux
- macOS
Get-Content "C:\ProgramData\CastellanAI\logs\agent.log" -Tail 50
sudo journalctl -u castellan-agent -n 50
sudo tail -f /Library/Logs/CastellanAI/agent.log
Update Troubleshooting
❌ Agent Won't Start After Update
- Check that the service is installed correctly
- Review agent logs for startup errors
- Verify configuration file wasn't corrupted
- Try running manually to see errors:
castellan-agent run
🔌 Agent Shows Disconnected After Update
- Verify network connectivity to CastellanAI servers
- Check firewall rules for port 443 (HTTPS)
- Test connectivity:
- Linux/macOS
- Windows
curl -v https://api.castellanai.com
Test-NetConnection -ComputerName api.castellanai.com -Port 443
📋 Version Didn't Change
- Ensure you stopped the old service before updating
- Verify you installed to the correct location
- Check for multiple installations that may conflict
- Completely uninstall and reinstall if needed
Update Best Practices
Follow these guidelines for smooth agent updates.
| Practice | Description |
|---|---|
| Update Regularly | Apply updates within 7 days of release for security patches |
| Test First | Update a non-critical agent first to verify compatibility |
| Monitor After Update | Watch the Portal for any issues after updating |
| Keep Records | Document which versions are deployed where |
| Use Automation | Consider using configuration management (Ansible, Puppet, etc.) for large deployments |
Update Frequency
| Update Type | Recommendation |
|---|---|
| Security patches | Apply immediately (within 24-48 hours) |
| Bug fixes | Apply within 7 days |
| Feature updates | Apply within 30 days |
What's Next?
| Guide | Description |
|---|---|
| Agent Health Monitoring | Monitor agent status and performance |
| Agent Troubleshooting | Resolve common agent issues |
| Support | Get help from our support team |