{"record":{"id":"9206b195823013d3","repo":"AlistGo/alist","slug":"frp-server-address-is-required","errorCode":null,"errorMessage":"frp server address is required","messagePattern":"frp server address is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/frp/frp.go","lineNumber":249,"sourceCode":"\t\tif idx := bytes.IndexByte(buf, '\\n'); idx >= 0 && idx+1 < len(buf) {\n\t\t\tbuf = buf[idx+1:]\n\t\t}\n\t}\n\ttext := strings.TrimRight(string(buf), \"\\n\")\n\tif text == \"\" {\n\t\treturn []string{}, nil\n\t}\n\tlines := strings.Split(text, \"\\n\")\n\tif len(lines) <= limit {\n\t\treturn lines, nil\n\t}\n\treturn lines[len(lines)-limit:], nil\n}\n\nfunc buildConfig() (*v1.ClientCommonConfig, []v1.ProxyConfigurer, error) {\n\tserverAddr := setting.GetStr(conf.FRPServerAddr)\n\tif serverAddr == \"\" {\n\t\treturn nil, nil, fmt.Errorf(\"frp server address is required\")\n\t}\n\n\tserverPort := setting.GetInt(conf.FRPServerPort, 7000)\n\tauthToken := setting.GetStr(conf.FRPAuthToken)\n\tproxyName := setting.GetStr(conf.FRPProxyName, \"alist\")\n\tproxyType := setting.GetStr(conf.FRPProxyType, \"http\")\n\tcustomDomain := setting.GetStr(conf.FRPCustomDomain)\n\tsubdomain := setting.GetStr(conf.FRPSubdomain)\n\tremotePort := setting.GetInt(conf.FRPRemotePort, 0)\n\tlocalPort := setting.GetInt(conf.FRPLocalPort, 5244)\n\ttlsEnable := setting.GetBool(conf.FRPTLSEnable)\n\tstcpSecretKey := setting.GetStr(conf.FRPSTCPSecretKey)\n\n\tcfg := &v1.ClientCommonConfig{\n\t\tServerAddr: serverAddr,\n\t\tServerPort: serverPort,\n\t\tAuth: v1.AuthClientConfig{\n\t\t\tMethod: v1.AuthMethodToken,","sourceCodeStart":231,"sourceCodeEnd":267,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/internal/frp/frp.go#L231-L267","documentation":"Returned by buildConfig in internal/frp/frp.go when the FRP client is being started but the frp server address setting (conf.FRPServerAddr) is empty. FRP (fast reverse proxy) needs a remote server to register the alist instance against; without an address no client config can be built.","triggerScenarios":"Enabling/starting the FRP client while the 'frp server addr' setting is unset or blank; loading settings from a fresh install where FRPServerAddr was never populated.","commonSituations":"User toggles FRP on in admin settings but forgets the server address field; settings migrated/restored without FRP keys; whitespace-only value stored.","solutions":["Fill in the FRP server address in the admin settings (the host of your frps server).","Trim/validate the setting before starting the FRP client.","If FRP is not wanted, disable the FRP feature so buildConfig is not invoked.","Confirm the setting key persisted (check the settings storage) after saving."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"serverAddr := strings.TrimSpace(setting.GetStr(conf.FRPServerAddr))\nif serverAddr == \"\" {\n    // do not start FRP; prompt admin to configure it\n}","typeGuard":null,"tryCatchPattern":"cfg, proxies, err := buildConfig()\nif err != nil {\n    if strings.Contains(err.Error(), \"frp server address is required\") {\n        // surface a settings-form error to the admin\n    }\n}","preventionTips":["Validate required FRP settings in the admin form before save (non-empty server address when FRP enabled).","Trim whitespace on the address field.","Keep FRP disabled until server address, and for tcp type remote_port, are set."],"tags":["frp","configuration","validation","go"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}