2022-04-11 11:05:11 +02:00
---
2022-04-22 11:47:47 +02:00
title: Windows & pm2
2022-04-11 11:05:11 +02:00
weight: 20
---
### Install NodeJs
2022-07-10 05:20:52 +02:00
Please [download ](https://nodejs.org/dist/v16.14.2/node-v16.14.2-x86.msi ) and install.
2022-04-11 11:05:11 +02:00
NodeJs is the runtime environment of pm2, so you need to install NodeJs first。
### Install pm2
2022-07-10 05:20:52 +02:00
Enter belows in `cmd.exe` , press the < kbd > Enter</ kbd > key for each line, and run them line by line.
```cmd
2022-04-11 11:05:11 +02:00
npm install -g pm2
npm install pm2-windows-startup -g
pm2-startup install
```
### Run hbbr and hbbs
2022-07-10 05:20:52 +02:00
Download the Windows version of [server program ](https://github.com/rustdesk/rustdesk-server/releases ). Unzip the program to the C: drive. Run the following four commands (take care to edit the `-r` parameter):
```cmd
2022-04-11 11:05:11 +02:00
cd c:\rustdesk-server-windows-x64
2022-07-10 05:20:52 +02:00
pm2 start hbbs.exe -- -r < The host where hbbr is running >
2022-05-12 15:06:38 +02:00
pm2 start hbbr.exe
2022-04-11 11:05:11 +02:00
pm2 save
```
2022-07-10 05:20:52 +02:00
### View the log
```cmd
2022-04-11 11:05:11 +02:00
pm2 log hbbr
pm2 log hbbs
2022-07-10 05:20:52 +02:00
```