diegosouzapw/OmniRoute · error · Error
Sudo password required to start tailscaled
Error message
Sudo password required to start tailscaled
What it means
Privilege gate on the Unix daemon start path: no usable sudo password was available — neither supplied in the request, nor previously cached. Starting tailscaled with --socket/--statedir requires root, and unlike the generic runSudoShell guard this message clarifies the daemon-start context specifically.
Solutions
- Supply the sudo password with the start request
- Complete one earlier privileged operation so the password gets cached
- Configure passwordless sudo for the tailscaled launch command
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/lib/tailscaleTunnel.ts:596 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/d837013b0bd5a4bd.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/tailscaleTunnel.ts:596
// Ignore service start errors and verify below.
}
await sleep(2500);
if (!(await getLiveStatusPayload(resolution.binaryPath))) {
throw new Error("Failed to start Tailscale service");
}
return { started: true };
}
const daemonBinary = await resolveDaemonBinary(resolution.binaryPath);
if (!daemonBinary) {
throw new Error("tailscaled binary not found");
}
const password = toNonEmptyString(sudoPassword) || getCachedPassword() || "";
if (!password) {
throw new Error("Sudo password required to start tailscaled");
}
setCachedPassword(password);
await ensureTailscaleDir();
const command = [
`mkdir -p ${shellEscape(getTailscaleDir())}`,
`nohup ${shellEscape(daemonBinary)} --socket=${shellEscape(getTailscaleSocketPath())} --statedir=${shellEscape(getTailscaleDir())} >> ${shellEscape(getLogFilePath())} 2>&1 & echo $! > ${shellEscape(getPidFilePath())}`,
].join(" && ");
await runSudoShell(command, password);
await sleep(3000);
// Re-probe socket after starting
invalidateSocketCache();
if (!(await getLiveStatusPayload(resolution.binaryPath))) {
throw new Error("tailscaled did not become ready");View on GitHub (pinned to a179ffed5b)