Skip to content

feat: native Windows services and installer - #718

Draft
jahvari wants to merge 2 commits into
rustdesk:masterfrom
jahvari:codex/native-windows-services
Draft

jahvari wants to merge 2 commits into
rustdesk:masterfrom
jahvari:codex/native-windows-services

Conversation

@jahvari

@jahvari jahvari commented Oct 20, 2026 •

Copy link
Copy Markdown

Add an opt-in native Windows service mode to hbbs and hbbr, and replace the legacy GUI/NSSM installer path with a service-focused x64 installer targeting Windows Server 2016, 2019, 2022 and 2025.

The services report readiness after their listeners are available, handle SCM stop/shutdown requests, write rotating per-service logs, and keep their data separate from program files. Normal foreground operation is retained.

Setup runs the services as LocalService with per-service SID access to application data. The relay has read-only key/configuration access and write access to its own logs; it depends on the ID service for key initialization. Setup creates only the standard desktop-client firewall rules, preserves existing rules during ordinary upgrades, and restores changed rule properties on failure.

The x64 programs use the shared MSVC runtime. Each installer build bundles the current Microsoft-signed v14 redistributable, retains a newer installed version, and records the exact source revision. No Node.js, WebView2, NSSM, runtime administrator account, or automatic reboot is required.

Validation completed locally:

  • Four native service helper tests passed on Windows x64.
  • Windows PowerShell 5.1 parsed the packaging scripts.
  • Installer logic tests passed for native argument quoting, runtime version/signature/error/reboot handling, and restoring custom firewall restrictions.

The Windows Server 2022/2025 CI run passed on both targets, including install, stop/start, crash recovery, upgrade with key preservation, uninstall with data preservation, and artifact upload. The initial run passed the installation lifecycle but exposed an artifact-upload issue across drive letters; that workflow issue is fixed.

This PR remains draft pending direct Server 2016/2019 validation, reboot-before-login checks, and real-client remote sessions. CI lifecycle coverage does not establish those remaining cases.

This PR contains the Windows deployment feature only. Independent server bug fixes and dependency updates are submitted separately.

Related existing issues

Related Windows deployment reports:

These are related deployment reports, not automatic-closing claims. This PR does not claim to fix the independent high-CPU report in #186.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant