{"record":{"id":"dce753d84d73b7f7","repo":"spacedriveapp/spacedrive","slug":"daemon-auto-start-is-currently-only-supported-on-m","errorCode":null,"errorMessage":"Daemon auto-start is currently only supported on macOS and Linux.","messagePattern":"Daemon auto-start is currently only supported on macOS and Linux\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"warning","filePath":"apps/cli/src/domains/daemon/mod.rs","lineNumber":464,"sourceCode":"\t\t\"active\" => println!(\"Service status: ● Active (running)\"),\n\t\t\"inactive\" => println!(\"Service status: ○ Inactive (stopped)\"),\n\t\t\"failed\" => println!(\"Service status: Failed\"),\n\t\t_ => println!(\"Service status: {}\", status),\n\t}\n\n\tprintln!();\n\tprintln!(\"Useful commands:\");\n\tprintln!(\"  systemctl --user status {}\", service_name);\n\tprintln!(\"  systemctl --user start {}\", service_name);\n\tprintln!(\"  systemctl --user stop {}\", service_name);\n\tprintln!(\"  journalctl --user -u {} -f\", service_name);\n\n\tOk(())\n}\n\n#[cfg(not(any(target_os = \"macos\", target_os = \"linux\")))]\nasync fn install_launchd_service(_data_dir: PathBuf, _instance: Option<String>) -> Result<()> {\n\tErr(anyhow::anyhow!(\n\t\t\"Daemon auto-start is currently only supported on macOS and Linux.\"\n\t))\n}\n\n#[cfg(not(any(target_os = \"macos\", target_os = \"linux\")))]\nasync fn uninstall_launchd_service(_instance: Option<String>) -> Result<()> {\n\tErr(anyhow::anyhow!(\n\t\t\"Daemon auto-start is currently only supported on macOS and Linux.\"\n\t))\n}\n\n#[cfg(not(any(target_os = \"macos\", target_os = \"linux\")))]\nasync fn check_launchd_status(_instance: Option<String>) -> Result<()> {\n\tErr(anyhow::anyhow!(\n\t\t\"Daemon auto-start is currently only supported on macOS and Linux.\"\n\t))\n}\n","sourceCodeStart":446,"sourceCodeEnd":482,"githubUrl":"https://github.com/spacedriveapp/spacedrive/blob/6dfeccf2113039e35f2ce735f945e70dc3e4ea45/apps/cli/src/domains/daemon/mod.rs#L446-L482","documentation":"The `daemon install` subcommand is only implemented for macOS (launchd) and Linux (systemd). On any other compile target, including Windows, the stub `install_launchd_service` immediately returns this error without touching the system. It is a deliberate capability gap, not a runtime malfunction: nothing was installed and no state changed.","triggerScenarios":"Building and running sd-cli on Windows and invoking `sd-cli daemon install`; compiling for another tier (e.g. FreeBSD) and calling the subcommand.","commonSituations":"Cross-platform users expecting auto-start parity; CI matrices that run the same command set on Windows runners.","solutions":["On Windows, run the daemon manually: `sd-daemon --data-dir <dir>`.","For auto-start on Windows, register a logon task yourself: `schtasks /create /tn SpacedriveDaemon /tr 'C:\\path\\sd-daemon.exe --data-dir C:\\path\\data' /sc onlogon`.","Gate the command out of cross-platform scripts: only call `daemon install` when `cfg!(any(target_os = \"macos\", target_os = \"linux\"))`.","Watch upstream for a Windows service implementation; the stub marks the work as pending."],"exampleFix":"# before (Windows)\nsd-cli daemon install  # -> Daemon auto-start is currently only supported on macOS and Linux.\n\n# after (Windows auto-start via Task Scheduler)\nschtasks /create /tn SpacedriveDaemon /tr 'C:\\sd\\sd-daemon.exe --data-dir C:\\sd\\data' /sc onlogon /rl limited","handlingStrategy":"validation","validationCode":"fn autostart_supported() -> bool {\n    cfg!(any(target_os = \"macos\", target_os = \"linux\"))\n}\n\nif autostart_supported() { sd_daemon_install().await? } else { eprintln!(\"autostart unsupported; run sd-daemon manually\"); }","typeGuard":"pub fn autostart_supported() -> bool { cfg!(any(target_os = \"macos\", target_os = \"linux\")) }","tryCatchPattern":"match install_autostart().await {\n    Err(e) if e.to_string().contains(\"only supported on macOS and Linux\") => { /* expected on Windows; degrade gracefully */ }\n    other => other?,\n}","preventionTips":["Gate `daemon install` behind an OS check in cross-platform scripts.","On Windows use schtasks or a startup shortcut to run sd-daemon at logon.","Treat this message as informational so CI matrices on Windows don't go red."],"tags":["windows","platform-support","daemon","autostart"],"backgroundTag":null,"analyzedSha":"6dfeccf2113039e35f2ce735f945e70dc3e4ea45","analyzedAt":"2026-08-16T11:26:17.074Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}