Docker Deployment
Panguard provides Docker images and Compose configurations for containerized deployments. This guide covers single-container setup, full-stack Compose deployments, and production hardening.Prerequisites
| Requirement | Version |
|---|---|
| Docker | >= 24.0 |
| Docker Compose | >= 2.20 |
Quick Start with Docker
Docker Compose: Basic Setup (API + Ollama)
This configuration runs the Panguard API server with a local Ollama instance for Layer 2 AI analysis at zero cost.Docker Compose: Full Stack (Guard + Ollama + Threat Cloud)
This configuration runs the complete Panguard platform with Guard protection and local AI.Port Reference
| Port | Service | Protocol | Notes |
|---|---|---|---|
3000 | API Server | HTTP | Main entry point |
11434 | Ollama | HTTP | Local AI inference |
2222 | Trap: SSH Honeypot | TCP | Default SSH trap port |
8080 | Trap: HTTP Honeypot | TCP | Default HTTP trap port |
2121 | Trap: FTP Honeypot | TCP | Default FTP trap port |
4450 | Trap: SMB Honeypot | TCP | Default SMB trap port |
3307 | Trap: MySQL Honeypot | TCP | Default MySQL trap port |
3390 | Trap: RDP Honeypot | TCP | Default RDP trap port |
2323 | Trap: Telnet Honeypot | TCP | Default Telnet trap port |
Environment Variables
Guard Agent
| Variable | Default | Description |
|---|---|---|
PANGUARD_DATA_DIR | ./data | Data directory for baselines, logs, rules |
PANGUARD_MODE | learning | Guard mode: learning or protection |
OLLAMA_ENDPOINT | http://localhost:11434 | Ollama API endpoint |
ANTHROPIC_API_KEY | (none) | Claude API key for cloud AI |
OPENAI_API_KEY | (none) | OpenAI API key for cloud AI |
ABUSEIPDB_KEY | (none) | AbuseIPDB API key for threat intel |
API Server
| Variable | Default | Description |
|---|---|---|
PANGUARD_PORT | 3000 | API server port |
Production Hardening
Docker Image Security
The production Docker image includes:- Multi-stage build — Build dependencies are not in the final image
- Non-root user — Runs as
panguard(UID 1001) - tini — Proper PID 1 signal handling and zombie reaping
- Minimal packages — Only
tiniandcurlin the final image
Required Capabilities
For Guard response actions to function inside Docker, grant these capabilities:Checklist
- Set
NODE_ENV=production(enables HSTS, disables wildcard CORS) - Generate strong secrets (
openssl rand -hex 32) - Use TLS termination (nginx/Caddy reverse proxy in front)
- Restrict network access to Manager port
- Mount secrets as env files, not inline environment variables
- Use named volumes for persistent data
- Configure log rotation for container logs
Log Locations (Inside Container)
| Component | Path | Format |
|---|---|---|
| Guard events | /data/events.jsonl | JSONL |
| Guard actions | /data/action-manifest.jsonl | JSONL |
| Guard baseline | /data/baseline.json | JSON |
| Application logs | stdout/stderr | Structured JSON |
Log Rotation
The ReportAgent handles log rotation automatically:| Setting | Default |
|---|---|
| Max file size | 50 MB |
| Max rotated files | 10 |
| Retention | 90 days |
Backup Strategy
Related
System Service
Install Guard as a native systemd/launchd service instead of Docker.
Multi-Endpoint Setup
Connect Guard agents to a centralized Manager.
Threat Cloud
Deploy Threat Cloud alongside your Guard fleet.
Architecture
Full technical architecture of the platform.