Overview
Thenetbird down command disconnects your device from the NetBird network and terminates all active peer-to-peer connections.
Description
This command performs the following actions:- Tears down all peer-to-peer connections
- Disconnects from the management server
- Removes routes and DNS configuration
- Brings down the WireGuard interface (but does not remove it)
- Stops firewall rules
The
netbird down command does not:- Uninstall the NetBird service
- Log you out (your authentication remains valid)
- Delete configuration files
netbird logout to clear authentication or netbird service uninstall to completely remove NetBird.Flags
This command uses only the global flags. See CLI Overview for available options.Examples
Basic Disconnect
Disconnect from the NetBird network:Verify Disconnection
Check status after disconnecting:Disconnect and Stop Service
To disconnect and prevent automatic reconnection:Behavior
What Happens When You Disconnect
- Peer Connections: All active WireGuard tunnels to peers are terminated
- Management Connection: The connection to the management server is closed
- Network Interface: The WireGuard interface (e.g.,
wt0) is brought down but not deleted - DNS Configuration: Custom DNS settings are removed, system DNS is restored
- Routes: NetBird-managed routes are removed from the routing table
- Firewall: NetBird-specific firewall rules are removed
What Persists After Disconnection
- Authentication tokens: You remain logged in
- Configuration files: All settings are preserved in
/etc/netbird/config.json - Service installation: The NetBird service remains installed
- Logs: Historical logs are retained
Auto-Reconnection
If auto-connect is enabled (default), the NetBird daemon will automatically reconnect when:- The service is restarted
- The system reboots
- Network connectivity is restored
Use Cases
Temporary Disconnection
Disconnect temporarily while keeping the service running:Troubleshooting
Reset the connection to resolve connectivity issues:Switch Networks or Profiles
Disconnect before switching to a different profile:Maintenance Mode
Disconnect during system maintenance:Status Messages
Disconnected- Successfully disconnected from the NetBird networkfailed to connect to daemon- The NetBird daemon is not running
Common Issues
Daemon Not Running
Permission Denied
On some systems, you may need elevated privileges:Related Commands
- netbird up - Connect to the NetBird network
- netbird status - Check connection status
- netbird logout - Log out and clear authentication
- netbird service stop - Stop the NetBird service
Technical Details
Connection Lifecycle
Cleanup Actions
When you runnetbird down, NetBird performs cleanup in this order:
- Close all peer WireGuard connections
- Stop DNS resolver
- Remove custom routes
- Clear firewall rules
- Bring down WireGuard interface
- Close management connection
- Update local state to “disconnected”
Network Interface State
The WireGuard interface remains in the system but in a “down” state:netbird up command.