{"record":{"id":"e3f6af9f279aadd2","repo":"tailscale/tailscale","slug":"error-service-flag-is-only-compatible-with-back","errorCode":null,"errorMessage":"Error: --service flag is only compatible with background mode","messagePattern":"Error: --service flag is only compatible with background mode","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/tailscale/cli/serve_v2.go","lineNumber":418,"sourceCode":"\t\tforService := e.service != \"\"\n\t\tif !e.bg.IsSet {\n\t\t\te.bg.Value = forService\n\t\t}\n\n\t\tfunnel := subcmd == funnel\n\t\tif forService && funnel {\n\t\t\treturn errors.New(\"Error: --service flag is not supported with funnel\")\n\t\t}\n\n\t\tif funnel {\n\t\t\t// verify node has funnel capabilities\n\t\t\tif err := e.verifyFunnelEnabled(ctx, 443); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\n\t\tif forService && !e.bg.Value {\n\t\t\treturn errors.New(\"Error: --service flag is only compatible with background mode\")\n\t\t}\n\n\t\tmount, err := cleanURLPath(e.setPath)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to clean the mount point: %w\", err)\n\t\t}\n\n\t\tsrvType, srvPort, err := srvTypeAndPortFromFlags(e)\n\t\tif err != nil {\n\t\t\tfmt.Fprintf(e.stderr(), \"error: %v\\n\\n\", err)\n\t\t\treturn errHelpFunc(subcmd)\n\t\t}\n\n\t\tif (srvType == serveTypeHTTP || srvType == serveTypeHTTPS) && e.proxyProtocol != 0 {\n\t\t\treturn fmt.Errorf(\"PROXY protocol is only supported for TCP forwarding, not HTTP/HTTPS\")\n\t\t}\n\t\t// Validate PROXY protocol version\n\t\tif e.proxyProtocol != 0 && e.proxyProtocol != 1 && e.proxyProtocol != 2 {","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/tailscale/tailscale/blob/cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042/cmd/tailscale/cli/serve_v2.go#L400-L436","documentation":"Error \"Error: --service flag is only compatible with background mode\" thrown in tailscale/tailscale.","triggerScenarios":"Thrown at cmd/tailscale/cli/serve_v2.go:418 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cfe32b8be6a33f8e24fbc369cbfbf7c729d9e042","analyzedAt":"2026-08-15T19:58:31.583Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}