Przejdź do głównej treści

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_DOMAINYes—Your domain name (e.g., netrecon.yourcompany.com)
NETRECON_EMAILYes—Admin email for Let's Encrypt and notifications

Database (PostgreSQL)​

VariableRequiredDefaultDescription
POSTGRES_USERYes—PostgreSQL username
POSTGRES_PASSWORDYes—PostgreSQL password
POSTGRES_DBYesnetreconDatabase name
DATABASE_URLAuto—Constructed automatically from the above values
wskazówka

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

openssl rand -base64 24

Cache (Redis)​

VariableRequiredDefaultDescription
REDIS_PASSWORDYes—Redis authentication password
REDIS_URLAuto—Constructed automatically

Authentication​

VariableRequiredDefaultDescription
JWT_SECRETYes—Secret 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_SECRETYes—Secret for agent enrollment
AGENT_JWT_SECRETYes—JWT 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_HOSTYes—SMTP server hostname
SMTP_PORTNo587SMTP port (587 for STARTTLS, 465 for SSL)
SMTP_USERYes—SMTP username
SMTP_PASSWORDYes—SMTP password
SMTP_FROMYes—Sender address (e.g., NetRecon <noreply@yourcompany.com>)

License​

VariableRequiredDefaultDescription
LICENSE_KEYYes—Your NetRecon license key

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

Backup Service​

VariableRequiredDefaultDescription
BACKUP_S3_ENDPOINTNo—S3-compatible storage endpoint
BACKUP_S3_BUCKETNo—Bucket name for backups
BACKUP_S3_ACCESS_KEYNo—S3 access key
BACKUP_S3_SECRET_KEYNo—S3 secret key
BACKUP_ENCRYPTION_KEYNo—AES-256-GCM encryption key for backups
BACKUP_RETENTION_DAYSNo30Days to retain backup files

Notifications​

VariableRequiredDefaultDescription
TELEGRAM_BOT_TOKENNo—Telegram bot token for alerts
TELEGRAM_CHAT_IDNo—Telegram 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
ostrzeżenie

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.