Ga naar hoofdinhoud

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

VariableRequiredDefaultDescription
NETRECON_DOMAINYesYour domain name (e.g., netrecon.yourcompany.com)
NETRECON_EMAILYesAdmin email for Let's Encrypt and notifications

Database (PostgreSQL)

VariableRequiredDefaultDescription
POSTGRES_USERYesPostgreSQL username
POSTGRES_PASSWORDYesPostgreSQL password
POSTGRES_DBYesnetreconDatabase name
DATABASE_URLAutoConstructed automatically from the above values
tip

Use a strong, randomly generated password. Generate one with:

openssl rand -base64 24

Cache (Redis)

VariableRequiredDefaultDescription
REDIS_PASSWORDYesRedis authentication password
REDIS_URLAutoConstructed automatically

Authentication

VariableRequiredDefaultDescription
JWT_SECRETYesSecret key for signing JWT tokens (min 32 chars)
JWT_EXPIRE_MINUTESNo1440Token expiration time (default: 24 hours)

Generate a secure JWT secret:

openssl rand -hex 32

Agent Registry

VariableRequiredDefaultDescription
AGENT_REGISTRY_SECRETYesSecret for agent enrollment
AGENT_JWT_SECRETYesJWT secret for agent authentication
AGENT_TOKEN_EXPIRE_MINUTESNo1440Agent token expiration
AGENT_HEARTBEAT_INTERVALNo30Heartbeat interval in seconds
AGENT_HEARTBEAT_TIMEOUTNo90Seconds before marking agent offline

Email (SMTP)

VariableRequiredDefaultDescription
SMTP_HOSTYesSMTP server hostname
SMTP_PORTNo587SMTP port (587 for STARTTLS, 465 for SSL)
SMTP_USERYesSMTP username
SMTP_PASSWORDYesSMTP password
SMTP_FROMYesSender address (e.g., NetRecon <noreply@yourcompany.com>)

License

VariableRequiredDefaultDescription
LICENSE_KEYYesYour NetRecon license key

Contact sales@netreconapp.com to obtain a license key.

Backup Service

VariableRequiredDefaultDescription
BACKUP_S3_ENDPOINTNoS3-compatible storage endpoint
BACKUP_S3_BUCKETNoBucket name for backups
BACKUP_S3_ACCESS_KEYNoS3 access key
BACKUP_S3_SECRET_KEYNoS3 secret key
BACKUP_ENCRYPTION_KEYNoAES-256-GCM encryption key for backups
BACKUP_RETENTION_DAYSNo30Days to retain backup files

Notifications

VariableRequiredDefaultDescription
TELEGRAM_BOT_TOKENNoTelegram bot token for alerts
TELEGRAM_CHAT_IDNoTelegram chat ID for alert delivery

Example .env File

# Core
NETRECON_DOMAIN=netrecon.yourcompany.com
NETRECON_EMAIL=admin@yourcompany.com

# PostgreSQL
POSTGRES_USER=netrecon
POSTGRES_PASSWORD=xK9mP2vL8nQ4wR7j
POSTGRES_DB=netrecon

# Redis
REDIS_PASSWORD=hT6yN3bF9cM1pW5s

# Authentication
JWT_SECRET=a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2

# Agent Registry
AGENT_REGISTRY_SECRET=r8s9t0u1v2w3x4y5z6a7b8c9d0e1f2g3
AGENT_JWT_SECRET=h4i5j6k7l8m9n0o1p2q3r4s5t6u7v8w9

# Email
SMTP_HOST=smtp.yourcompany.com
SMTP_PORT=587
SMTP_USER=noreply@yourcompany.com
SMTP_PASSWORD=your-smtp-password
SMTP_FROM=NetRecon <noreply@yourcompany.com>

# License
LICENSE_KEY=your-license-key
waarschuwing

Never commit the .env file to version control. All values shown above are examples — replace them with your own secure values before deploying.

Applying Configuration Changes

After modifying the .env file, restart the affected services:

cd /opt/netrecon

# Restart all services
docker compose down && docker compose up -d

# Or restart a specific service
docker compose restart api-gateway

Service Ports

All services run behind the Nginx reverse proxy on ports 80/443. Internal service ports are not exposed by default:

ServiceInternal PortDescription
API Gateway8000Main API endpoint
Vault Server8001Secrets management
License Server8002License validation
Email Service8003SMTP relay
Notification Service8004Push notifications and alerts
Update Server8005Agent and probe updates
Agent Registry8006Agent enrollment and management
Warranty Service8007Hardware warranty lookups
CMod Service8008Configuration management
IPAM Service8009IP address management

To expose a service port directly (not recommended for production), add it to the service's ports mapping in docker-compose.yml.

For help, contact support@netreconapp.com.