Files
Wesley Gimenes 696c2b6096 netbird: move state file to reduce storage wear
Add `NB_DNS_STATE_FILE="/var/lib/netbird/state.json"` to the init
environment. This moves the state from the directory
`/root/.config/netbird` to the file `/var/lib/netbird/state.json` to
avoid storage wear. Note: the file is not preserved across reboots.

The state file contains information such as locally disabled routes and
other data primarily useful for desktop clients. In OpenWrt setups,
these changes are normally handled by the NetBird `management` server.
This matches the behavior prior to `netbird` v0.52.x, I have not
received any reports that this file caused problems before, so it is
unlikely to cause issues now.

The previous state file `/root/.config/netbird/state.json` can be removed.

Signed-off-by: Wesley Gimenes <wehagy@proton.me>
2026-03-08 20:55:06 -03:00
..