Adjust default config location on FreeBSD #1124

Open
opened 2025-11-20 05:24:27 -05:00 by saavagebueno · 4 comments
Owner

Originally created by @skillcoder on GitHub (Aug 4, 2024).

Problem description
Current default linux config location (/etc/netbird/config.json) inappropriate for FreeBSD
On FreeBSD according to HIER(7) /etc/ using only for base system configuration files and scripts; see intro(5)
The standard /usr/local/etc/netbird/config.json is also not the best choice since this is an automatically generated config that we should never need to modify by hand, all changes to it making by up command. Therefore, I propose placing config into /var/db/netbird/, which is the standard location for system service state on FreeBSD.

To Reproduce
Just run current 0.28.7 client on FreeBSD without specifying --config/-c argument.

Expected behavior
Netbird state should store by default in the standard system service state location inside /var/db/netbird/

Are you using NetBird Cloud?

Yes

NetBird version

0.28.7

NetBird status -d output:

Related `netbird status -d' command output:

...
OS: freebsd/amd64
Daemon version: 0.28.7
CLI version: 0.28.7
...

Additional context

This is required to simplify usage netbird cli command on FreeBSD

Originally created by @skillcoder on GitHub (Aug 4, 2024). **Problem description** Current default linux config location (`/etc/netbird/config.json`) inappropriate for FreeBSD On FreeBSD according to [HIER(7)](https://man.freebsd.org/cgi/man.cgi?query=hier&sektion=7&manpath=freebsd-release-ports) `/etc/` using only for base system configuration files and scripts; see [intro(5)](https://man.freebsd.org/cgi/man.cgi?query=intro&sektion=5&apropos=0&manpath=FreeBSD+14.1-RELEASE+and+Ports) The standard `/usr/local/etc/netbird/config.json` is also not the best choice since this is an automatically generated config that we should never need to modify by hand, all changes to it making by `up` command. Therefore, I propose placing config into `/var/db/netbird/`, which is the standard location for system service state on FreeBSD. **To Reproduce** Just run current `0.28.7` client on FreeBSD without specifying `--config/-c` argument. **Expected behavior** Netbird state should store by default in the standard system service state location inside `/var/db/netbird/` **Are you using NetBird Cloud?** Yes **NetBird version** 0.28.7 **NetBird status -d output:** Related `netbird status -d' command output: ``` ... OS: freebsd/amd64 Daemon version: 0.28.7 CLI version: 0.28.7 ... ``` **Additional context** This is required to simplify usage `netbird` cli command on FreeBSD
saavagebueno added the freebsd label 2025-11-20 05:24:27 -05:00
Author
Owner

@skillcoder commented on GitHub (Aug 4, 2024):

I will prepare a PR

@skillcoder commented on GitHub (Aug 4, 2024): I will prepare a PR
Author
Owner

@mlsmaycon commented on GitHub (Aug 4, 2024):

Thanks @skillcoder for the issue and for working on the PR.

@mlsmaycon commented on GitHub (Aug 4, 2024): Thanks @skillcoder for the issue and for working on the PR.
Author
Owner

@skillcoder commented on GitHub (Aug 4, 2024):

Need to test after we release new version.

@skillcoder commented on GitHub (Aug 4, 2024): Need to test after we release new version.
Author
Owner

@nazarewk commented on GitHub (Apr 23, 2025):

@skillcoder I believe it is covered by your merged PR. Can we close this issue independently of NetBird getting accepted into FreeBSD packages?

@nazarewk commented on GitHub (Apr 23, 2025): @skillcoder I believe it is covered by your merged PR. Can we close this issue independently of NetBird getting accepted into FreeBSD packages?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1124