Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
110 lines (94 loc) · 5.42 KB
/
Copy path.env.example
File metadata and controls
110 lines (94 loc) · 5.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Network Optimizer Environment Configuration
# Copy this file to .env and update with your values
# ===== Network Binding =====
# BIND_LOCALHOST_ONLY: Controls which network interfaces the app listens on
# - false (default): Binds to *:8042 (accessible from network, IPv4 + IPv6)
# - true: Binds to 127.0.0.1:8042 (localhost only, use with reverse proxy on same host)
# BIND_LOCALHOST_ONLY=false
# ===== Timezone Configuration =====
# Common US timezones:
# America/New_York (Eastern), America/Chicago (Central),
# America/Denver (Mountain), America/Los_Angeles (Pacific)
# Other examples:
# Europe/London, Europe/Paris, Asia/Tokyo, Australia/Sydney
TZ=America/New_York
# ===== Application Password =====
# Password precedence: Database (Settings UI) > APP_PASSWORD env var > Auto-generated
#
# On first run, an auto-generated password is shown in the logs.
# You can then set a permanent password in Settings > Admin Password (recommended).
# APP_PASSWORD is a fallback - useful for Docker deployments where you want
# to set the password before the first login.
# APP_PASSWORD=your_secure_password
# ===== Host Identity & Canonical URL Enforcement =====
# These settings identify the server for speed testing and optionally enforce a canonical URL.
# Redirects (302) only occur when HOST_NAME or REVERSE_PROXIED_HOST_NAME is set.
# HOST_IP alone does NOT trigger redirects (allows access via any hostname).
# HOST_IP: Server's IP address
# - Used for: Speed test path analysis, CORS, OpenSpeedTest URL in UI
# - Required for: Path analysis when server IP can't be auto-detected (bridge networking)
# - Note: Does NOT enforce redirects (users can still access via hostname)
# HOST_IP=192.168.1.100
# HOST_NAME: Server's hostname (recommended for better UX)
# - Used for: Canonical URL enforcement, user-facing URLs, OpenSpeedTest link in UI
# - Requires: DNS resolution by clients (can be local DNS via router/Pi-hole)
# - Examples: nas, server.local, optimizer.home.arpa
# HOST_NAME=nas
# REVERSE_PROXIED_HOST_NAME: Hostname when behind a reverse proxy
# - Used for: Canonical URL (https, no port), API URL for OpenSpeedTest result reporting
# - Set to: The hostname your reverse proxy serves (internal or public)
# - Note: OpenSpeedTest container is still accessed via HOST_NAME/HOST_IP:3005
# REVERSE_PROXIED_HOST_NAME=optimizer.example.com
# ===== Client Speed Testing =====
# Browser-based: Speed Test runs on port 3005 (configurable), results auto-reported if HOST_IP/HOST_NAME set
# To disable: comment out the network-optimizer-speedtest service in docker-compose.yml
# CLI-based: Enable iperf3 server mode for testing from devices with iperf3 installed
# Enable iperf3 server (listens on port 5201)
# IPERF3_SERVER_ENABLED=true
# OpenSpeedTest port (default 3005)
# - Used for direct access without a reverse proxy (e.g., http://server:3005)
# - When behind a reverse proxy, clients use HTTP_PORT/HTTPS_PORT below instead
# - Change if: Port 3005 conflicts with another service
# OPENSPEEDTEST_PORT=3005
# OpenSpeedTest hostname (defaults to HOST_NAME)
# - Set if speedtest is accessed via a different hostname than the main app
# - Example: speedtest.example.com when main app is at optimizer.example.com
# OPENSPEEDTEST_HOST=speedtest.example.com
# OpenSpeedTest HTTPS mode (default false)
# Set to "true" when the speed test is behind a TLS-terminating reverse proxy.
# UI links will use https:// and CORS will include the HTTPS origin.
# OPENSPEEDTEST_HTTPS=true
#
# HTTPS proxy port (default 443)
# Change if your TLS proxy listens on a non-standard HTTPS port
# OPENSPEEDTEST_HTTPS_PORT=443
#
# IMPORTANT: Speedtest reverse proxies MUST force HTTP/1.1 for accurate results.
# HTTP/2+ multiplexing inflates speeds. However, HTTP/1.1 will BREAK the main
# Network Optimizer app (Blazor requires HTTP/2+ for WebSockets).
#
# If you use a TLS proxy, you need TWO separate hostnames:
# - speedtest.example.com → HTTP/1.1 → localhost:3005 (speedtest)
# - optimizer.example.com → HTTP/2+ → localhost:8042 (main app)
#
# See NetworkOptimizer-Proxy for ready-made Traefik configs that handle this.
# ===== Advanced Settings =====
# Log levels: Trace, Debug, Information, Warning, Error, Critical
# LOG_LEVEL=Information # General (framework, EF Core, etc.)
# APP_LOG_LEVEL=Debug # Network Optimizer application
# ===== Behind a reverse proxy =====
# Forwarded headers are IGNORED unless you list the proxies allowed to send them. Leave these
# unset for a box reached directly on host:8042 - trusting X-Forwarded-* from anyone would let a
# client choose its own source address, which the rate limiter and the audit log both believe.
#
# TRUSTED_PROXIES: proxy addresses and/or CIDRs, comma separated. EVERY proxy in the chain must be
# listed - unwrapping stops at the first hop that is not recognised.
# TRUSTED_PROXIES=10.0.0.5,10.0.0.0/24
# TRUSTED_PROXY_HOPS: how many proxies deep the real client is. Cloudflare in front of Traefik is 2.
# Defaults to 1. Raising it alone does nothing unless every hop is in TRUSTED_PROXIES.
# TRUSTED_PROXY_HOPS=2
# TRUST_CF_CONNECTING_IP: use Cloudflare's CF-Connecting-IP header for the real client address.
# Only safe if the origin REFUSES connections that did not come from Cloudflare (authenticated
# origin pulls, or a firewall limited to their ranges). Without that, anyone can point their own
# Cloudflare account at this instance and set the header to whatever they like.
# TRUST_CF_CONNECTING_IP=true