Netbird
WireGuard-based zero-config VPN.
Overview
NetBird is a modern WireGuard-based mesh VPN platform that eliminates the traditional hub-and-spoke architecture by creating direct peer-to-peer connections between devices. The netbird-management component serves as the central control plane, handling device registration, key distribution, and network policies, while maintaining a web dashboard for administrative oversight. NetBird was designed to address the complexity of traditional VPN solutions by providing zero-configuration mesh networking with enterprise-grade security.
This stack combines three critical components to deliver a complete mesh VPN solution: netbird-management handles device authentication and network topology management, netbird-signal facilitates the initial WebRTC signaling required for peer discovery and connection establishment, and coturn provides STUN/TURN relay services when direct peer-to-peer connections cannot be established due to restrictive NAT or firewall configurations. Together, these services enable automatic mesh network formation where each client can communicate directly with others without routing through a central server.
This configuration is ideal for organizations seeking to replace traditional VPN infrastructure, remote teams requiring secure inter-device communication, and infrastructure teams managing distributed systems across multiple cloud providers. The self-hosted approach provides complete control over the VPN infrastructure while maintaining the simplicity of modern mesh networking protocols, making it particularly valuable for security-conscious organizations that need granular control over their networking stack.
Key Features
- WireGuard-based mesh networking with automatic peer discovery and key exchange
- Web-based management dashboard for device enrollment and network policy configuration
- WebRTC signaling server for establishing direct peer-to-peer connections
- STUN/TURN relay services through coturn for NAT traversal and firewall bypass
- Zero-configuration client setup using setup keys and automatic endpoint discovery
- Real-time connection status monitoring and network topology visualization
- Support for multiple authentication backends through OIDC integration
- Automatic failover between direct connections and TURN relay when needed
Common Use Cases
- 1Replacing traditional hub-and-spoke VPN infrastructure with modern mesh networking
- 2Securing remote team communications with direct device-to-device connectivity
- 3Connecting distributed microservices across multiple cloud providers and regions
- 4Creating secure development environments with automatic peer discovery
- 5Establishing site-to-site connectivity for branch offices without dedicated hardware
- 6Building secure IoT device networks with centralized management and monitoring
- 7Implementing zero-trust network architecture with granular access controls
Prerequisites
- Minimum 2GB RAM and 2 CPU cores for handling mesh network coordination
- Valid domain name with SSL certificate for production OIDC authentication
- OIDC provider configured (Auth0, Keycloak, Google Workspace, or Azure AD)
- UDP ports 3478 and 10000 accessible for STUN/TURN and signaling services
- Understanding of WireGuard concepts and mesh networking principles
- Network firewall configuration knowledge for proper service exposure
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 management: 3 image: netbirdio/management:latest4 container_name: netbird-management5 restart: unless-stopped6 environment: 7 NETBIRD_DOMAIN: localhost8 NETBIRD_AUTH_OIDC_CONFIGURATION_ENDPOINT: ""9 volumes: 10 - netbird_mgmt:/var/lib/netbird11 ports: 12 - "8080:80"1314 signal: 15 image: netbirdio/signal:latest16 container_name: netbird-signal17 restart: unless-stopped18 ports: 19 - "10000:80"2021 coturn: 22 image: coturn/coturn:latest23 container_name: netbird-coturn24 restart: unless-stopped25 ports: 26 - "3478:3478/udp"27 - "3478:3478/tcp"2829volumes: 30 netbird_mgmt: .env Template
.env
1# Configure OIDC provider for authentication2# See docs.netbird.io for full setupUsage Notes
- 1Docs: https://docs.netbird.io/
- 2Management dashboard at http://localhost:8080
- 3Requires OIDC provider (Auth0, Keycloak, etc.) for authentication
- 4Clients download Netbird app and connect with setup key
- 5Signal server handles peer-to-peer connection negotiation
- 6TURN server (coturn) enables NAT traversal when direct connection fails
Individual Services(3 services)
Copy individual services to mix and match with your existing compose files.
management
management:
image: netbirdio/management:latest
container_name: netbird-management
restart: unless-stopped
environment:
NETBIRD_DOMAIN: localhost
NETBIRD_AUTH_OIDC_CONFIGURATION_ENDPOINT: ""
volumes:
- netbird_mgmt:/var/lib/netbird
ports:
- "8080:80"
signal
signal:
image: netbirdio/signal:latest
container_name: netbird-signal
restart: unless-stopped
ports:
- "10000:80"
coturn
coturn:
image: coturn/coturn:latest
container_name: netbird-coturn
restart: unless-stopped
ports:
- 3478:3478/udp
- 3478:3478/tcp
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 management:5 image: netbirdio/management:latest6 container_name: netbird-management7 restart: unless-stopped8 environment:9 NETBIRD_DOMAIN: localhost10 NETBIRD_AUTH_OIDC_CONFIGURATION_ENDPOINT: ""11 volumes:12 - netbird_mgmt:/var/lib/netbird13 ports:14 - "8080:80"1516 signal:17 image: netbirdio/signal:latest18 container_name: netbird-signal19 restart: unless-stopped20 ports:21 - "10000:80"2223 coturn:24 image: coturn/coturn:latest25 container_name: netbird-coturn26 restart: unless-stopped27 ports:28 - "3478:3478/udp"29 - "3478:3478/tcp"3031volumes:32 netbird_mgmt:33EOF3435# 2. Create the .env file36cat > .env << 'EOF'37# Configure OIDC provider for authentication38# See docs.netbird.io for full setup39EOF4041# 3. Start the services42docker compose up -d4344# 4. View logs45docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/netbird/run | bashTroubleshooting
- Management dashboard shows 'OIDC configuration error': Verify NETBIRD_AUTH_OIDC_CONFIGURATION_ENDPOINT points to valid OIDC provider discovery endpoint
- Clients fail to connect with 'signal server unreachable': Ensure port 10000 is accessible and netbird-signal container is running
- Peer connections fail with 'TURN server timeout': Check coturn container logs and verify UDP port 3478 is not blocked by firewall
- Setup key generation fails: Confirm netbird_mgmt volume has proper write permissions and sufficient disk space
- WebRTC connection establishment timeouts: Verify both signaling and TURN services are accessible from client networks
- Management API returns 500 errors: Check container logs for database connectivity issues and ensure volume persistence
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
netbird-managementnetbird-signalcoturn
Tags
#netbird#wireguard#vpn#mesh
Category
Security & NetworkingAd Space
Shortcuts: C CopyF FavoriteD Download