macOS Installation
Complete guide for installing the CastellanAI Agent on macOS.
Install using the package installer and grant Full Disk Access to enable complete security monitoring.
Prerequisites
Before installing, ensure you have:
- macOS 12 (Monterey) or later
- Apple Silicon or Intel processor
- Administrator access
- Network access to Worker API (outbound HTTPS on port 443)
Download
- Log in to the Customer Portal
- Navigate to Agents → Download
- Select macOS and download the
.pkginstaller
Installation
- 📦 Package Installer
- 🍺 Homebrew
Package Installer
sudo installer -pkg CastellanAgent.pkg -target /
Or double-click the .pkg file and follow the installation wizard.
If you see "CastellanAgent.pkg cannot be opened", right-click the file and select Open to bypass Gatekeeper.
Homebrew Installation (Coming Soon)
# Add CastellanAI tap
brew tap castellanai/tap
# Install the agent
brew install castellan-agent
Homebrew installation will be available after initial launch.
Grant Full Disk Access
The agent requires Full Disk Access to monitor security events. Without this permission, the agent cannot read system logs.
- Open System Preferences (or System Settings on macOS 13+)
- Navigate to Security & Privacy → Privacy → Full Disk Access
- Click the lock icon and authenticate
- Click + and add
/Library/Application Support/CastellanAgent/Castellan.Agent - Ensure the checkbox is enabled
📸 Step-by-step with screenshots
-
Open System Preferences:
- Click the Apple menu → System Preferences
- Or use Spotlight:
Cmd + Space, type "Security"
-
Navigate to Full Disk Access:
- Click Security & Privacy
- Select the Privacy tab
- Select Full Disk Access in the left sidebar
-
Add the Agent:
- Click the lock icon (bottom left) and enter your password
- Click the + button
- Navigate to
/Library/Application Support/CastellanAgent/ - Select
Castellan.Agentand click Open
-
Verify:
- Ensure the checkbox next to
Castellan.Agentis checked
- Ensure the checkbox next to
Configuration
Edit the configuration file:
sudo nano /Library/Application\ Support/CastellanAgent/appsettings.json
{
"AgentSettings": {
"CustomerId": "your-customer-id",
"HubUrl": "https://api.castellanai.com/hubs/agent-communication"
}
}
Start the Service
The agent runs as a launchd service:
# Load and start the service
sudo launchctl load /Library/LaunchDaemons/com.castellanai.agent.plist
# The service starts automatically on boot
Verify Installation
- Check Service
- View Logs
- Agent CLI
# Check if service is running
sudo launchctl list | grep castellan
# Expected output shows PID and status:
# 12345 0 com.castellanai.agent
# View real-time logs
tail -f ~/Library/Logs/CastellanAgent/agent.log
# Or use Console.app
# Console → Search for "CastellanAgent"
# Or use log command
sudo log show --predicate 'process == "CastellanAgent"' --last 1h
# Check agent status
castellan-agent status
# Check version
castellan-agent version
Uninstallation
🗑️ How to Uninstall
# Stop and unload the service
sudo launchctl unload /Library/LaunchDaemons/com.castellanai.agent.plist
# Remove application files
sudo rm -rf /Library/Application\ Support/CastellanAgent
# Remove launch daemon
sudo rm /Library/LaunchDaemons/com.castellanai.agent.plist
# Remove logs (optional)
rm -rf ~/Library/Logs/CastellanAgent
Troubleshooting
❌ Service won't start
-
Check launchd errors:
sudo launchctl error com.castellanai.agent -
Run manually to see errors:
/Library/Application\ Support/CastellanAgent/Castellan.Agent -
Check Console.app for crash reports
🔒 Permission denied errors
Full Disk Access is required. Verify the agent has FDA:
- Go to System Preferences → Security & Privacy → Privacy → Full Disk Access
- Ensure
Castellan.Agentis listed and checked - If not present, add it manually
After granting FDA, restart the service:
sudo launchctl unload /Library/LaunchDaemons/com.castellanai.agent.plist
sudo launchctl load /Library/LaunchDaemons/com.castellanai.agent.plist
🔌 Agent not connecting
-
Test network connectivity:
curl -v https://api.castellanai.com -
Check for proxy settings:
echo $http_proxy $https_proxy -
Verify DNS:
nslookup api.castellanai.com
🛡️ Gatekeeper blocking installation
If you see "cannot be opened because it is from an unidentified developer":
- Right-click the
.pkgfile - Select Open from the context menu
- Click Open in the dialog
Or temporarily allow from anywhere:
sudo spctl --master-disable
# Install the agent
sudo spctl --master-enable
What's Next?
| Guide | Description |
|---|---|
| Configuration | Advanced agent configuration options |
| Health Monitoring | Monitor agent status and performance |
| Troubleshooting | Resolve common issues |