netbirdio/netbird · error

unsupported daemon address protocol: %v

Error message

unsupported daemon address protocol: %v

What it means

The --daemon-addr value carried a scheme, but it is not one of the three the daemon serves: unix, tcp, or npipe. The unsupported scheme is echoed back verbatim, and matching is case-sensitive.

Source

Thrown at client/cmd/service_socket.go:59

	listener, err := net.Listen(network, address)
	if err != nil {
		return nil, err
	}

	return &socketListener{Listener: listener, network: network, address: address}, nil
}

func parseListenAddress(addr string) (string, string, error) {
	network, address, ok := strings.Cut(addr, "://")
	if !ok || network == "" || address == "" {
		return "", "", fmt.Errorf("address must be in [unix|tcp|npipe]://[path|host:port|name] format: %q", addr)
	}

	switch network {
	case "unix", "tcp", "npipe":
		return network, address, nil
	default:
		return "", "", fmt.Errorf("unsupported daemon address protocol: %v", network)
	}
}

func removeStaleUnixSocket(path string) {
	stat, err := os.Lstat(path)
	if err != nil {
		if !os.IsNotExist(err) {
			log.Debugf("stat socket file: %v", err)
		}
		return
	}

	if stat.Mode()&os.ModeSocket == 0 {
		return
	}

	if !isStaleUnixSocket(path) {
		return

View on GitHub (pinned to 93e97f4bf1)

Solutions

  1. Use exactly unix, tcp, or npipe as the scheme
  2. Point management URLs at --management-url, not --daemon-addr
  3. Fix casing and typos, e.g. tcp://127.0.0.1:8080
  4. Reinstall the service with the corrected address

Example fix

# before
netbird service run --daemon-addr http://127.0.0.1:8080
# after
netbird service run --daemon-addr tcp://127.0.0.1:8080
Defensive patterns

Strategy: validation

Validate before calling

func supportedDaemonScheme(a string) bool {
	n, _, ok := strings.Cut(a, "://")
	if !ok {
		return false
	}
	switch n {
	case "unix", "tcp", "npipe":
		return true
	}
	return false
}

Type guard

func isKnownDaemonNetwork(a string) (string, bool) {
	n, _, ok := strings.Cut(a, "://")
	switch n {
	case "unix", "tcp", "npipe":
		return n, ok
	}
	return "", false
}

Try / catch

network, address, err := parseListenAddress(addr)
if err != nil {
	if strings.Contains(err.Error(), "unsupported daemon address protocol") {
		// fix the scheme; the value is well-formed but wrong
	}
	return err
}

Prevention

When it happens

Trigger: --daemon-addr http://localhost:8080, udp://..., grpc://..., or a casing/typo variant like TCP:// or unix2://.

Common situations: Confusing the daemon IPC socket with the management URL (https://...) and passing that to --daemon-addr; hand-written configs with uppercase schemes.

Related errors


AI-assisted analysis of netbirdio/netbird@93e97f4bf1 (2026-08-16). Data as JSON: /api/errors/2c40f5bd602e1da8. Report an issue: GitHub.