Windows security policy is tricky, if this tutorial does not work for you, or you encounter unstable connection, please migrate to a Linux server.
You now either have two choices, you can either use PM2 (easier) or NSSM (a bit harder) to start the RustDesk server There are some benefits to using NSSM:
While the benefits of PM2 include:
Please download and extract NSSM select the appropriate
architecture to your Windows system (if x86 use the contents of the win32 folder, if x64 use the
contents of win64 folder). It is also best practice to move the binary of NSSM into the
Program Files\NSSM (NSSM once started as a service, it cannot be moved from the directory it was placed in.
thus it is best to tuck it away in
Program Files) directory of your Installation drive (Usually the C: drive).
It is also advisable to add the path (such as
C:\Program Files\NSSM) to the path variable.
If you’ve done everything correctly the folder
C:\Program Files\NSSM (in this example I use the C:
drive but you can use whatever drive you installed Windows to or whatever path you desire) should
only contain the file
We will be using
C:\Program Files\NSSM in this example.
Open Command prompt and run
nssm if you see a help page you are ready to move onto the next step.
Download the Windows version of RustDesk Server.
Unzip the program to the
C:\Program Files\RustDesk Server (or anywhere you desire just make sure it
doesn’t change after the service is installed). Now get back to Command prompt.
We will be using
C:\Program Files\RustDesk Server in this example.
nssm install "RustDesk hbbs service" "C:\Program Files\RustDesk Server\hbbs.exe" -k _
nssm install "RustDesk hbbr service" "C:\Program Files\RustDesk Server\hbbr.exe" -k _
RustDesk hbbs service to whatever you desire to name hbbs the service
RustDesk hbbr service to whatever you desire to name hbbr the service
C:\Program Files\RustDesk Server\hbbs.exe to wherever you placed the RustDesk binaries
C:\Program Files\RustDesk Server\hbbr.exe to wherever you placed the RustDesk binaries
-k _ option which is optional, it’s just for better security. In the
Pro version, please ignore
-k _ which is applied implicitly.
The command template in case you just want to copy and paste and edit.
nssm install <Desired hbbs servicename> <RustDesk hbbs binary path> <RustDesk hbbs arguments>
nssm install <Desired hbbr servicename> <RustDesk hbbr binary path> <RustDesk hbbr arguments>
After successful installation of services, they need to be started.
nssm start <Desired hbbs servicename>
nssm start <Desired hbbr servicename>
(The method above has been tested on Windows Server Core 2022 Standard).
Please download and install Node.js. Node.js is the runtime environment of PM2, so you need to install Node.js first.
Enter belows in
cmd.exe, press the Enter key for each line, and run them line by line.
npm install -g pm2
npm install pm2-windows-startup -g
Download the Windows version of RustDesk Server. Unzip the program to the C: drive. Run the following four commands:
pm2 start hbbs.exe
pm2 start hbbr.exe
pm2 log hbbr
pm2 log hbbs