Skip to Content
DeploymentEnvironment Variables

Environment Variables

Complete reference of all environment variables for configuring Expunct.

Required

VariableDescriptionExample
DATABASE_URLDatabase connection stringpostgresql+asyncpg://user:pass@host:5432/db
API_KEY_SECRETSecret for hashing API keys (32+ characters)Random string via openssl rand -hex 32

Optional — General

VariableDescriptionDefault
HOSTBind address0.0.0.0
PORTBind port8000
LOG_LEVELLogging level (debug, info, warning, error)info
LOG_FORMATLog format (json or text)json
CORS_ORIGINSAllowed CORS origins (comma-separated or *)*
MAX_UPLOAD_SIZE_MBMaximum file upload size in megabytes100
JOB_RETENTION_DAYSNumber of days to keep completed jobs before cleanup7

Optional — Security

VariableDescriptionDefault
ENCRYPTION_KEYFernet key for credential encryptionAuto-generated
RATE_LIMIT_PER_MINUTERate limit per API key per minute100
DB_API_KEY_AUTHEnable database-backed API key authenticationtrue

Optional — Processing

VariableDescriptionDefault
OCR_LANGDefault OCR language codeen
CONFIDENCE_THRESHOLDDefault detection confidence threshold (0.0-1.0)0.5
LLM_DETECTION_ENABLEDEnable LLM-based named entity recognitionfalse
LLM_ENDPOINTLLM API endpoint for NER detection
LLM_MODELLLM model name for NER detection

Optional — Integrations

VariableDescriptionDefault
STRIPE_SECRET_KEYStripe API key for billing integration
STRIPE_WEBHOOK_SECRETStripe webhook signing secret
STRIPE_SUCCESS_URLCheckout success redirect URL
STRIPE_CANCEL_URLCheckout cancel redirect URL
OTEL_EXPORTER_OTLP_ENDPOINTOpenTelemetry collector endpoint for tracing
OTEL_SERVICE_NAMEService name for OpenTelemetry tracingpii-redactor

Setting Variables

Docker:

docker run -e DATABASE_URL=... -e API_KEY_SECRET=... ghcr.io/uni-qingzhuo-zhen/pii-redactor:latest

Docker Compose — Use an .env file:

DATABASE_URL=postgresql+asyncpg://pii:secret@db:5432/pii_redactor API_KEY_SECRET=your-secret-key ENCRYPTION_KEY=your-fernet-key

Kubernetes — Use Secrets and ConfigMaps. See the Kubernetes deployment guide for details.