Usage
Flags
HTTP API listen port. Use
0 for SDK-only mode (no HTTP server).Bind address. Empty = all interfaces. Use
127.0.0.1 to bind localhost only.Runtime mode:
enforce, monitor, or disabledDirectory for audit logs (JSONL files)
Directory of additional policy YAML files (merged with
--config)How often to re-read policy files.
0 = disabled (fsnotify handles hot-reload)How long approvals stay pending before expiring
Syslog server address (e.g.
localhost:514)Use CEF format. With
--syslog: CEF over syslog. Standalone: write ~/.rampart/audit/cef.logBase URL for approval resolve links (e.g.
https://rampart.example.com:9090)Path to HMAC signing key for resolve URLs (auto-generated if missing)
Enable Prometheus metrics endpoint on
/metricsRun in background and write logs to
~/.rampart/serve.logSubcommands
install
rampart serve as a boot service (systemd on Linux, launchd on macOS). Auto-generates and persists a bearer token to ~/.rampart/token.
What it does:
- Creates systemd user service or LaunchAgent
- Generates and saves token to
~/.rampart/token - Starts and enables the service
- Defaults to port 9090
stop
--background by reading the PID from ~/.rampart/serve.pid and sending SIGTERM.
Examples
Foreground mode
Background mode
Service installation
SIEM integration
Custom approval timeout
API endpoints
When running, serve exposes an HTTP API:Tool evaluation
Approvals
Health
Dashboard
Output
Startup (foreground)
Startup (background)
Policy loading
Serve loads policies from multiple sources (merged in order):--configfile (default:rampart.yaml)--config-dirdirectory (default:~/.rampart/policies/)- Embedded standard policy (fallback if no files found)
--reload-interval is set.
Token management
Serve auto-generates a bearer token on first run: Priority (highest to lowest):RAMPART_TOKENenv var~/.rampart/tokenfile (persisted byserve install)- Auto-generated (saved to
~/.rampart/token)
Audit output
Serve writes audit events to:- JSONL -
~/.rampart/audit/audit-hook-YYYY-MM-DD.jsonl(daily files) - Syslog - if
--syslogis set (RFC 5424 or CEF format) - CEF file -
~/.rampart/audit/cef.logif--cefis set without--syslog
Dashboard
The web dashboard (http://localhost:9090/dashboard/) provides:- Active tab - Live stream of tool calls, approve/deny queued requests
- History tab - Browse past tool calls with filtering
- Policy tab - View loaded rules, test commands with REPL
Troubleshooting
Port already in use
Policy file not found
Token file not readable
Exit codes
0- Clean shutdown1- Startup or runtime error
See also
- rampart quickstart - Automated installation
- rampart token - Token management
- rampart policy - Policy commands
- rampart audit - Audit commands