# Port for the proxy server (optional, defaults to 8080) PORT=8080 # SSL/TLS Configuration (optional) # To enable HTTPS, provide paths to both SSL certificate files # If both are provided, the server will run with TLS enabled # SSL_KEY_PATH=/path/to/ssl/key.key # SSL_CERT_PATH=/path/to/ssl/cert.crt # Load-balancing strategy: session (default) # - session: Maintain 5-hour sessions per account LB_STRATEGY=session # Log level: DEBUG | INFO | WARN | ERROR (optional, defaults to INFO) LOG_LEVEL=INFO # Log format: pretty | json (optional, defaults to pretty) # - pretty: Human-readable format with timestamps # - json: Structured JSON logs for log aggregators LOG_FORMAT=pretty # Database configuration (optional) # Data retention days for payload cleanup (default: 3 days) DATA_RETENTION_DAYS=3 # Request retention days for metadata cleanup (default: 90 days) REQUEST_RETENTION_DAYS=90 # Payload encryption at rest (optional) # When set, request/response payloads are encrypted with AES-256-GCM before # being persisted. Existing plaintext rows remain readable. Losing the key # makes encrypted rows unreadable, so back it up alongside the database. # Generate one with: openssl rand -hex 32 # PAYLOAD_ENCRYPTION_KEY= # 64 hex chars (32 bytes / AES-256) # Example of how to use the proxy with your application: # Without SSL: # ANTHROPIC_BASE_URL=http://localhost:8080 # With SSL: # ANTHROPIC_BASE_URL=https://localhost:8080