website/integrations/networking/netbird/index.md
NetBird is an open source, zero trust, networking platform that allows you to create secure private networks for your organization or home.
The following placeholders are used in this guide:
netbird.company is the FQDN of the NetBird installation.authentik.company is the FQDN of the authentik installation.:::info This documentation lists only the settings that you need to change from their default values. Be aware that any changes other than those explicitly mentioned in this guide could cause issues accessing your application. :::
To support the integration of NetBird with authentik, you need to create an application/provider pair in authentik.
Public.Strict redirect: http://localhost:53000.Regex redirect: https://<netbird.company>/.*.minutes=10.Based on the User's ID.authentik default OAuth Mapping: OpenID 'offline_access' and authentik default OAuth Mapping: authentik API access scopes to Selected Scopes.:::warning
It is important to set a signing key to secure the provider because this is a Public client.
:::
:::info If an access group is created for the Netbird application, the Netbird service account must be included in the group. Otherwise you will see a 401 error after login. :::
NetBird and disable the Create group option. Click Create and take note of the password.NetBird requires the service account to have full administrative access to the authentik instance. Follow these steps to make it an administrator.
authentik Admins.default-device-code-flow)Device code flow)default-device-code-flow)Stage ConfigurationRequire authenticationTo configure NetBird to use authentik, add the following environment variables to your NetBird deployment:
NETBIRD_AUTH_OIDC_CONFIGURATION_ENDPOINT="https://authentik.company/application/o/<application_slug>/.well-known/openid-configuration"
NETBIRD_USE_AUTH0=false
NETBIRD_AUTH_CLIENT_ID="<Your Client ID>"
NETBIRD_AUTH_SUPPORTED_SCOPES="openid profile email offline_access api"
NETBIRD_AUTH_AUDIENCE="<Your Client ID>"
NETBIRD_AUTH_DEVICE_AUTH_CLIENT_ID="<Your Client ID>"
NETBIRD_AUTH_DEVICE_AUTH_AUDIENCE="<Your Client ID>"
NETBIRD_MGMT_IDP="authentik"
NETBIRD_IDP_MGMT_CLIENT_ID="<Your Client ID>"
NETBIRD_IDP_MGMT_EXTRA_USERNAME="Netbird"
NETBIRD_IDP_MGMT_EXTRA_PASSWORD="<Your Service Account password>"
NETBIRD_AUTH_REDIRECT_URI="/auth"
NETBIRD_AUTH_SILENT_REDIRECT_URI="/silent-auth"
# needs disabling due to issue with IdP. Learn more at https://github.com/netbirdio/netbird/issues/3654
NETBIRD_AUTH_PKCE_DISABLE_PROMPT_LOGIN=true
Restart the NetBird service for the changes to take effect. If using Docker, redeploy the NetBird container for the changes to take effect.
To confirm that authentik is properly configured with NetBird, log out and log back in via authentik.
When accessing NetBird through a reverse proxy, you might encounter a loop where the /peers URL continuously reloads. To resolve this, set the following variables accordingly:
NETBIRD_MGMT_API_PORT=443
NETBIRD_SIGNAL_PORT=443
Run the configure.sh script for the change to take effect.