This PR contains the following updates: | Package | Update | Change | |---|---|---| | [netbirdio/dashboard](https://github.com/netbirdio/dashboard) | minor | `v2.39.0` → `v2.90.3` | | netbirdio/netbird | minor | `v0.73.2-rootless` → `v0.74.1-rootless` | | netbirdio/netbird-server | minor | `0.73.2` → `0.74.1` | | netbirdio/reverse-proxy | minor | `0.73.2` → `0.74.1` | --- > ⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/12) for more information. --- ### Release Notes <details> <summary>netbirdio/dashboard (netbirdio/dashboard)</summary> ### [`v2.90.3`](https://github.com/netbirdio/dashboard/releases/tag/v2.90.3) [Compare Source](https://github.com/netbirdio/dashboard/compare/v2.90.2...v2.90.3) #### What's Changed - Show reason for peer login expiration events by [@​bcmmbaga](https://github.com/bcmmbaga) in [#​694](https://github.com/netbirdio/dashboard/pull/694) - Reload nginx after patching CSP header by [@​pappz](https://github.com/pappz) in [#​687](https://github.com/netbirdio/dashboard/pull/687) - Fix peer table page reset when switching kind by [@​braginini](https://github.com/braginini) in [#​696](https://github.com/netbirdio/dashboard/pull/696) - Feature/add provider session by [@​braginini](https://github.com/braginini) in [#​695](https://github.com/netbirdio/dashboard/pull/695) - Add Metrics settings tab with metrics push toggle by [@​pappz](https://github.com/pappz) in [#​613](https://github.com/netbirdio/dashboard/pull/613) - Feature/add skip tls verification by [@​braginini](https://github.com/braginini) in [#​697](https://github.com/netbirdio/dashboard/pull/697) **Full Changelog**: <https://github.com/netbirdio/dashboard/compare/v2.90.2...v2.90.3> ### [`v2.90.2`](https://github.com/netbirdio/dashboard/releases/tag/v2.90.2) [Compare Source](https://github.com/netbirdio/dashboard/compare/v2.90.1...v2.90.2) #### What's Changed - Add Claude provider selector and Bedrock by [@​braginini](https://github.com/braginini) in [#​691](https://github.com/netbirdio/dashboard/pull/691) - Prevent gated useFetchApi hooks from overwriting shared cache entries by [@​bcmmbaga](https://github.com/bcmmbaga) in [#​692](https://github.com/netbirdio/dashboard/pull/692) **Full Changelog**: <https://github.com/netbirdio/dashboard/compare/v2.90.1...v2.90.2> ### [`v2.90.1`](https://github.com/netbirdio/dashboard/releases/tag/v2.90.1) [Compare Source](https://github.com/netbirdio/dashboard/compare/v2.90.0...v2.90.1) #### What's Changed - The empty-state peer card now renders AddPeerDropdown by [@​braginini](https://github.com/braginini) in [#​686](https://github.com/netbirdio/dashboard/pull/686) - Support Vertex keyfile upload and agent config by [@​braginini](https://github.com/braginini) in [#​688](https://github.com/netbirdio/dashboard/pull/688) - Prefill Vertex endpoint by [@​braginini](https://github.com/braginini) in [#​689](https://github.com/netbirdio/dashboard/pull/689) **Full Changelog**: <https://github.com/netbirdio/dashboard/compare/v2.90.0...v2.90.1> ### [`v2.90.0`](https://github.com/netbirdio/dashboard/releases/tag/v2.90.0) [Compare Source](https://github.com/netbirdio/dashboard/compare/v2.80.0...v2.90.0) #### What's Changed - Fix CSP blocking OIDC token endpoint by [@​maxbrc](https://github.com/maxbrc) in [#​680](https://github.com/netbirdio/dashboard/pull/680) - Agent Network by [@​braginini](https://github.com/braginini) in [#​684](https://github.com/netbirdio/dashboard/pull/684) #### New Contributors - [@​maxbrc](https://github.com/maxbrc) made their first contribution in [#​680](https://github.com/netbirdio/dashboard/pull/680) **Full Changelog**: <https://github.com/netbirdio/dashboard/compare/v2.80.0...v2.90.0> ### [`v2.80.0`](https://github.com/netbirdio/dashboard/releases/tag/v2.80.0) [Compare Source](https://github.com/netbirdio/dashboard/compare/v2.39.0...v2.80.0) #### What's Changed - Add Logout URL to the Identity Provider dialog by [@​TechHutTV](https://github.com/TechHutTV) in [#​657](https://github.com/netbirdio/dashboard/pull/657) - Edit banner to IPv6 kh link by [@​TechHutTV](https://github.com/TechHutTV) in [#​662](https://github.com/netbirdio/dashboard/pull/662) - Insert link to remote jobs documentation by [@​semp26](https://github.com/semp26) in [#​664](https://github.com/netbirdio/dashboard/pull/664) - DNS Zones & Setup modal improvements by [@​braginini](https://github.com/braginini) in [#​669](https://github.com/netbirdio/dashboard/pull/669) - Update banner by [@​heisbrot](https://github.com/heisbrot) in [#​672](https://github.com/netbirdio/dashboard/pull/672) - Update announcements.json by [@​mlsmaycon](https://github.com/mlsmaycon) in [#​673](https://github.com/netbirdio/dashboard/pull/673) - Merge NetBird cloud edition into the dashboard by [@​mlsmaycon](https://github.com/mlsmaycon) in [#​674](https://github.com/netbirdio/dashboard/pull/674) - Restrict cloud/licensed-only API calls in open-source mode by [@​mlsmaycon](https://github.com/mlsmaycon) in [#​675](https://github.com/netbirdio/dashboard/pull/675) - Preserve inactivity expiration on partial peer updates by [@​bcmmbaga](https://github.com/bcmmbaga) in [#​676](https://github.com/netbirdio/dashboard/pull/676) #### New Contributors - [@​TechHutTV](https://github.com/TechHutTV) made their first contribution in [#​657](https://github.com/netbirdio/dashboard/pull/657) - [@​semp26](https://github.com/semp26) made their first contribution in [#​664](https://github.com/netbirdio/dashboard/pull/664) **Full Changelog**: <https://github.com/netbirdio/dashboard/compare/v2.39.0...v2.80.0> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNTAuMSIsInVwZGF0ZWRJblZlciI6IjQzLjE1MC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Reviewed-on: #10 Co-authored-by: Renovate Bot <renovate@jfreudenberger.de> Co-committed-by: Renovate Bot <renovate@jfreudenberger.de>
214 lines
8.9 KiB
Nix
214 lines
8.9 KiB
Nix
{
|
|
pkgs,
|
|
utils,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
|
|
cfg = config.services.netbird-docker;
|
|
netbirdCfg = config.services.netbird;
|
|
|
|
in {
|
|
|
|
options.services.netbird-docker = {
|
|
enable = lib.mkEnableOption "Netbird Server stack, comprising the dashboard, management API, signal service, relay and STUN server";
|
|
enableLocalAuth = lib.mkEnableOption "local authentication";
|
|
proxy = lib.mkOption {
|
|
description = "Configuration for proxy";
|
|
type = lib.types.submodule {
|
|
options = {
|
|
domain = lib.mkOption {
|
|
description = "Domain the proxy is reachable at. Custom domains will need to add a CNAME record of the wildcard subdomain to this domain.";
|
|
type = lib.types.str;
|
|
};
|
|
token-secret = lib.mkOption {
|
|
description = ''
|
|
Proxy token in env-file notation.
|
|
Name of the environment variable is `NB_PROXY_TOKEN`.
|
|
Create the proxy token after netbird is installed with the following command: docker exec -it netbird-server /go/bin/netbird-server --config /etc/netbird/config.yaml token create --name local
|
|
'';
|
|
type = lib.types.anything;
|
|
};
|
|
extraPorts = lib.mkOption {
|
|
description = ''
|
|
Extra ports to open for L4 routing.
|
|
Ports described in the config (https://docs.netbird.io/selfhosted/migration/enable-reverse-proxy#exposing-l4-ports) can be specified here.
|
|
'';
|
|
type = lib.types.listOf lib.types.str;
|
|
default = [ ];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
secrets = lib.mkOption {
|
|
description = ''
|
|
Secret for combined server in env-file notation.
|
|
Name of the relevant environment variables:
|
|
- NETBIRD_RELAY_AUTH_SECRET - Shared authentication secret for relay
|
|
- NETBIRD_DATASTORE_ENC_KEY - Encryption key for sensitive data
|
|
'';
|
|
type = lib.types.anything;
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.netbird.useRoutingFeatures = lib.mkDefault "server";
|
|
virtualisation.oci-containers.containers = {
|
|
netbird-dashboard = {
|
|
image = "netbirdio/dashboard:v2.90.3";
|
|
autoStart = true;
|
|
networks = [
|
|
"traefik"
|
|
];
|
|
environment = {
|
|
NETBIRD_MGMT_API_ENDPOINT = "https://${netbirdCfg.server.management.domain}";
|
|
NETBIRD_MGMT_GRPC_API_ENDPOINT = "https://${netbirdCfg.server.management.domain}";
|
|
AUTH_AUDIENCE="netbird-dashboard";
|
|
AUTH_CLIENT_ID="netbird-dashboard";
|
|
AUTH_CLIENT_SECRET="";
|
|
AUTH_AUTHORITY = "https://${netbirdCfg.server.domain}/oauth2";
|
|
USE_AUTH0="false";
|
|
AUTH_SUPPORTED_SCOPES="openid profile email groups";
|
|
AUTH_REDIRECT_URI="/nb-auth";
|
|
AUTH_SILENT_REDIRECT_URI="/nb-silent-auth";
|
|
NGINX_SSL_PORT="443";
|
|
LETSENCRYPT_DOMAIN="none";
|
|
};
|
|
labels = {
|
|
"traefik.enable" = "true";
|
|
"traefik.http.routers.netbird-dashboard.rule" = "Host(`${netbirdCfg.server.dashboard.domain}`)";
|
|
"traefik.http.routers.netbird-dashboard.entrypoints" = "websecure";
|
|
"traefik.http.routers.netbird-dashboard.tls" = "true";
|
|
"traefik.http.routers.netbird-dashboard.tls.certresolver" = "letsencrypt";
|
|
"traefik.http.routers.netbird-dashboard.service" = "dashboard";
|
|
"traefik.http.routers.netbird-dashboard.priority" = "1";
|
|
"traefik.http.services.dashboard.loadbalancer.server.port" = "80";
|
|
};
|
|
dependsOn = [
|
|
"netbird-server"
|
|
];
|
|
};
|
|
netbird-server = {
|
|
image = "netbirdio/netbird-server:0.74.1@sha256:b41d3ff4470c5610da1fbf93b6e940571932d0ecadbd4fd9d9221b5310cb7d2f";
|
|
autoStart = true;
|
|
networks = [
|
|
"traefik"
|
|
];
|
|
entrypoint = "/bin/sh";
|
|
cmd = [
|
|
"-c"
|
|
''sed -e "s|__AUTH_SECRET__|$NETBIRD_RELAY_AUTH_SECRET|" -e "s|__DATASTORE_ENC_KEY__|$NETBIRD_DATASTORE_ENC_KEY|" /etc/netbird/config.yaml.tmpl > /etc/netbird/config.yaml && /go/bin/netbird-server --config /etc/netbird/config.yaml''
|
|
];
|
|
ports = [
|
|
"3478:3478/udp"
|
|
];
|
|
volumes = let
|
|
server-config = (pkgs.formats.yaml {}).generate "netbird-server-config" {
|
|
server = {
|
|
listenAddress = ":80";
|
|
exposedAddress = "https://${netbirdCfg.server.domain}:443";
|
|
stunPorts = [ 3478 ];
|
|
metricsPort = 9090;
|
|
healthCheckAddress = ":9000";
|
|
logLevel = netbirdCfg.server.management.logLevel;
|
|
logFile = "console";
|
|
authSecret = "__AUTH_SECRET__";
|
|
dataDir = "/var/lib/netbird";
|
|
auth = {
|
|
issuer = "https://${netbirdCfg.server.dashboard.domain}/oauth2";
|
|
localAuthDisabled = !cfg.enableLocalAuth;
|
|
signKeyRefreshEnabled = true;
|
|
dashboardRedirectURIs = [
|
|
"https://${netbirdCfg.server.dashboard.domain}/nb-auth"
|
|
"https://${netbirdCfg.server.dashboard.domain}/nb-silent-auth"
|
|
];
|
|
cliRedirectURIs = [
|
|
"http://localhost:53000"
|
|
];
|
|
};
|
|
reverseProxy.trustedHTTPProxies = [
|
|
"172.18.0.2/32"
|
|
];
|
|
store = {
|
|
engine = "sqlite";
|
|
encryptionKey = "__DATASTORE_ENC_KEY__";
|
|
};
|
|
};
|
|
};
|
|
in [
|
|
"${server-config}:/etc/netbird/config.yaml.tmpl"
|
|
];
|
|
environmentFiles = [
|
|
cfg.secrets.path
|
|
];
|
|
extraOptions = [
|
|
''--mount=type=volume,source=netbird_data,target=/var/lib/netbird,volume-driver=local''
|
|
];
|
|
labels = {
|
|
"traefik.enable" = "true";
|
|
"traefik.http.routers.netbird-grpc.rule" = "Host(`${netbirdCfg.server.signal.domain}`) && (PathPrefix(`/signalexchange.SignalExchange/`) || PathPrefix(`/management.ManagementService/`))";
|
|
"traefik.http.routers.netbird-grpc.entrypoints" = "websecure";
|
|
"traefik.http.routers.netbird-grpc.tls" = "true";
|
|
"traefik.http.routers.netbird-grpc.tls.certresolver" = "letsencrypt";
|
|
"traefik.http.routers.netbird-grpc.service" = "netbird-server-h2c";
|
|
"traefik.http.routers.netbird-grpc.priority" = "100";
|
|
"traefik.http.routers.netbird-backend.rule" = "Host(`${netbirdCfg.server.domain}`) && (PathPrefix(`/relay`) || PathPrefix(`/ws-proxy/`) || PathPrefix(`/api`) || PathPrefix(`/oauth2`))";
|
|
"traefik.http.routers.netbird-backend.entrypoints" = "websecure";
|
|
"traefik.http.routers.netbird-backend.tls" = "true";
|
|
"traefik.http.routers.netbird-backend.tls.certresolver" = "letsencrypt";
|
|
"traefik.http.routers.netbird-backend.service" = "netbird-server";
|
|
"traefik.http.routers.netbird-backend.priority" = "100";
|
|
"traefik.http.services.netbird-server.loadbalancer.server.port" = "80";
|
|
"traefik.http.services.netbird-server-h2c.loadbalancer.server.port" = "80";
|
|
"traefik.http.services.netbird-server-h2c.loadbalancer.server.scheme" = "h2c";
|
|
};
|
|
dependsOn = [
|
|
"traefik"
|
|
];
|
|
};
|
|
netbird-proxy = {
|
|
image = "netbirdio/reverse-proxy:0.74.1@sha256:0d6bceceaa4033f4193e54b10a4e4c83b9d17b7421e1dbd2db0e77dbf677092b";
|
|
autoStart = true;
|
|
ports = [
|
|
"51820:51820/udp"
|
|
] ++ cfg.proxy.extraPorts;
|
|
networks = [
|
|
"traefik"
|
|
];
|
|
dependsOn = [
|
|
"netbird-server"
|
|
];
|
|
environment = {
|
|
NB_PROXY_MANAGEMENT_ADDRESS="http://netbird-server:80";
|
|
NB_PROXY_ALLOW_INSECURE="true";
|
|
NB_PROXY_DOMAIN = cfg.proxy.domain;
|
|
NB_PROXY_ADDRESS = ":8443";
|
|
NB_PROXY_CERTIFICATE_DIRECTORY = "/certs";
|
|
NB_PROXY_ACME_CERTIFICATES = "true";
|
|
NB_PROXY_ACME_CHALLENGE_TYPE = "tls-alpn-01";
|
|
NB_PROXY_FORWARDED_PROTO = "https";
|
|
NB_PROXY_PROXY_PROTOCOL = "true";
|
|
NB_PROXY_TRUSTED_PROXIES = "172.18.0.2";
|
|
};
|
|
environmentFiles = [
|
|
cfg.proxy.token-secret.path
|
|
];
|
|
extraOptions = [
|
|
''--mount=type=volume,source=netbird_proxy_certs,target=/certs,volume-driver=local''
|
|
];
|
|
labels = {
|
|
"traefik.enable" = "true";
|
|
"traefik.tcp.routers.proxy-passthrough.entrypoints" = "websecure";
|
|
"traefik.tcp.routers.proxy-passthrough.rule" = "HostSNI(`*`)";
|
|
"traefik.tcp.routers.proxy-passthrough.tls.passthrough" = "true";
|
|
"traefik.tcp.routers.proxy-passthrough.service" = "proxy-tls";
|
|
"traefik.tcp.routers.proxy-passthrough.priority" = "1";
|
|
"traefik.tcp.services.proxy-tls.loadbalancer.server.port" = "8443";
|
|
"traefik.tcp.services.proxy-tls.loadbalancer.serverstransport" = "pp-v2@file";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|