mirror of
https://github.com/netbirdio/docs.git
synced 2026-08-24 16:51:26 +02:00
Update lazy connection docs for the NB_LAZY_CONN override
This commit is contained in:
@@ -71,7 +71,7 @@ To clear all saved service parameters (including env vars), run `sudo netbird se
|
||||
| `NB_ICE_FAILED_TIMEOUT_SEC` | All | Seconds of silence before ICE gives up on the connection entirely and falls back to relay (default: `6`). |
|
||||
| `NB_ICE_RELAY_ACCEPTANCE_MIN_WAIT_SEC` | All | Minimum seconds ICE waits for a direct (P2P) candidate before accepting a relay candidate. Higher values give direct connections more time to succeed at the cost of slower initial connection (default: `2`). |
|
||||
| `NB_ICE_MONITOR_PERIOD` | All | Interval between ICE connection health checks that verify handshake freshness and trigger reconnection if needed (Go duration, default: `5m`). |
|
||||
| `NB_ENABLE_EXPERIMENTAL_LAZY_CONN` | All | Open WireGuard tunnels to peers only when traffic is detected, instead of connecting to all peers at startup. Same effect as the `--enable-lazy-connection` CLI flag. |
|
||||
| `NB_LAZY_CONN` | All | Local override for the lazy connection feature, which opens WireGuard tunnels to peers only when traffic is detected. `on` forces it enabled, `off` forces it disabled, unset defers to the management setting. Overrides the management configuration in both directions. Replaces the removed `NB_ENABLE_EXPERIMENTAL_LAZY_CONN`. |
|
||||
| `NB_LAZY_CONN_INACTIVITY_THRESHOLD` | All | How long a lazy connection can be idle before it is torn down (Go duration, default: `15m`). Only applies when lazy connections are enabled. |
|
||||
|
||||
## DNS
|
||||
|
||||
@@ -42,29 +42,18 @@ Once a connection between two peers is established, it will remain open only if
|
||||
The default inactivity threshold is <strong>60 minutes</strong>, and can be configured via the <code>NB_LAZY_CONN_INACTIVITY_THRESHOLD</code> environment variable (`60`).
|
||||
</Note>
|
||||
|
||||
## Enabling via the system tray
|
||||
## Overriding Lazy Connections on the agent
|
||||
|
||||
You can toggle Lazy Connections directly from the NetBird system tray:
|
||||
|
||||
1. Click the NetBird icon in the system tray.
|
||||
2. Go to **Settings**.
|
||||
3. Click **Enable Lazy Connections** to toggle the setting.
|
||||
|
||||
## Enabling Lazy Connections on agent
|
||||
|
||||
Lazy connections are disabled by default. You can enable Lazy Connections using the following environment variable:
|
||||
Whether lazy connections are enabled is controlled by your management settings (see the Dashboard section below). You can override that decision locally on an agent with the `NB_LAZY_CONN` environment variable:
|
||||
|
||||
```bash
|
||||
export NB_ENABLE_EXPERIMENTAL_LAZY_CONN=true
|
||||
export NB_LAZY_CONN=on # force enabled
|
||||
export NB_LAZY_CONN=off # force disabled
|
||||
```
|
||||
|
||||
Or pass the flag directly via the CLI when running the agent:
|
||||
|
||||
```bash
|
||||
netbird up --enable-lazy-connection
|
||||
```
|
||||
Both `on` and `off` override the management setting; leave the variable unset to defer to management. On managed devices, the same override can be applied through an MDM policy using the `lazyConnection` key (`on` / `off`).
|
||||
<Note>
|
||||
This configuration is <strong>not persistent</strong>. You must reapply the flag or environment variable after each restart unless it is built into your service definition (e.g., systemd or Docker).
|
||||
The environment variable is <strong>not persistent</strong>. You must reapply it after each restart unless it is built into your service definition (e.g., systemd or Docker).
|
||||
</Note>
|
||||
|
||||
## Enabling Lazy Connections in the NetBird Dashboard
|
||||
|
||||
Reference in New Issue
Block a user