Windows Installation
Complete guide for installing the CastellanAI Agent on Windows.
For most users, the interactive installer is the fastest way to get started. Just download, run as Administrator, and enter your credentials.
Prerequisites
Before installing, ensure you have:
- Windows 10 (version 1809 or later) or Windows Server 2019+
- Administrator privileges
- Network access to Worker API (outbound HTTPS on port 443)
Download
- Log in to the Customer Portal
- Navigate to Agents → Download
- Select Windows and download the installer
Installation Methods
- 🖱️ Interactive Installer
- ⚙️ Silent Installation
- 🔧 Manual Installation
Interactive Installer
The easiest method for individual installations.
- Run
CastellanAgent-Setup.exeas Administrator - Follow the installation wizard
- Enter your Customer ID when prompted
- Enter the Hub URL (Worker API endpoint)
- Click Install
Right-click the installer and select "Run as administrator" to ensure proper installation.
Silent Installation
For automated deployments and scripting.
CastellanAgent-Setup.exe /S /CUSTOMERID="your-customer-id" /HUBURL="https://api.castellanai.com/hubs/agent-communication"
Parameters:
| Parameter | Description |
|---|---|
/S | Silent mode (no UI) |
/CUSTOMERID | Your unique customer identifier |
/HUBURL | Worker API endpoint URL |
Use Group Policy, SCCM, or other deployment tools to push the silent installer across your organization.
Manual Service Installation
For advanced deployments or custom configurations.
# 1. Copy agent files to installation directory
$installDir = "C:\Program Files\CastellanAgent"
New-Item -ItemType Directory -Path $installDir -Force
# 2. Extract agent files to $installDir
# (Copy Castellan.Agent.exe and dependencies)
# 3. Install as Windows Service
sc.exe create "CastellanAgent" binPath="$installDir\Castellan.Agent.exe"
sc.exe config "CastellanAgent" start=auto
sc.exe description "CastellanAgent" "CastellanAI Security Agent"
# 4. Start the service
sc.exe start "CastellanAgent"
Configuration
Configuration file location: C:\Program Files\CastellanAgent\appsettings.json
{
"AgentSettings": {
"CustomerId": "your-customer-id",
"HubUrl": "https://api.castellanai.com/hubs/agent-communication"
}
}
The configuration file contains sensitive credentials. Ensure it has appropriate file system permissions (readable only by SYSTEM and Administrators).
Verify Installation
- Check Service
- View Logs
- Check Portal
# Check service status
Get-Service CastellanAgent
# Expected output:
# Status Name DisplayName
# ------ ---- -----------
# Running CastellanAgent CastellanAI Agent
# View recent logs
Get-Content "$env:LOCALAPPDATA\CastellanAgent\logs\*.log" -Tail 50
# Or check Event Viewer
# Event Viewer → Applications and Services Logs → CastellanAgent
- Log in to the Customer Portal
- Navigate to Agents
- Your new agent should appear with Connected status (green dot)
Uninstallation
🗑️ How to Uninstall
# Stop and remove service
sc.exe stop CastellanAgent
sc.exe delete CastellanAgent
# Remove installation directory
Remove-Item "C:\Program Files\CastellanAgent" -Recurse -Force
# Remove log directory (optional)
Remove-Item "$env:LOCALAPPDATA\CastellanAgent" -Recurse -Force
Or use Add/Remove Programs in Windows Settings if installed via the interactive installer.
Troubleshooting
❌ Service won't start
- Check Event Viewer for error messages
- Verify configuration file exists and has valid JSON
- Run manually to see errors:
& "C:\Program Files\CastellanAgent\Castellan.Agent.exe"
🔌 Agent not appearing in Portal
- Check service is running:
Get-Service CastellanAgent - Test network connectivity:
Test-NetConnection -ComputerName api.castellanai.com -Port 443 - Verify credentials in
appsettings.json
🛡️ Antivirus blocking installation
Add these paths to your antivirus exclusions:
C:\Program Files\CastellanAgent\%LOCALAPPDATA%\CastellanAgent\
What's Next?
| Guide | Description |
|---|---|
| Configuration | Advanced agent configuration options |
| Health Monitoring | Monitor agent status and performance |
| Troubleshooting | Resolve common issues |
See Common Issues for help with installation problems.