netbirdio/netbird · error

daemon up failed: %v

Error message

daemon up failed: %v

What it means

Generic umbrella returned by runInDaemonMode when doDaemonUp fails. doDaemonUp performs the whole registration sequence: reading the setup key, building the LoginRequest from flags, the backoff-wrapped Login RPC, optional SSO login, and the final Up RPC. Any failure in that chain surfaces here with only 'daemon up failed' as context, so the underlying error string in the output is the real diagnostic.

Source

Thrown at client/cmd/up.go:333

	}

	username, err := user.Current()
	if err != nil {
		return fmt.Errorf("get current user: %v", err)
	}

	// set the new config
	req := setupSetConfigReq(customDNSAddressConverted, cmd, activeProf.ID.String(), username.Username)
	if _, err := client.SetConfig(ctx, req); err != nil {
		if st, ok := gstatus.FromError(err); ok && st.Code() == codes.Unavailable {
			log.Warnf("setConfig method is not available in the daemon: %s", st.Message())
		} else {
			return daemonCallError("call service setConfig method", err)
		}
	}

	if err := doDaemonUp(ctx, cmd, client, pm, activeProf, customDNSAddressConverted, username.Username); err != nil {
		return fmt.Errorf("daemon up failed: %v", err)
	}
	cmd.Println("Connected")
	return nil
}

func doDaemonUp(ctx context.Context, cmd *cobra.Command, client proto.DaemonServiceClient, pm *profilemanager.ProfileManager, activeProf *profilemanager.Profile, customDNSAddressConverted []byte, username string) error {

	providedSetupKey, err := getSetupKey()
	if err != nil {
		return fmt.Errorf("get setup key: %v", err)
	}

	loginRequest, err := setupLoginRequest(providedSetupKey, customDNSAddressConverted, cmd)
	if err != nil {
		return fmt.Errorf("setup login request: %v", err)
	}

	profileID := activeProf.ID.String()

View on GitHub (pinned to 93e97f4bf1)

Solutions

  1. Read the inner error after the colon; it identifies the actual failing step (setup key, login request, SSO, or the Up call)
  2. Re-run with `--log-level debug` and check the daemon log for the matching failure
  3. If the inner error is a privilege refusal, follow the command it prints (it tells you how to rerun with elevation)
Defensive patterns

Strategy: try-catch

Try / catch

// umbrella error: branch on the wrapped cause, not on this prefix
if err := upCmd.Execute(); err != nil {
	switch {
	case strings.Contains(err.Error(), "get setup key"): // fix credential source
	case strings.Contains(err.Error(), "login backoff"): // connectivity to management
	case strings.Contains(err.Error(), "sso login failed"): // redo interactive login
	default: // inspect daemon logs
	}
}

Prevention

When it happens

Trigger: Any of: setup-key file unreadable; invalid flag values caught by setupLoginRequest; Login RPC failing (bad setup key, unreachable management); SSO flow erroring; Up RPC refusing (e.g. privilege refusal routed through daemonCallError).

Common situations: Users see this after `netbird up` with wrong credentials or flags; the actionable text is the wrapped inner error, not this prefix.

Related errors


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