{"record":{"id":"2d322557b8d48729","repo":"AdguardTeam/AdGuardHome","slug":"validating-udp-ports-w","errorCode":null,"errorMessage":"validating udp ports: %w","messagePattern":"validating udp ports: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"internal/home/config.go","lineNumber":783,"sourceCode":"\taddPorts(udpPorts, udpPort(config.DNS.Port))\n\n\tif config.TLS.Enabled {\n\t\taddPorts(\n\t\t\ttcpPorts,\n\t\t\ttcpPort(config.TLS.PortHTTPS),\n\t\t\ttcpPort(config.TLS.PortDNSOverTLS),\n\t\t\ttcpPort(config.TLS.PortDNSCrypt),\n\t\t)\n\n\t\t// TODO(e.burkov):  Consider adding a udpPort with the same value when\n\t\t// we add support for HTTP/3 for web admin interface.\n\t\taddPorts(udpPorts, udpPort(config.TLS.PortDNSOverQUIC))\n\t}\n\n\tif err = tcpPorts.Validate(); err != nil {\n\t\treturn fmt.Errorf(\"validating tcp ports: %w\", err)\n\t} else if err = udpPorts.Validate(); err != nil {\n\t\treturn fmt.Errorf(\"validating udp ports: %w\", err)\n\t}\n\n\tif !filtering.ValidateUpdateIvl(config.Filtering.FiltersUpdateIntervalHours) {\n\t\tconfig.Filtering.FiltersUpdateIntervalHours = 24\n\t}\n\n\tif len(config.Users) == 0 {\n\t\tl.WarnContext(ctx, \"no users in the configuration file; authentication is disabled\")\n\t}\n\n\tif config.Language != \"\" && !allowedLanguages.Has(config.Language) {\n\t\tl.WarnContext(ctx, \"unsupported language\", \"lang\", config.Language)\n\n\t\t// Clear the language so the frontend can use the client's browser\n\t\t// language.\n\t\tconfig.Language = \"\"\n\t}\n","sourceCodeStart":765,"sourceCodeEnd":801,"githubUrl":"https://github.com/AdguardTeam/AdGuardHome/blob/b41aefbe51c8dde65e2c50f093996afa0502edf9/internal/home/config.go#L765-L801","documentation":"The UDP port set (DNS-over-QUIC and implicitly other UDP listeners) failed validation — duplicate or invalid port values. Companion of the TCP port validation.","triggerScenarios":"port_dns_over_quic set to an invalid value (0, >65535) or colliding with another UDP listener per udpPorts.Validate().","commonSituations":"Hand-edited config with a bad port_dns_over_quic, copying configs between instances without adjusting ports, typos.","solutions":["Set port_dns_over_quic to a valid unused UDP port (default 853/784)","Ensure it doesn't duplicate other UDP services in the config","Restart and confirm the wrapped validation error is gone"],"exampleFix":"# before\nport_dns_over_quic: 99999\n# after\nport_dns_over_quic: 853","handlingStrategy":"validation","validationCode":"if cfg.TLS.PortDNSOverQUIC < 1 || cfg.TLS.PortDNSOverQUIC > 65535 {\n    return errors.New(\"invalid quic port\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep DoQ distinct from other UDP listeners","Validate config changes with `AdGuardHome --check-config` style tooling where available"],"tags":["config","ports","quic","udp","validation","startup"],"backgroundTag":"port-conflict","analyzedSha":"b41aefbe51c8dde65e2c50f093996afa0502edf9","analyzedAt":"2026-08-27T04:57:55.097Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}