DocumentationAgent Action Firewall

Self-Hosting Requirements

Overview

Agent Action Firewall can be self-hosted for maximum control, data sovereignty, and compliance requirements. This guide covers the system requirements for different deployment scenarios.

Minimum Requirements

Development/Testing

ComponentRequirement
CPU2 cores
RAM4 GB
Storage20 GB SSD
OSLinux, macOS, or Windows with WSL2

Production (Small)

For up to 1,000 actions/day:

ComponentRequirement
CPU4 cores
RAM8 GB
Storage50 GB SSD
Network100 Mbps

Production (Medium)

For up to 100,000 actions/day:

ComponentRequirement
CPU8 cores
RAM16 GB
Storage200 GB SSD
Network1 Gbps

Production (Large)

For 100,000+ actions/day:

ComponentRequirement
CPU16+ cores
RAM32+ GB
Storage500+ GB SSD (NVMe recommended)
Network10 Gbps

Software Requirements

Runtime

SoftwareVersionNotes
Node.js20 LTSRequired for API and Worker
PostgreSQL16+Primary database
OPALatestPolicy engine
Redis7+Optional, for caching

Container Runtime (if using Docker/K8s)

SoftwareVersion
Docker Engine24.0+
Docker Compose2.20+
Kubernetes1.28+

Build Tools (for source installation)

SoftwareVersion
pnpm8+
Git2.40+
TypeScript5.7+

Network Requirements

Ports

PortServiceDirection
3001APIInbound
3000Web DashboardInbound
5432PostgreSQLInternal
8181OPAInternal
6379Redis (optional)Internal

Firewall Rules

# Minimum required
Allow TCP 3001 (API)
Allow TCP 3000 (Web)
Allow TCP 443 (HTTPS)

# Internal only
Block external access to 5432 (PostgreSQL)
Block external access to 8181 (OPA)
Block external access to 6379 (Redis)

TLS/SSL

  • Valid TLS certificate required for production
  • Supports Let's Encrypt, commercial CAs, or self-signed for internal use
  • Minimum TLS 1.2, recommended TLS 1.3

Database Requirements

PostgreSQL Configuration

Recommended postgresql.conf settings:

# Memory
shared_buffers = 256MB              # 25% of RAM
effective_cache_size = 768MB        # 75% of RAM
work_mem = 16MB
maintenance_work_mem = 128MB

# Connections
max_connections = 200

# WAL
wal_level = replica
max_wal_senders = 3

# Query planning
random_page_cost = 1.1              # For SSD
effective_io_concurrency = 200      # For SSD

Storage Estimates

Data TypeGrowth RateRetention
Actions~1 KB/action90 days
Audit events~500 B/event1 year
Policies~5 KB/policyIndefinite
Approvals~2 KB/approval90 days

Example: 10,000 actions/day = ~1 GB/month of action data

Scaling Guidelines

Horizontal Scaling

ComponentScaling Strategy
APIStateless, add replicas behind load balancer
WorkerStateless, add replicas for throughput
WebStateless, CDN recommended
PostgreSQLPrimary-replica for reads, connection pooling

Vertical Scaling Triggers

MetricThresholdAction
CPU>70% sustainedAdd cores or instances
Memory>80%Increase RAM
Disk I/O>80%Upgrade to NVMe
DB connections>150Add connection pooler

High Availability

Minimum HA Setup

  • 3 API replicas
  • 2 Worker replicas
  • PostgreSQL primary + 1 replica
  • Load balancer with health checks

Geographic Redundancy

For multi-region deployments:

  • Active-passive database replication
  • DNS-based failover
  • Regional load balancers
  • Cross-region latency: consider <100ms for real-time approvals

Compliance Considerations

Data Residency

All data can be self-hosted within your infrastructure:

  • Database stores all action data
  • Audit logs stored locally
  • No external telemetry by default

Encryption

  • Encryption at rest: PostgreSQL TDE or disk encryption
  • Encryption in transit: TLS 1.2+
  • Encryption key management: ENCRYPTION_MASTER_KEY environment variable

Audit Requirements

  • Tamper-evident audit trail with hash chaining
  • Exportable proof packs for compliance
  • Configurable retention policies