netbird: move state file to reduce storage wear
authorWesley Gimenes <redacted>
Tue, 17 Feb 2026 07:04:06 +0000 (04:04 -0300)
committerWesley Gimenes <redacted>
Sun, 8 Mar 2026 23:55:06 +0000 (20:55 -0300)
commit696c2b6096f78fb74d8fb5a5514cc9d653795840
tree7f676a8ea08d58753ff6f3810a5991fa39d5bdb3
parent5a495b2240637eed28dc1efd294729ae1b875361
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 <redacted>
net/netbird/Makefile
net/netbird/files/netbird.init
git clone https://git.99rst.org/PROJECT