########################################################################### # # # Technitium DNS Companion Configuration File # # # # Copy this file to .env and edit the variables as needed. # # # ########################################################################### ### Minimal working configuration - only 2 variables per node for clusters! ### ## Node Name Configuration - REQUIRED # # Node names within this companion app do NOT have to match what you have # configured on your Technitium DNS nodes, but it's recommended to keep # them consistent for easier identification. # # Note: Node names here are independent from Technitium DNS cluster # node names. TECHNITIUM_NODES=node1,node2 ## API Token Configuration - REQUIRED # # How to generate an API token: # 1. Access Technitium DNS web interface # 2. Go to: Administration -> Sessions -> Create Token # 3. Select 'admin' user for full permissions # 4. Copy the generated token # # ⚠️ Warning: Keep your API tokens secure! They provide full admin access. # # For CLUSTERED nodes (recommended): Use TECHNITIUM_CLUSTER_TOKEN # When you create an API token on any node in a Technitium DNS cluster, # that token is automatically valid for ALL nodes in the cluster. # # Simply create the token once on your primary node and use it here: TECHNITIUM_CLUSTER_TOKEN=your-shared-cluster-token # For NON-CLUSTERED or MIXED environments: Use per-node tokens # If you have standalone nodes or need different tokens per node, # you can still use the per-node format (see advanced examples below). ## Base URL for each node - REQUIRED # # For BASE_URL, use the URL including port number that you use to access # the Technitium DNS web interface. # # Default Technitium DNS ports: # HTTP: 5380 # HTTPS: 53443 # # Variable Key Format: # TECHNITIUM__BASE_URL=http://192.168.1.10:5380 # # Simple cluster example (2 nodes, 1 shared token): TECHNITIUM_NODE1_BASE_URL=http://192.168.1.10:5380 TECHNITIUM_NODE2_BASE_URL=http://192.168.1.11:5380 # Advanced: Override token for a specific node (optional) # If one node needs a different token, you can override the cluster token: # TECHNITIUM_NODE2_TOKEN=different-token-for-node2 # Legacy format (non-clustered or all nodes have different tokens): # You can still use per-node tokens if you don't set TECHNITIUM_CLUSTER_TOKEN # TECHNITIUM_NODE1_TOKEN=token-for-node1 # TECHNITIUM_NODE2_TOKEN=token-for-node2 ## Node display names (defaults to node ID if not set) - OPTIONAL # TECHNITIUM_NODE1_NAME="Primary Server" # TECHNITIUM_NODE2_NAME="Secondary Server" ## HTTPS for >Companion< backend API - OPTIONAL ## Backend API defaults to HTTP on port 3000 if these are not set # HTTPS_ENABLED=true # HTTPS_PORT=3443 # HTTPS_CERT_PATH=/path/to/fullchain.pem # HTTPS_KEY_PATH=/path/to/privkey.pem # HTTPS_CA_PATH=/path/to/ca.pem # Optional, for self-signed certs ## >Companion< Custom query logger - OPTIONAL ## Only if using custom logger app # TECHNITIUM_NODE1_QUERY_LOGGER_APP_NAME=MySQLLogger # TECHNITIUM_NODE1_QUERY_LOGGER_CLASS_PATH=MySQLLogger.Logger ## Cache directory - OPTIONAL (for domain lists caching) ## Defaults to /data/domain-lists-cache # CACHE_DIR=/custom/cache/path ## CORS - OPTIONAL (only needed for cross-origin development) # CORS_ORIGINS=https://localhost:5174,https://example.com