Skip to main content
The fastest way to deploy NetBird is using Docker Compose with the automated getting-started script. This method sets up all required services with a single command.

Prerequisites

Before starting, ensure you have:
1

Linux Server

A Linux VM with at least 1 CPU and 2GB RAM. The server must be publicly accessible on:
  • TCP ports 80 and 443 (HTTPS)
  • UDP port 3478 (STUN)
2

Domain Name

A public domain name pointing to your server’s IP address (e.g., netbird.example.com)
3

Docker Installed

Install Docker with docker-compose plugin:
4

Required Utilities

Install jq and curl:
The getting-started.sh script automates the entire deployment process:

What the Script Does

The script will:
  1. Validate requirements - Check for Docker, jq, and curl
  2. Prompt for configuration - Ask about reverse proxy preferences
  3. Generate configurations - Create docker-compose.yml, config.yaml, and dashboard.env
  4. Generate secrets - Create encryption keys and relay auth secrets
  5. Start services - Launch all containers with proper networking
  6. Configure TLS - Set up automatic HTTPS via Let’s Encrypt (with Traefik)
The entire process takes about 2-3 minutes. You’ll be able to access the dashboard immediately after completion.

Interactive Setup Process

Step 1: Domain Configuration

If NETBIRD_DOMAIN is not set, the script will prompt:
Do not use netbird.example.com or localhost. You need a real domain name pointing to your server.

Step 2: Reverse Proxy Selection

Choose your reverse proxy configuration:
The simplest option - includes Traefik in the Docker Compose stack:
  • Automatic TLS via Let’s Encrypt
  • No manual certificate management
  • HTTP to HTTPS redirect configured
  • gRPC support for signal and management services
You’ll be prompted for:
The NetBird Proxy allows you to selectively expose internal network resources to the internet. It’s optional and can be enabled later if needed.If enabled, you’ll need to:
  • Provide a separate domain (e.g., proxy.example.com)
  • Add a wildcard DNS record (*.proxy.example.com)
  • Open UDP port 51820 for WireGuard connections

Option 1: External Traefik

For integration with an existing Traefik instance:
The script generates Docker labels for Traefik to discover services automatically.

Options 2-4: External Proxies

For Nginx, Nginx Proxy Manager, or Caddy, the script:
  1. Generates proxy configuration files
  2. Exposes container ports (bound to localhost or 0.0.0.0)
  3. Provides setup instructions
You’ll need to manually configure TLS certificates.

Option 5: Manual/Custom

Generates basic docker-compose.yml with exposed ports and displays configuration requirements.

Generated Files

After running the script, you’ll have:

docker-compose.yml

The main orchestration file with services:

config.yaml

Combined server configuration:
The encryptionKey encrypts sensitive data in the database. Back up this file - you cannot recover encrypted data without it.

dashboard.env

Dashboard environment variables:

Managing the Deployment

Starting Services

The script starts services automatically, but you can manage them manually:

Stopping Services

Using --volumes will delete all peer data, access policies, and user accounts. Only use this for complete reinstallation.

Updating NetBird

Viewing Service Status

Post-Installation

Accessing the Dashboard

Once services are running, access the dashboard:
The first access will:
  1. Redirect to the embedded OAuth2 provider
  2. Show the onboarding wizard
  3. Create the first admin account

Verifying Services

Check that all services are healthy:

Network Ports

Verify required ports are accessible:

Troubleshooting

Certificate Issues

If Let’s Encrypt certificate generation fails:
Let’s Encrypt requires ports 80 and 443 to be publicly accessible. Check firewall rules and DNS propagation.

Service Not Starting

Database Errors

Reinitializing Setup

To completely reset and reconfigure:

Advanced Configuration

Using External Database

To use PostgreSQL or MySQL instead of SQLite, edit config.yaml:
Then set environment variable in docker-compose.yml:

Custom Identity Provider

For advanced IdP setup (Auth0, Keycloak, Zitadel), use the alternative scripts:
See Identity Providers for detailed configuration.

Port Binding Options

By default, with external proxies, ports are bound to 127.0.0.1 for security:
If your reverse proxy is on a different host, bind to 0.0.0.0:
Binding to 0.0.0.0 exposes services to the network. Ensure proper firewall rules are in place.

Next Steps

Install Clients

Install NetBird clients on your devices

Access Control

Configure access policies and network rules

DNS Management

Set up private DNS for your network

Routing

Configure routes to external networks