netbirdio/netbird · error
--json-socket requires --enable-json-socket to configure…
Error message
--json-socket requires --enable-json-socket to configure the daemon JSON gateway
What it means
Flag dependency check: --json-socket was set without --enable-json-socket. The socket path flag only configures the optional JSON gateway listener, which must be explicitly enabled; specifying a path for a disabled feature indicates a mistaken invocation.
Solutions
- Add --enable-json-socket alongside --json-socket
- Drop --json-socket if the JSON gateway is not wanted
- Apply the same pairing on install and start invocations
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at client/cmd/service_controller.go:27 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of netbirdio/netbird@93e97f4bf1 (2026-08-16).
Data as JSON: /api/errors/f9a11190f527bc6b.
Report an issue: GitHub.
Appendix: source
Thrown at client/cmd/service_controller.go:27
"time"
"github.com/kardianos/service"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"google.golang.org/grpc"
"github.com/netbirdio/netbird/client/internal/daemonaddr"
"github.com/netbirdio/netbird/client/internal/ipcauth"
"github.com/netbirdio/netbird/client/proto"
"github.com/netbirdio/netbird/client/server"
"github.com/netbirdio/netbird/client/system"
"github.com/netbirdio/netbird/util"
)
func validateJSONSocketFlags() error {
if serviceCmd.PersistentFlags().Changed("json-socket") && !enableJSONSocket {
return fmt.Errorf("--json-socket requires --enable-json-socket to configure the daemon JSON gateway")
}
return nil
}
// daemonServerOptions installs the transport credentials that expose each
// caller's kernel-authenticated identity to the handlers, which is what lets
// the daemon require root/administrator for privileged operations.
//
// The handshake exchanges no bytes, so older CLI and UI binaries still
// interoperate. Callers on a TCP socket carry no identity at all: the daemon
// keeps serving them, and the privileged operations deny them, so a warning is
// logged to make the loss of functionality visible.
func daemonServerOptions(network string) []grpc.ServerOption {
if network == "tcp" {
log.Warnf("daemon is listening on TCP (%s): callers carry no verifiable identity over TCP, "+
"so privileged operations (SSH root login, SSH auth, enabling the SSH server, management URL changes, "+
"deregistration) will be denied. Use a unix socket, or npipe:// on Windows", daemonAddr)
return nilView on GitHub (pinned to 93e97f4bf1)