System Service Installation
Install Guard as a system service so it starts automatically on boot, restarts on failure, and runs continuously without manual intervention.Quick Install
install command detects your operating system and creates the appropriate service configuration automatically.
Platform-Specific Details
- macOS (launchd)
- Linux (systemd)
- Windows (Services)
Guard creates a LaunchDaemon plist file:Behavior after installation:
- Starts automatically on boot
- Restarts automatically on abnormal exit
- Logs written to
/var/log/panguard-guard.log
Manual systemd Setup (Advanced)
For full control over the service configuration, follow these steps:Manager Service
The Manager can also be installed as a systemd service for distributed deployments:Watchdog Health Monitoring
The system service includes a built-in watchdog mechanism:- Checks Guard process health every 60 seconds
- Restarts on abnormal memory usage
- Degrades on abnormal CPU usage
- Stops and notifies if restart count exceeds threshold
Batch Deployment Script
Generate a one-line installation script for deploying across multiple machines:- Download Panguard AI
- Install dependencies
- Install as a system service
- Start Guard
Data Directory
| Platform | Default Path |
|---|---|
| macOS | ~/.panguard-guard/ |
| Linux | ~/.panguard-guard/ |
| Windows | %APPDATA%\panguard-guard\ |
--data-dir:
guard.pid— PID file (prevents duplicate instances)baseline/— Behavioral baseline datarules/— Custom ATR ruleslogs/— Event logs (JSONL with rotation)config.json— Guard configuration
PID Management
Guard uses PID files to manage process state:- PID written on startup
- PID file removed on clean shutdown
- Prevents multiple instances from running simultaneously
- Supports graceful shutdown via SIGTERM and SIGINT
Related
Real-Time Protection
Configure Guard for continuous monitoring and response.
Docker Deployment
Run Guard in a containerized environment.
Multi-Endpoint Setup
Connect Guard agents to a centralized Manager.
Environment Variables
Complete environment variable reference.