Getting Started with NetBird Enterprise Commercial License

Updated

Two scripts deploy enterprise self-hosted NetBird:

  • Fresh installation with getting-started-enterprise.sh.
  • Migration from an existing community combined-server deployment with migrate-to-enterprise.sh.

The scripts generate the Compose files, configuration, secrets, and Postgres setup — plus optional traffic-flow services — so there's no manual YAML to write.

Both run the embedded identity provider, so no external OIDC provider is required. On a fresh install, you create the owner account from the dashboard on first login; you can connect an external provider later.

NetBird issues getting-started-enterprise.sh and the license key with your Enterprise Commercial License. If you wish to upgrade the community edition, migrate-to-enterprise.sh is available below.

1. Fresh Installation

getting-started-enterprise.sh deploys a single-node self-hosted NetBird stack with the embedded IdP. Management, signal, relay, and STUN run in one netbird-server container alongside Traefik, the dashboard, and Postgres.

1.1 Prerequisites

  • A Linux host with Docker and Docker Compose installed.
  • At least 5 GB of free disk space (the enterprise images and Postgres total ~2.2 GB, plus container and volume overhead).
  • bash, curl, jq, and openssl available on the host.
  • A real DNS-resolvable FQDN with an A record pointing at the host. Bare IP addresses are not supported.
  • Open inbound ports: 80/tcp (HTTP→HTTPS redirect), 443/tcp (dashboard, API, gRPC, relay, and Let's Encrypt validation), and 3478/udp (STUN).
  • If outbound traffic from the host is limited to an allowlist of host names, add the ones in Appendix: Outbound connections.
  • An enterprise license key authorized for the products you want to enable.

1.2 Run the script

Create an empty directory and run the script from inside it:

mkdir -p netbird-enterprise
cd netbird-enterprise
curl -fsSL https://pkgs.netbird.io/getting-started-enterprise.sh | bash

The script prompts for:

  • Whether to enable traffic flow — required for traffic event logging and streaming.
  • Whether to enable the NetBird Proxy, and optionally CrowdSec. If you enable CrowdSec, it then asks whether to protect the dashboard with CrowdSec AppSec. The default is no.
  • The public NetBird domain.
  • A single license key (used for all enabled products and features).

It then generates the deployment files, pulls the required images, starts Postgres, waits for it to become ready, and starts the remaining services.

1.3 Generated files

The script writes the generated files into the current directory:

FilePurposeMode
.envRuntime configuration, license key, and generated secrets. NETBIRD_CROWDSEC_APPSEC_ENABLED records the AppSec choice. When AppSec is enabled, this also holds CROWDSEC_DASHBOARD_BOUNCER_KEY600
crowdsec/acquis.d/appsec.yamlAppSec listener on port 7422, written only when AppSec is enabled—
docker-compose.ymlCompose stack for the NetBird server and optional traffic-flow services644
config.yamlNetBird server configuration (YAML)600
traefik/Traefik dynamic configuration, including the proxy's proxy.yaml755

The script preserves an existing crowdsec/acquis.d/appsec.yaml. New files inherit the shell's umask; the script does not change their permissions.

Reverse proxy and automatic HTTPS are configured through Traefik labels and command flags inside docker-compose.yml.

The script aborts if generated files already exist in the directory. This avoids overwriting secrets or replacing an existing deployment by accident.

1.4 First login

Open https://<your-domain> in a browser. The dashboard detects that setup is required and walks through the first-login flow to create the owner account. No external OIDC provider is required, and no static credentials are printed or stored anywhere.

1.5 Validate the installation

After the stack starts:

  • Run docker compose ps and confirm the expected services are running.
  • Check docker compose logs -f netbird-server traefik.
  • Open the dashboard and complete owner setup.
  • Add a test peer and confirm it connects.

1.6 Stack components

The combined stack:

ServiceImageNotes
traefiktraefik:v3.7.18TLS termination, reverse proxy, HTTP→HTTPS redirect
dashboardghcr.io/netbirdio/dashboard-cloud:latestUI
postgrespostgres:17Datastore for management, embedded IdP, traffic events
netbird-serverghcr.io/netbirdio/netbird-server-cloud:latestManagement + signal + relay + embedded STUN on UDP/3478

Enabling traffic flow adds:

ServiceImageNotes
natsnats:2JetStream for traffic events
receiverghcr.io/netbirdio/flow-receiver-cloud:latestTraffic flow ingest
enricherghcr.io/netbirdio/flow-enricher-cloud:latestTraffic flow enrichment

Enabling the NetBird Proxy adds:

ServiceImageNotes
proxyghcr.io/netbirdio/reverse-proxy:latestNetBird Proxy
crowdseccrowdsecurity/crowdsec:v1.8.1IP reputation blocking, when enabled

When AppSec is enabled, CrowdSec adds the virtual-patching and generic rules collections, registers a separate dashboard bouncer, and waits until port 7422 accepts a connection. It keeps the CrowdSec named volumes and bind-mounts only ./crowdsec/acquis.d.

1.7 Enable features on an existing installation

Run the script with a flag from the installation directory:

curl -fsSL https://pkgs.netbird.io/getting-started-enterprise.sh | bash -s -- --enable-traffic-events
curl -fsSL https://pkgs.netbird.io/getting-started-enterprise.sh | bash -s -- --enable-proxy

The script shows the changes to docker-compose.yml and asks before applying them. If a step fails, it restores the previous files. After --enable-traffic-events, turn on traffic events in the dashboard settings.

When the proxy is not already enabled, --enable-proxy asks about CrowdSec. If you enable CrowdSec, it also asks about AppSec. Later runs keep the CrowdSec and AppSec choices stored in .env.

If the proxy is already running, the script does not add CrowdSec or AppSec. Follow Protect the dashboard with CrowdSec AppSec only when the stack already has the crowdsec service and NetBird Proxy is configured to use it. There is currently no documented in-place path for adding CrowdSec to an enterprise install whose proxy is already running. On an eligible enterprise stack, chain the AppSec middleware in front of nb-security@docker on the dashboard and on /api and /oauth2. The gRPC and relay routers stay on nb-security@docker only.

2. Connect Identity Providers

We recommend using SCIM provisioning where possible. In the following setup guides, you may skip JWT group settings and use our group syncing integration instead.

Entra ID

  1. Enable Entra SSO
  2. Sync Users and Groups via SCIM (Recommended)
  3. Sync Users and Groups via API

Google Workspace

  1. Enable Google SSO
  2. Sync Users and Groups

JumpCloud

  1. Enable JumpCloud SSO
  2. Sync Users and Groups

Keycloak

  1. Enable Keycloak SSO
  2. Sync Users and Groups

Duo

Okta

Auth0

3. Migrate an Existing Community Combined Deployment

Use migrate-to-enterprise.sh to convert an existing community combined-server deployment to the enterprise images. The same script also migrates SQLite data to Postgres and enables traffic flow, so no manual Compose or config.yaml edits are required for the supported migration path.

If your community deployment sets NB_AUTH_SECRET or NB_STORE_ENCRYPTION_KEY on the netbird-server service, leave them there: from v0.83.0 the script reads both from that service when it enables traffic flow, and the service keeps them after the migration. See Keeping secrets out of the config file.

For installations created with getting-started-enterprise.sh, use 1.7 Enable features on an existing installation instead.

The script targets an existing combined-server deployment that has a docker-compose.yml, a bind-mounted config.yaml, and a persistent /var/lib/netbird data volume.

3.1 Prerequisites

  • The existing community combined-server deployment is healthy, the dashboard loads, and an admin can sign in.
  • The deployment uses Docker Compose.
  • bash, openssl, Docker, and Docker Compose are available on the host.
  • At least 5 GB of free disk space — the enterprise images (~2.2 GB) are pulled while the community images are still present (~1.5 GB extra), plus a SQLite backup and Postgres data.
  • yq is installed using the Mike Farah implementation; the Python wrapper is not supported.
  • An enterprise license key authorized for the products you want to enable.
  • Access to the deployment directory that contains docker-compose.yml.

3.2 What the migration script can do

The script asks which steps to apply:

StepWhat it does
Image swapReplaces the community server and dashboard images with the enterprise images and adds the enterprise license key.
Postgres migrationAdds Postgres, generates config.yaml.enterprise, backs up the SQLite data volume, and runs migrate-store --verify.
Traffic flowAdds NATS, a flow receiver, and a flow enricher. Requires Postgres and traffic-flow licenses.

For SQLite deployments, the Postgres migration is handled by the script through the built-in migrate-store command. It copies the legacy SQLite stores (store.db, integrations.db, events.db, and idp.db when present) into Postgres and verifies row counts after the copy.

3.3 Run the migration script

Run the script from the directory that contains the existing docker-compose.yml:

cd /path/to/existing/netbird/deployment
curl -fsSL https://pkgs.netbird.io/migrate-to-enterprise.sh | bash

The script detects the combined-server service name, the dashboard service name, the host path for config.yaml, the data volume mounted at /var/lib/netbird, and the Compose network. It then prompts for the license key, whether to migrate to Postgres, and whether to enable traffic flow.

3.4 Files created by the migration script

The script does not modify the existing docker-compose.yml or original config.yaml directly. It writes migration artifacts next to them:

File or directoryPurpose
docker-compose.override.ymlCompose override with the enterprise images and optional Postgres or traffic-flow services.
config.yaml.enterpriseGenerated when the run migrates to Postgres or enables traffic flow: a copy of config.yaml with those changes, which the enterprise server runs on from then on.
.env additionsLicense key and generated secrets used by the override file.
backups/sqlite-pre-enterprise-*SQLite data backup created before the Postgres migration.

Docker Compose automatically merges docker-compose.override.yml with the existing docker-compose.yml.

3.5 Validate after migration

After the script completes:

  • Run docker compose ps and confirm the expected services are running.
  • Check docker compose logs -f netbird-server.
  • Open the existing NetBird dashboard URL and sign in with an existing admin user.
  • Confirm users, peers, policies, routes, setup keys, and account settings are present.
  • If Postgres migration was selected, confirm historical activity and embedded IdP data are present.
  • If traffic flow was enabled, confirm flow data appears in the dashboard after peers generate traffic.

3.6 Return to the Community Edition

To switch back to the Community Edition, see Return to the Community Edition. You can keep the data created after the migration. If you migrated to Postgres, you can instead restore the pre-migration SQLite backup (backups/sqlite-pre-enterprise-*), which deletes everything created after the migration.

4. Troubleshooting

Each entry follows the same structure: Symptom → Cause → Resolution → Verification.

Boot fails: server.store.encryptionKey is required

  • Symptom: The server exits immediately with this message in the logs.
  • Cause: neither the server's config file (config.yaml.enterprise if a migration created it, otherwise config.yaml) nor the NB_STORE_ENCRYPTION_KEY environment variable supplies server.store.encryptionKey. On a deployment that has run before, this happens when the key was moved out of the config file into NB_STORE_ENCRYPTION_KEY and the variable does not reach the server, because docker-compose.yml does not pass it to netbird-server, its .env entry is empty, the container was restarted instead of recreated, or the server image is older than v0.83.0, which ignores the variable.
  • Resolution: If the deployment has run before, put its existing key back (from .env, docker-compose.yml, your secret store, or a backup of them) either in NB_STORE_ENCRYPTION_KEY on the netbird-server service or in server.store.encryptionKey in the config file, then run docker compose up -d netbird-server. A new key cannot read the data already in the database. Only for a new installation, generate a key with openssl rand -base64 32 and set it under server.store.encryptionKey.
  • Verification: After docker compose up -d netbird-server, the server should now reach the Management server created and Starting CloudServer log lines.

Traffic flow warning: traffic flow disabled: server.store.engine is "sqlite" but flow requires postgres

  • Symptom: The server boots, but the warning above appears and no flow events are written.
  • Cause: server.trafficFlow.enabled: true while running on SQLite.
  • Resolution: Run migrate-to-enterprise.sh, select the Postgres migration step, and enable traffic flow when prompted. The warning disappears once the server runs with Postgres-backed stores and traffic flow enabled.
  • Verification: psql -c '\dt' netbird shows network_traffic_events (and related) tables; events appear in the dashboard's flow view.

Licensed features unavailable: license is not valid

  • Symptom: Enterprise features remain unavailable, or the server logs show license is not valid.
  • Cause: NB_LICENSE_KEY is missing, expired, or incorrect.
  • Resolution: Confirm the env var is exported and matches the key issued by NetBird.
  • Verification: The server logs show successful license validation and enterprise features unlock.

Embedded IdP discovery returns 404

  • Symptom: curl https://<your-domain>/oauth2/.well-known/openid-configuration returns 404.
  • Cause: The reverse proxy is routing /oauth2/* to a different upstream or stripping the prefix, or server.auth.issuer does not match the public URL.
  • Resolution:
    1. Confirm server.auth.issuer is https://<your-domain>/oauth2.
    2. Confirm your reverse proxy forwards /oauth2/* to the NetBird server upstream.
    3. Restart the server.
  • Verification: The discovery document JSON is returned with issuer: https://<your-domain>/oauth2.

Boot loops on Postgres connection

  • Symptom: failed to connect to postgres: dial tcp ... connect: connection refused, repeated every few seconds.
  • Cause: Not a startup-ordering issue on the generated stacks — the server already waits for a healthy Postgres. This usually means Postgres is unhealthy or unreachable: a crash-looping container, a wrong DSN, a POSTGRES_PASSWORD that no longer matches the existing netbird_postgres volume, or a blocked network path.
  • Resolution: Run docker compose ps; if postgres isn't healthy, check docker compose logs postgres, then confirm the DSN uses host postgres with a matching user, database, and password.
  • Verification: docker compose ps shows postgres as healthy; the server connects once on startup with no connection-refused loop.

Traefik cannot issue a TLS certificate

  • Symptom: HTTPS to the dashboard is unreachable or shows a TLS error; docker compose logs traefik shows ACME challenge failures.
  • Cause: The FQDN does not resolve to the host, or TCP/443 is not reachable from Let's Encrypt's validation servers. The generated stack validates with the TLS-ALPN-01 challenge only (--certificatesresolvers.letsencrypt.acme.tlschallenge=true), which always runs over port 443. Port 80 is used for the HTTP→HTTPS redirect and is never used for certificate validation, so opening it does not help issuance.
  • Resolution: Confirm the DNS A record for NETBIRD_DOMAIN points at the host, and that the firewall / cloud security group allows inbound TCP/443.
  • Verification: docker compose logs traefik shows Validations succeeded; requesting certificates followed by Server responded with a certificate; curl -sI https://<your-domain>/ returns a valid response with a trusted certificate.

Traefik cannot issue a TLS certificate behind Cloudflare's proxy

  • Symptom: The domain is proxied by Cloudflare (the orange cloud is on), and docker compose logs traefik shows Cannot negotiate ALPN protocol "acme-tls/1" for tls-alpn-01 challenge.
  • Cause: Cloudflare answers the TLS connection itself and does not negotiate the acme-tls/1 protocol that the TLS-ALPN-01 challenge needs, so Let's Encrypt cannot validate the domain through it.
  • Resolution: Switch Traefik to the DNS-01 challenge, which proves the domain with a DNS record instead of a connection. For Cloudflare DNS, in the traefik service of docker-compose.yml:
    1. Replace --certificatesresolvers.letsencrypt.acme.tlschallenge=true with these two flags:
      - "--certificatesresolvers.letsencrypt.acme.dnschallenge=true"
      - "--certificatesresolvers.letsencrypt.acme.dnschallenge.provider=cloudflare"
      
    2. Create a Cloudflare API token whose only permission is DNS: Edit (under DNS & Zones), limited to the zone that holds your NetBird domain (for netbird.example.com, the example.com zone). Under Client IP Address Filtering, add an Is in rule with your server's public IP address, so a copy of the token does not work from any other address. Save the token alone in a file cf_dns_token next to docker-compose.yml, owned by root with mode 600. Give it to Traefik as a Compose secret, so the token is not in the container's environment or in docker inspect: add the environment and secrets keys to the traefik service, and the top-level secrets block:
      services:
        traefik:
          environment:
            CF_DNS_API_TOKEN_FILE: /run/secrets/cf_dns_token
          secrets: [cf_dns_token]
      
      secrets:
        cf_dns_token:
          file: ./cf_dns_token
      
    3. Run docker compose up -d traefik.
  • Verification: docker compose logs traefik shows dns01: trying to solve the challenge, then Validations succeeded; requesting certificates and Server responded with a certificate. For the rest of running behind Cloudflare (gRPC, STUN, client IPs), see Behind Cloudflare's proxy.

First-login owner-setup page is not shown

  • Symptom: The dashboard loads, but the regular sign-in screen appears instead of the owner-setup flow.
  • Cause: An owner account already exists, so the API reports setupRequired: false. Either setup completed earlier in this deployment, or a previous run left state behind.
  • Resolution: Sign in with the existing owner credentials if available. To start over from scratch:
    docker compose down --volumes   # removes containers and the postgres/embedded-IdP data
    rm -rf .env docker-compose.yml config.yaml traefik
    curl -fsSL https://pkgs.netbird.io/getting-started-enterprise.sh | bash
    
  • Verification: curl -s https://<your-domain>/api/instance | jq . returns setupRequired: true; the dashboard now shows the owner-setup flow on first visit.

Appendix: Using a custom TLS certificate

By default, Traefik obtains a certificate from Let's Encrypt and renews it automatically. Stay on that path unless you need your own certificate, because everything below makes renewal your responsibility. Operators using an internal PKI, a corporate CA, or a pre-issued wildcard certificate serve their own certificate through Traefik's file provider, which you enable below.

Place the certificate and key on the host

PEM-encoded, with the full chain in the certificate file:

sudo mkdir -p /etc/netbird/certs
sudo cp /path/to/fullchain.pem /etc/netbird/certs/cert.pem
sudo cp /path/to/privkey.pem   /etc/netbird/certs/key.pem
sudo chmod 600 /etc/netbird/certs/key.pem

Create the dynamic configuration file

Create a traefik directory next to docker-compose.yml and put a dynamic.yaml in it:

mkdir -p traefik

traefik/dynamic.yaml:

tls:
  stores:
    default:
      defaultCertificate:
        certFile: /certs/cert.pem
        keyFile: /certs/key.pem

/certs is a path inside the container; the next step mounts /etc/netbird/certs there. Setting defaultCertificate serves this certificate on every connection, including from clients that send no SNI (Server Name Indication).

If your Traefik already has a file provider, add this tls block to its existing dynamic configuration and skip the Enable the file provider edit below, because providers.file.directory and providers.file.filename are mutually exclusive.

Update docker-compose.yml

Installations created by the current script already have the file provider and the ./traefik mount, so only add the certificate mount and remove ACME.

Enable the file provider. Add this to the traefik service's command: list:

      - "--providers.file.directory=/etc/traefik/dynamic"

Mount the configuration directory and the certificates. Add these to its volumes: list:

      - ./traefik:/etc/traefik/dynamic:ro
      - /etc/netbird/certs:/certs:ro

Mount the directory, not the file. A bind-mounted single file is pinned to one inode, so anything that replaces the file instead of editing it in place leaves the container reading the old one, silently.

Remove ACME. Delete these three lines from the same command: list:

      - "--certificatesresolvers.letsencrypt.acme.email=${NETBIRD_LETSENCRYPT_EMAIL}"
      - "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
      - "--certificatesresolvers.letsencrypt.acme.tlschallenge=true"

Then delete every router label that references the resolver. A fresh install has four. List them rather than relying on that count, so you also catch docker-compose.override.yml on a migrated deployment:

grep -n 'tls.certresolver' docker-compose*.yml

Each match looks like this, and all of them go:

      - traefik.http.routers.netbird-dashboard.tls.certresolver=letsencrypt

Leave the corresponding traefik.http.routers.*.tls=true labels in place.

Apply and verify

docker compose up -d
echo | openssl s_client -connect <your-domain>:443 -servername <your-domain> 2>/dev/null \
  | openssl x509 -noout -subject -issuer -enddate

Operational notes

  • The certificate must cover NETBIRD_DOMAIN from .env. A wildcard like *.example.com works for netbird.example.com.

  • If the certificate is signed by a private CA, every peer must trust the issuing CA. Install the CA bundle in each peer's system trust store. A peer that does not trust it fails to connect at all, logging x509: certificate signed by unknown authority.

    The NetBird Proxy container is a peer too. Without the CA it still registers as online, but it cannot connect to the Signal service, so requests to its services fail.

    Give the proxy a CA bundle that holds the host's public roots and your CA. Add it in docker-compose.override.yml, not docker-compose.yml: running getting-started-enterprise.sh --enable-proxy or --enable-traffic-events regenerates docker-compose.yml, so a hand edit there does not survive. On Debian and Ubuntu hosts:

    cat /etc/ssl/certs/ca-certificates.crt /path/to/your-ca.pem | sudo tee /etc/netbird/certs/proxy-ca-bundle.pem > /dev/null
    
    services:
      proxy:
        environment:
          - SSL_CERT_FILE=/etc/ssl/netbird/ca-bundle.pem
        volumes:
          - /etc/netbird/certs/proxy-ca-bundle.pem:/etc/ssl/netbird/ca-bundle.pem:ro
    

    Then run docker compose up -d proxy.

  • Renewals. Replace both files at the same paths, then touch traefik/dynamic.yaml. Traefik watches the dynamic configuration, not the certificates it references, so replacing them alone has no effect. Touching it reloads them with no container restart.

  • You can leave the netbird_traefik_letsencrypt volume in place. With no resolver configured, the stored certificate is inert.

  • --enable-proxy and --enable-traffic-events keep this setup.

  • Dropping the 80:80 mapping does not affect certificates: this deployment validates over TLS-ALPN-01 on port 443 and never uses port 80 for ACME. You do lose the HTTP→HTTPS redirect.

Appendix: Outbound connections

Allow HTTPS (443/tcp, or your identity provider's own ports) from the NetBird host to the host names below, and DNS (53/udp and 53/tcp) from the NetBird host to its resolver. The list covers everything this script installs. It does not cover the NetBird Proxy and CrowdSec that --enable-proxy adds. Keep the rows marked Always open, except as their Needed cell says. The other rows are needed only while you download the script or pull images (at install, and when an upgrade pulls new images), or are optional.

Host nameUsed forNeeded
pkgs.netbird.ioDownloading the install script. On every start, the server also checks this host for updates to its GeoLite2 (IP geolocation) databases.Always. You can close it after the install in two cases: geolocation is off (NB_DISABLE_GEOLOCATION=true), or the server has started once with this host open (that start downloads the databases) and you then set disableGeoliteUpdate: true (see Geolocation database)
acme-v02.api.letsencrypt.orgIssuing and renewing Traefik's Let's Encrypt certificateAlways, unless you use a custom TLS certificate
license.netbird.ioLicense validation by the netbird-server, receiver and enricher servicesAlways
The host names and ports of your identity provider's issuer, token_endpoint and jwks_uri, as its OpenID configuration lists them (443 when a URL names no port). With Keycloak, all three are on the issuer's hostThe server reads the provider's OpenID configuration when you add the provider and every time the server starts; the server calls the token and key URLs during sign-inAlways, if you connect one
github.com, release-assets.githubusercontent.comDownloading the install script: pkgs.netbird.io redirects to the script's release on GitHubWhen you download the script
ghcr.io, pkg-containers.githubusercontent.comPulling the NetBird images (netbird-server-cloud, dashboard-cloud, flow-receiver-cloud, flow-enricher-cloud) from GitHub's registryWhen you pull images
registry-1.docker.io, auth.docker.io, production.cloudfront.docker.comPulling the Traefik, Postgres and NATS images from Docker Hub. If a pull fails with these three allowed, check Docker's allowlist pageWhen you pull images
api.github.comThe server's version check, for the latest dashboard releaseOptional
metrics.netbird.ioAnonymous usage metricsOptional. To turn them off, set disableAnonymousMetrics: true under server: in config.yaml, or in config.yaml.enterprise instead if your install directory has one, then run docker compose restart netbird-server
update.traefik.ioTraefik's own check for new Traefik versionsOptional

If the netbird-server, receiver or enricher service restarts while license.netbird.io is unreachable, that service starts with the license invalid: the API endpoints of licensed features return 403 with failed to validate user permissions: license invalid, and the enricher skips traffic events. Once license.netbird.io is reachable again, each service validates the license at its next retry. Retries start one minute apart and slow to one every 30 minutes, so after a long outage, restart the service (for example docker compose restart netbird-server) to validate at once.