Configuration

Customize NexoralDNS to fit your needs. Most settings can be configured through the dashboard or environment variables.

đŸ–Ĩī¸

Dashboard

Most settings can be configured directly from the web dashboard at localhost:4000. Changes take effect immediately.

âš™ī¸

Environment Variables

For advanced users, configure NexoralDNS via environment variables in the Docker Compose file or .env file.

🌐DNS Settings

Upstream DNS Providers

Configure which DNS servers to use for resolving external domains. NexoralDNS forwards queries it can't resolve locally to these providers.

Cloudflare1.1.1.1

Fast & privacy-focused

Google8.8.8.8

Reliable & fast

Quad99.9.9.9

Security-focused

OpenDNS208.67.222.222

Family-friendly options

Configure in Dashboard → Settings → DNS Providers

DNS Port

By default, NexoralDNS listens on port 53 (standard DNS port). You can change this if needed.

DNS_PORT=53

âš ī¸ Changing from port 53 requires additional router configuration.

Cache Settings

Control how long DNS responses are cached. Longer TTL = fewer upstream queries, but slower updates.

Default TTL300 seconds (5 min)
Max Cache Size10,000 entries
Negative Cache TTL60 seconds

🔧Environment Variables

VariableDefaultDescription
DNS_PORT53Port for DNS server
WEB_PORT4000Port for web dashboard
UPSTREAM_DNS1.1.1.1Primary upstream DNS
CACHE_TTL300Default cache TTL in seconds
LOG_LEVELinfoLogging level (debug, info, warn, error)
REDIS_URLredis://localhost:6379Redis connection URL
DB_PATH/data/nexoraldns.dbDatabase file path
ENABLE_ANALYTICStrueEnable query analytics

đŸŗDocker Compose Example

Customize your deployment by modifying the Docker Compose file:

version: '3.8'
services:
  nexoraldns:
    image: nexoral/nexoraldns:latest
    ports:
      - "53:53/udp"
      - "53:53/tcp"
      - "4000:4000"
    environment:
      - UPSTREAM_DNS=1.1.1.1
      - CACHE_TTL=300
      - LOG_LEVEL=info
      - ENABLE_ANALYTICS=true
    volumes:
      - nexoraldns-data:/data
    restart: unless-stopped

volumes:
  nexoraldns-data:

🔒Security Settings

Dashboard Authentication

The dashboard is protected by authentication. Change the default password immediately after installation via Dashboard → Settings → Security.

API Authentication

API requests require an API key. Generate keys in Dashboard → Settings → API Keys. Use the key in the Authorization header.

Rate Limiting

Enable rate limiting to prevent DNS amplification attacks. Configure max queries per IP in Dashboard → Settings → Security.

💡Pro Tips

  • â€ĸBack up your configuration before making major changes
  • â€ĸUse multiple upstream DNS providers for redundancy
  • â€ĸMonitor query logs after configuration changes to ensure everything works
  • â€ĸKeep your NexoralDNS installation updated for security patches