Agent Updates
Keep your CastellanAI agents up-to-date with the latest security features, performance improvements, and bug fixes.
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.
Windows Update
# Stop the service
Stop-Service "Castellan Agent"
# Download and run the latest installer
# (Get installer from Portal or your deployment system)
# Verify the new version
castellan-agent version
# Start the service
Start-Service "Castellan Agent"
Linux Update
# Stop the service
sudo systemctl stop castellan-agent
# Install the new version (preserves enrollment)
# Method depends on your deployment:
# - Package manager: sudo apt upgrade castellan-agent
# - Manual: Download and extract new binary
# Verify the new version
castellan-agent version
# Start the service
sudo systemctl start castellan-agent
macOS Update
# Stop the service
sudo launchctl unload /Library/LaunchDaemons/com.castellanai.agent.plist
# Install the new package
# (Download from Portal or deployment system)
sudo installer -pkg castellan-agent-latest.pkg -target /
# Verify the new version
castellan-agent version
# Start the service
sudo launchctl load /Library/LaunchDaemons/com.castellanai.agent.plist
Enrollment Preservation
When updating an agent:
- Credentials are preserved - The agent remains enrolled with your account
- Configuration is maintained - Settings carry over to the new version
- No re-enrollment required - Just update and restart
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:
- Agent shows Connected status (green dot)
- Version column shows the new version
- Events are being collected (Events Today increasing)
4. Check Logs
Review logs for any errors after the update:
Windows:
C:\ProgramData\CastellanAI\logs\agent.log
Linux:
sudo journalctl -u castellan-agent -n 50
macOS:
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
curl -v https://api.castellanai.com
# Windows
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
Update Best Practices
- 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
What's Next?
- Agent Health Monitoring - Monitor agent status and performance
- Agent Troubleshooting - Resolve common agent issues
- Support - Get help from our support team