Production Deployment
This guide covers best practices for deploying Tollgate in production environments.Configuration Best Practices
Use Config Mode
Always use a configuration file in production:Strict Default Policy
Start with deny-by-default:Always Include Catch-All
Every server should have a catch-all policy:Failure Modes
Configure appropriate failure behavior:| Mode | Behavior | Use Case |
|---|---|---|
fail-closed | Deny all on failure | Production (default) |
fail-readonly | Allow reads only | Semi-trusted environments |
fail-open | Allow all | Development only |
Audit Logging
Configure Persistent Storage
Regular Exports
Schedule regular exports for compliance:SIEM Integration
Forward to your security information system:Process Management
Systemd Service
Create/etc/systemd/system/tollgate-postgres.service:
Docker Deployment
Security Hardening
Environment Variables
Never hardcode secrets in config:File Permissions
Network Isolation
Run Tollgate in a network namespace or container with limited egress.Monitoring
Health Checks
Monitor the Tollgate process:Metrics to Track
- Approval rate (high denial rate may indicate misconfiguration)
- Response times (slow approvals affect user experience)
- Error rate (parsing failures may indicate attacks)
Alerting
Set up alerts for:- Process crashes (via systemd or container orchestrator)
- High denial rates
- Dangerous operations attempted
- Parsing failures (may indicate injection attempts)
Backup and Recovery
Audit Database Backup
Configuration Versioning
Store configuration in version control:Scaling
Multiple Servers
Run separate Tollgate instances per MCP server:High Availability
For HA deployments:- Run multiple Tollgate instances behind a load balancer
- Use shared audit database (network SQLite or PostgreSQL)
- Configure health checks for each instance