netbird-management
Self-hosted NetBird management server and dashboard
Example
{config, ...}: {
nps.stacks.netbird-management = {
enable = true;
authSecretFile = config.sops.secrets."netbird/auth_secret".path;
storeEncryptionKeyFile = config.sops.secrets."netbird/encryption_key".path;
adminProvisioning = {
email = "admin@example.com";
passwordFile = config.sops.secrets."netbird/admin_password".path;
};
oidc = {
enable = true;
clientSecretFile = config.sops.secrets."netbird/authelia/client_secret".path;
};
};
}adminProvisioning creates the initial owner only while NetBird setup is incomplete. oidc.enable configures the Authelia client in Nix and registers the provider during initial setup. The setup API is only available before setup completes, so enabling OIDC later will not register the provider. Manage later provider changes in the NetBird web UI. Keep OIDC enabled in Nix to retain its Authelia client configuration.
See the NetBird client stack to enroll peers.
Stack Options
nps.stacks.netbird-management.adminProvisioning.email
Email for the initial NetBird owner account.
nps.stacks.netbird-management.adminProvisioning.name
Display name for the initial NetBird owner account.
nps.stacks.netbird-management.adminProvisioning.passwordFile
File containing the initial NetBird owner password.
nps.stacks.netbird-management.authSecretFile
File containing the relay authentication secret.
nps.stacks.netbird-management.enable
Whether to enable netbird-management.
nps.stacks.netbird-management.oidc.clientSecretFile
The file containing the client secret for the OIDC client that will be registered in Authelia.
For examples on how to generate a client secret, see
https://www.authelia.com/integration/openid-connect/frequently-asked-questions/#client-secret
absolute path
config.sops.secrets."immich/authelia/client_secret".path"
nps.stacks.netbird-management.oidc.clientSecretHash
The client secret hash. For examples on how to generate a client secret, see https://www.authelia.com/integration/openid-connect/frequently-asked-questions/#client-secret
The value can be passed in multiple ways:
- As a literal string
- As an absolute path to a file containing the hash (
toFile) - As an absolute oath to a file containing the client_secret, in which case the hash will be automatically computed (
toHash) - As
null
If left unset (null), the client secret will be read from the file specified in the clientSecretFile option and hashed automatically before being passed to the Authelia container.
null or string or (submodule)
null
# Literal String:
"$pbkdf2-sha512$310000$cbOAIWbfz3vCVXIPIp6d2A$J0klwULa6TvPRCU1HAfuKua/dMKTl8gbTYJz2N73ejGUu0LUGz/y3kwmJLuKuAYGg3WQOT0q9ZzVHHUvpKpgvQ"
# Client secret hash stored in a file
{ fromFile = config.sops.secrets."immich/client_secret_hash".path; }
# Client secret stored in a file: Hash will be computed dynamically
{ toHash = config.sops.secrets."immich/client_secret".path; }
# Null (default): Hash will be computed automatically based on the clientSecretFile option
# Equivalent to { toHash = cfg.oidc.clientSecretFile; }
null
nps.stacks.netbird-management.oidc.enable
Enable Authelia OIDC integration. The provider is registered only during NetBird's initial setup.
nps.stacks.netbird-management.oidc.userGroup
Group allowed to log in.
nps.stacks.netbird-management.settings
NetBird server settings, templated with gomplate.
nps.stacks.netbird-management.storeEncryptionKeyFile
File containing the 32-byte encryption key for stored data.
