Configuration Reference
All environment variables and configuration options for self-hosting HookSniff.
Database
| Variable | Default | Description |
|---|---|---|
| DATABASE_URL | — | PostgreSQL connection string (required) |
| REDIS_URL | — | Redis connection string (optional, for rate limiting) |
Server
| Variable | Default | Description |
|---|---|---|
| PORT | 3000 | API server port |
| APP_ENV | development | Environment: development, staging, production |
| RUST_LOG | info | Log level: trace, debug, info, warn, error |
Security
| Variable | Default | Description |
|---|---|---|
| JWT_SECRET | — | Secret for JWT token signing (required, 64+ chars) |
| HMAC_SECRET | — | Global HMAC secret for webhook signing (required) |
| MASTER_API_KEY | — | Admin API key for platform management (optional) |
Webhook Delivery
| Variable | Default | Description |
|---|---|---|
| MAX_PAYLOAD_BYTES | 1048576 | Max webhook payload size (1 MB) |
| DELIVERY_TIMEOUT_SECS | 30 | HTTP delivery timeout |
| MAX_RETRY_ATTEMPTS | 3 | Default max retry attempts |
| WEBHOOK_FORMAT | standard | Webhook format: standard, cloudevents |
| WEBHOOK_TIMESTAMP_TOLERANCE_SECS | 300 | Signature timestamp tolerance (5 min) |
Data Retention
| Variable | Default | Description |
|---|---|---|
| RETENTION_DAYS | 30 | Days to keep delivered events |
| DLQ_RETENTION_DAYS | 30 | Days to keep DLQ entries |
URLs
| Variable | Default | Description |
|---|---|---|
| API_BASE_URL | http://localhost:3000 | API server base URL |
| DASHBOARD_URL | http://localhost:3001 | Dashboard URL |
Example .env
# Database
DATABASE_URL=postgresql://hooksniff:hooksniff@postgres:5432/hooksniff
REDIS_URL=redis://redis:6379
# Server
PORT=3000
APP_ENV=production
RUST_LOG=info
# Security (CHANGE THESE!)
JWT_SECRET=your-64-char-random-hex-string
HMAC_SECRET=your-64-char-random-hex-string
# Webhooks
MAX_PAYLOAD_BYTES=1048576
DELIVERY_TIMEOUT_SECS=30
MAX_RETRY_ATTEMPTS=3
# URLs
API_BASE_URL=https://api.hooksniff.com
DASHBOARD_URL=https://hooksniff.com