Skip to main content

Overview

The netbird service command manages the NetBird daemon service on your system. The daemon runs in the background and maintains your NetBird connections.

Description

The NetBird daemon service:
  • Runs in the background as a system service
  • Maintains persistent connections to the NetBird network
  • Automatically reconnects after network changes or system restarts
  • Manages WireGuard interface and routing
  • Handles peer connections and authentication
The service integrates with your system’s service manager:
  • Linux: systemd, SysV init, or Upstart
  • macOS: launchd
  • Windows: Windows Service Manager
  • FreeBSD: rc.d

Subcommands

  • install - Install NetBird as a system service
  • uninstall - Uninstall NetBird service from the system
  • start - Start the NetBird service
  • stop - Stop the NetBird service
  • restart - Restart the NetBird service
  • status - Show NetBird service status
  • run - Run NetBird as a service (used by service manager)
  • reconfigure - Reconfigure NetBird service with new settings

Service Flags

boolean
default:"false"
Disables profiles featureIf enabled, the client will not be able to change or edit any profile.To persist this setting:
boolean
default:"false"
Disables update settings featureIf enabled, the client will not be able to change or edit any settings.To persist this setting:

install

Install NetBird as a system service.

Flags

string[]
Sets extra environment variables for the serviceYou can specify comma-separated list of KEY=VALUE pairs.Examples:
  • --service-env NB_LOG_LEVEL=debug
  • --service-env NB_LOG_LEVEL=debug,CUSTOM_VAR=value

Examples

Basic installation:
Install with custom log level:
Install with multiple environment variables:
Install with profiles disabled:
Install with custom configuration:

What It Does

  1. Creates service configuration:
    • Linux (systemd): /etc/systemd/system/netbird.service
    • macOS (launchd): /Library/LaunchDaemons/io.netbird.client.plist
    • Windows: Registers Windows Service
    • FreeBSD (rc.d): /usr/local/etc/rc.d/netbird
  2. Sets service to start on boot
  3. Configures service user and permissions
  4. Sets environment variables
After installation, you need to start the service:

uninstall

Uninstall NetBird service from the system.

Examples

Uninstall service:

What It Does

  1. Stops the service if running
  2. Removes service configuration files
  3. Disables automatic startup
  4. Does NOT remove:
    • Configuration files (/etc/netbird/config.json)
    • Log files
    • NetBird binary
Uninstalling the service will disconnect you from the NetBird network. Your configuration files will be preserved.

start

Start the NetBird service.

Examples

Start service:

Behavior

  • Starts the NetBird daemon
  • If auto-connect is enabled (default), automatically runs netbird up
  • Service continues running in background
  • Survives terminal/SSH session closure

stop

Stop the NetBird service.

Examples

Stop service:

Behavior

  • Disconnects from NetBird network
  • Stops the daemon process
  • Does not uninstall the service
  • Service will not auto-start on reboot if stopped manually (on some systems)

restart

Restart the NetBird service.

Examples

Restart service:
Useful after configuration changes:

Behavior

  1. Stops the service gracefully
  2. Disconnects all peers
  3. Starts the service again
  4. Re-establishes connections

status

Show NetBird service status.

Examples

Check service status:
Example output (systemd):

Status Information

  • Loaded: Service configuration loaded
  • Active: Current running state
  • Enabled: Will start on boot
  • PID: Process ID
  • Uptime: How long service has been running
  • Memory: Memory usage

run

Run NetBird as a service. This command is used by the service manager and should not be called directly.
Do not run this command directly. Use netbird service start instead.

reconfigure

Reconfigure NetBird service with new settings without manual uninstall/install.

Flags

Same flags as install command:
  • --service-env
  • --disable-profiles
  • --disable-update-settings

Examples

Update environment variables:
Enable profiles:

Behavior

  1. Stops the service if running
  2. Updates service configuration
  3. Restarts the service if it was running

Complete Setup Example

Initial Installation

With Custom Configuration

Service Environment Variables

Common environment variables to set via --service-env:

NetBird Configuration

  • NB_CONFIG - Configuration file path
  • NB_LOG_LEVEL - Log level (trace, debug, info, warn, error)
  • NB_LOG_FILE - Log file path
  • NB_MANAGEMENT_URL - Management server URL
  • NB_ADMIN_URL - Admin panel URL
  • NB_NO_BROWSER - Disable browser for SSO (true/false)

Example

Platform-Specific Details

Linux (systemd)

Service file location:
Manual service management:
View logs:

macOS (launchd)

Service file location:
Manual service management:
View logs:

Windows

Service name: Netbird Manual service management (PowerShell):
View logs:

Troubleshooting

Service Won’t Start

Check service status:
View logs:
Check permissions:

Service Starts But Can’t Connect

Check if service is running:
Restart service:

Permission Denied

Service commands typically require root/administrator privileges:

Auto-Start on Boot

The service is configured to start automatically on boot after installation.

Disable Auto-Start

Linux (systemd):
macOS (launchd):
Windows:

Re-enable Auto-Start

Linux (systemd):
macOS (launchd):
Windows:

See Also