Configuration Reference
All NetRecon services are configured through a single .env file located at /opt/netrecon/.env. This page documents every available environment variable.
Core Settings
| Variable | Required | Default | Description |
|---|---|---|---|
NETRECON_DOMAIN | Yes | — | Your domain name (e.g., netrecon.yourcompany.com) |
NETRECON_EMAIL | Yes | — | Admin email for Let's Encrypt and notifications |
Database (PostgreSQL)
| Variable | Required | Default | Description |
|---|---|---|---|
POSTGRES_USER | Yes | — | PostgreSQL username |
POSTGRES_PASSWORD | Yes | — | PostgreSQL password |
POSTGRES_DB | Yes | netrecon | Database name |
DATABASE_URL | Auto | — | Constructed automatically from the above values |
팁
Use a strong, randomly generated password. Generate one with:
openssl rand -base64 24
Cache (Redis)
| Variable | Required | Default | Description |
|---|---|---|---|
REDIS_PASSWORD | Yes | — | Redis authentication password |
REDIS_URL | Auto | — | Constructed automatically |
Authentication
| Variable | Required | Default | Description |
|---|---|---|---|
JWT_SECRET | Yes | — | Secret key for signing JWT tokens (min 32 chars) |
JWT_EXPIRE_MINUTES | No | 1440 | Token expiration time (default: 24 hours) |
Generate a secure JWT secret:
openssl rand -hex 32
Agent Registry
| Variable | Required | Default | Description |
|---|---|---|---|
AGENT_REGISTRY_SECRET | Yes | — | Secret for agent enrollment |
AGENT_JWT_SECRET | Yes | — | JWT secret for agent authentication |
AGENT_TOKEN_EXPIRE_MINUTES | No | 1440 | Agent token expiration |
AGENT_HEARTBEAT_INTERVAL | No | 30 | Heartbeat interval in seconds |
AGENT_HEARTBEAT_TIMEOUT | No | 90 | Seconds before marking agent offline |
Email (SMTP)
| Variable | Required | Default | Description |
|---|---|---|---|
SMTP_HOST | Yes | — | SMTP server hostname |
SMTP_PORT | No | 587 | SMTP port (587 for STARTTLS, 465 for SSL) |
SMTP_USER | Yes | — | SMTP username |
SMTP_PASSWORD | Yes | — | SMTP password |
SMTP_FROM | Yes | — | Sender address (e.g., NetRecon <noreply@yourcompany.com>) |
License
| Variable | Required | Default | Description |
|---|---|---|---|
LICENSE_KEY | Yes | — | Your NetRecon license key |
Contact sales@netreconapp.com to obtain a license key.
Backup Service
| Variable | Required | Default | Description |
|---|---|---|---|
BACKUP_S3_ENDPOINT | No | — | S3-compatible storage endpoint |
BACKUP_S3_BUCKET | No | — | Bucket name for backups |
BACKUP_S3_ACCESS_KEY | No | — | S3 access key |
BACKUP_S3_SECRET_KEY | No | — | S3 secret key |
BACKUP_ENCRYPTION_KEY | No |