Installation
- Install Script
- Debian/Ubuntu (APT)
- RHEL/Fedora/CentOS (DNF/YUM)
- Binary Installation
- NixOS
The easiest way to install NetBird on Linux is using the official installation script:This script automatically:
- Detects your Linux distribution
- Installs from the appropriate package manager (apt, dnf, yum, or rpm-ostree)
- Sets up the NetBird service
- Starts the daemon automatically
The install script requires
curl and sudo (or doas) to be installed on your system.Initial Setup
After installation, connect to your NetBird network:1
Start the NetBird service
The service should start automatically after installation. If not:
2
Connect to NetBird
Using SSO (Interactive Login):Using a Setup Key:For self-hosted installations:
3
Verify connection
Check your NetBird status:You should see:
Service Management
NetBird runs as a systemd service on Linux. Manage it using thenetbird service command:
Configuration
Config File Location
The NetBird configuration file is located at:- Standard:
/etc/netbird/config.json - FreeBSD:
/var/db/netbird/config.json
Log Files
Logs are written to/var/log/netbird/client.log by default.
View logs in real-time:
Environment Variables
NetBird supports configuration through environment variables with theNB_ prefix. Common examples:
Set service environment variables:
Command-Line Options
Key CLI flags fornetbird up:
Advanced Configuration
Running in Foreground Mode
For debugging or testing without the daemon:Custom External IP Mapping
For machines behind NAT or with multiple interfaces:Network Monitor
Control network change detection:Headless Servers
For servers without a desktop environment, use setup keys for authentication:The NetBird UI is automatically skipped during installation on systems without
XDG_CURRENT_DESKTOP or DESKTOP_SESSION environment variables.Troubleshooting
Check Connection Status
View Only Your NetBird IP
Common Issues
Service won't start
Service won't start
Check if the service is properly installed:Reinstall the service:
Connection timeout
Connection timeout
Ensure UDP port 3478 is open for STUN/TURN connectivity:Check if the WireGuard module is loaded:
TUN device errors
TUN device errors
Ensure the TUN module is loaded:
Debug logs
Debug logs
Enable debug logging:
Updating NetBird
- APT (Debian/Ubuntu)
- DNF (Fedora)
- YUM (CentOS/RHEL)
- Binary Installation
Uninstalling
1
Stop and uninstall the service
2
Remove packages
- APT
- DNF/YUM