2.8 KiB
Netbird Docker Deployment
Docker Compose configurations and automated setup for Netbird - a zero-trust mesh VPN solution.
Quick Start
Start here: Run the automated setup script
cd /media/DATA/src/ansible/poc/netbird
./setup-netbird.sh
Or manually clone official repo:
git clone https://github.com/netbirdio/netbird.git
cd netbird/infrastructure_files/compose
docker-compose up -d
⚠️ Important: OIDC Bug in Pre-built Images
Pre-built Netbird Docker images crash on startup with segmentation fault in OIDC code. Do not use local stack-server.yml directly. Use official repository or setup script instead.
Files
| File | Purpose |
|---|---|
| setup-netbird.sh | ⭐ Automated setup script |
| SETUP_NETBIRD_OFFICIAL.md | Official deployment methods |
| stack-server.yml | Local Docker Compose (⚠️ management crashes) |
| stack-client.yml | Client instance |
| VERSIONS.md | Version reference |
Client Deployment
Once you have working Netbird management:
export MANAGEMENT_URL="https://your-server:33073"
export SETUP_KEY="from-dashboard"
docker-compose -f stack-client.yml up -d
Multiple clients:
docker-compose -f stack-client.yml -p client1 up -d
docker-compose -f stack-client.yml -p client2 up -d
Android Setup (Same WiFi)
- Get server IP:
hostname -I - Open firewall:
sudo ufw allow 33073 - Android app: Enter
http://<server-ip>:33073+ setup key
Test: curl http://<ip>:33073/api/health
Docker Commands
# Local infrastructure only (management will crash)
docker-compose -f stack-server.yml up -d
docker-compose -f stack-server.yml ps
docker-compose -f stack-server.yml logs -f
# Stop
docker-compose -f stack-server.yml down
# Database access
docker-compose -f stack-server.yml exec postgres \
psql -U netbird -d netbird
# Client commands
docker-compose -f stack-client.yml logs -f
Services
| Service | Port |
|---|---|
| Management API | 33073 |
| Signal | 10000 |
| Dashboard | 80 |
| PostgreSQL | 5432 |
| Redis | 6379 |
| TURN | 3478, 5349 |
Environment Variables
# Server (set before docker-compose up)
POSTGRES_PASSWORD=netbird123
NETBIRD_MGMT_SINGLE_ACCOUNT_MODE=true
NETBIRD_MGMT_LOG_LEVEL=info
# Client
MANAGEMENT_URL=https://server:33073
SETUP_KEY=your-key
Requirements
Server: Docker, 2GB RAM, ports 80, 33073, 10000, 3478, 5349
Client: Docker with /dev/net/tun access, NET_ADMIN capability
Troubleshooting
Management crashes: Use official repo or setup script
Can't connect from Android: Check firewall, use correct IP (not localhost)
Database issues: Check logs with docker-compose logs postgres
Resources
- Official Docs
- GitHub
- Detailed guide in SETUP_NETBIRD_OFFICIAL.md