about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/services/networking/netbird/server.md
blob: 3649e97b379e5da01f645ded613f3a136958d5ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Netbird server {#module-services-netbird-server}

NetBird is a VPN built on top of WireGuard® making it easy to create secure private networks for your organization or home.

## Quickstart {#module-services-netbird-server-quickstart}

To fully setup Netbird as a self-hosted server, we need both a Coturn server and an identity provider, the list of supported SSOs and their setup are available [on Netbird's documentation](https://docs.netbird.io/selfhosted/selfhosted-guide#step-3-configure-identity-provider-idp).

There are quite a few settings that need to be passed to Netbird for it to function, and a minimal config looks like :

```nix
services.netbird.server = {
  enable = true;

  domain = "netbird.example.selfhosted";

  enableNginx = true;

  coturn = {
    enable = true;

    passwordFile = "/path/to/a/secret/password";
  };

  management = {
    oidcConfigEndpoint = "https://sso.example.selfhosted/oauth2/openid/netbird/.well-known/openid-configuration";

    settings = {
      TURNConfig = {
        Turns = [
          {
            Proto = "udp";
            URI = "turn:netbird.example.selfhosted:3478";
            Username = "netbird";
            Password._secret = "/path/to/a/secret/password";
          }
        ];
      };
    };
  };
};
```