mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2026-04-16 13:23:44 +00:00
working on self-host
This commit is contained in:
12
content/self-host/_index.en.md
Executable file
12
content/self-host/_index.en.md
Executable file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
title: Self-host
|
||||
weight: 5
|
||||
pre: "<b>1. </b>"
|
||||
chapter: true
|
||||
---
|
||||
|
||||
### Chapter 1
|
||||
|
||||
# Self-host
|
||||
|
||||
We are continuously developing the server, if you have any comments, please join our [Discord](https://discord.com/invite/nDceKgxnkV) discussion.
|
||||
12
content/self-host/_index.fr.md
Normal file
12
content/self-host/_index.fr.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
title: Auto-hébergeur
|
||||
weight: 5
|
||||
pre: "<b>1. </b>"
|
||||
chapter: true
|
||||
---
|
||||
|
||||
### Chapitre 1
|
||||
|
||||
# Auto-hébergeur
|
||||
|
||||
Nous développons continuellement le serveur, si vous avez des commentaires, veuillez rejoindre notre discussion [Discord](https://discord.com/invite/nDceKgxnkV).
|
||||
12
content/self-host/_index.zh.md
Executable file
12
content/self-host/_index.zh.md
Executable file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
title: 自建服务器
|
||||
weight: 5
|
||||
pre: "<b>1. </b>"
|
||||
chapter: true
|
||||
---
|
||||
|
||||
### 章节 1
|
||||
|
||||
# 自建服务器
|
||||
|
||||
我们在持续开发服务器,如果您有什么意见,请加入我们的[Discord](https://discord.com/invite/nDceKgxnkV)讨论。
|
||||
BIN
content/self-host/install/.DS_Store
vendored
Normal file
BIN
content/self-host/install/.DS_Store
vendored
Normal file
Binary file not shown.
67
content/self-host/install/_index.en.md
Normal file
67
content/self-host/install/_index.en.md
Normal file
@@ -0,0 +1,67 @@
|
||||
---
|
||||
title: Installation
|
||||
weight: 10
|
||||
---
|
||||
|
||||
## Set up your own cloud by following simple steps
|
||||
-----------
|
||||
|
||||
### STEP-1 : Download server-side software programs
|
||||
|
||||
[Download](https://github.com/rustdesk/rustdesk-server/) or use docker rustdesk/rustdesk-server, **Note:** You need [buy license](https://rustdesk.com/server/) When using this software
|
||||
|
||||
Three platform versions provided:
|
||||
- Linux
|
||||
- Windows
|
||||
|
||||
Below tutorial is based on Linux build.
|
||||
|
||||
There are two executables:
|
||||
- hbbs - RustDesk ID/Rendezvous server
|
||||
- hbbr - RustDesk relay server
|
||||
|
||||
They are built on Centos7, tested on Centos7/8, Ubuntu 18/20.
|
||||
|
||||
### STEP-2 : Run hbbs and hbbr on server
|
||||
|
||||
Run hbbs/hbbr on your server (Centos or Ubuntu). We suggust you use [pm2](https://pm2.keymetrics.io/) managing your service.
|
||||
|
||||
By default, hbbs listens on 21115(tcp) and 21116(tcp/udp), hbbr listens on 21117(tcp). Be sure to open these ports in the firewall.
|
||||
|
||||
- TCP(21115, 21116, 21117)
|
||||
- UDP(21116)
|
||||
|
||||
Please run with "-h" option to see help if you wanna choose your own port.
|
||||
|
||||
#### Docker example
|
||||
```
|
||||
sudo docker image pull rustdesk/rustdesk-server
|
||||
sudo docker run --name hbbr -p 21117:21117 -v `pwd`:/root -it --rm rustdesk/rustdesk-server hbbr -m <registered_email>
|
||||
sudo docker run --name hbbs -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -v `pwd`:/root -it --rm rustdesk/rustdesk-server hbbs -r <relay-server-ip> -m <registered_email>
|
||||
```
|
||||
- Note: If you wish to host the server on your own for demonstration or testing purposes, you can specificy `demo` within the `<registered_email>` flag. This will allow your server to run for 30 days.
|
||||
|
||||
|
||||
### STEP-3 : Set hbbs/hbbr address on client-side
|
||||
|
||||
Click on menu button on the right side of ID as below, choose "ID/Relay Server".
|
||||
|
||||

|
||||
|
||||
Please input hbbs host or ip address in ID server input box on remote and local side, and hbbr host or ip address in relay server input box on remote side.
|
||||
|
||||
e.g.
|
||||
|
||||
```
|
||||
hbbs.yourhost.com
|
||||
hbbr.yourhost.com
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
hbbs.yourhost.com:21116
|
||||
hbbr.yourhost.com:21117
|
||||
```
|
||||
|
||||

|
||||
42
content/self-host/install/_index.fr.md
Normal file
42
content/self-host/install/_index.fr.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Linux
|
||||
weight: 10
|
||||
---
|
||||
|
||||
|
||||
### Installer NodeJs
|
||||
Veuillez [Télécharger](https://nodejs.org/dist/v16.14.2/node-v16.14.2-x86.msi) et installer.
|
||||
NodeJs est l'environnement d'exécution de pm2, vous devez donc d'abord installer NodeJs。
|
||||
|
||||
### Installer pm2
|
||||
Entrez ci-dessous dans cmd.exe, appuyez sur la touche Entrée pour chaque ligne et exécutez-les ligne par ligne.
|
||||
```
|
||||
npm install -g pm2
|
||||
npm install pm2-windows-startup -g
|
||||
pm2-startup install
|
||||
```
|
||||
|
||||
### Exécutez hbbr et hbbs
|
||||
Téléchargez la version Windows du [programme serveur](https://github.com/rustdesk/rustdesk-server/releases), en supposant que vous la décompressez sur le lecteur C. Exécutez respectivement les quatre lignes de commandes suivantes.
|
||||
```
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m <Adresse e-mail enregistrée>
|
||||
pm2 start hbbs.exe -- -r <L'adresse de l'hôte sur lequel hbbr est exécuté> -m <Adresse e-mail enregistrée>
|
||||
pm2 save
|
||||
```
|
||||
|
||||
### Afficher le journal
|
||||
```
|
||||
pm2 log hbbr
|
||||
pm2 log hbbs
|
||||
```
|
||||
|
||||
### Modifier l'e-mail
|
||||
Par exemple, la nouvelle adresse e-mail enregistrée est test@test.com, et l'adresse publique de hbbr est test.hbbr.com
|
||||
```
|
||||
pm2 delete hbbr hbbs
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m test@test.com
|
||||
pm2 start hbbs.exe -- -r test.hbbr.com -m test@test.com
|
||||
pm2 save
|
||||
```
|
||||
79
content/self-host/install/_index.zh.md
Normal file
79
content/self-host/install/_index.zh.md
Normal file
@@ -0,0 +1,79 @@
|
||||
---
|
||||
title: 安装
|
||||
weight: 10
|
||||
---
|
||||
|
||||
## 如何自建中继
|
||||
-----------
|
||||
|
||||
### 步骤1: 下载服务器端软件程序
|
||||
|
||||
[下载](https://gitee.com/rustdesk/rustdesk-server/)或者使用docker rustdesk/rustdesk-server,**注意**: 你需要[购买许可](https://rustdesk.com/server/)才能正常运行本程序
|
||||
|
||||
提供三个版本:
|
||||
- Linux
|
||||
- Windows
|
||||
|
||||
以下针对Linux版本做使用说明。
|
||||
|
||||
有两个可执行文件:
|
||||
- hbbs - RustDesk ID注册服务器
|
||||
- hbbr - RustDesk 中继服务器
|
||||
|
||||
下载后务必
|
||||
```
|
||||
chmod a+x hbbs hbbr
|
||||
```
|
||||
|
||||
Linux版本在Centos7构建,在 Centos7/8,Ubuntu 18/20上测试过,Debian系列的发行版本应该都没有问题。如果有其他发行版本需求,请联系我。
|
||||
|
||||
#### 服务器要求
|
||||
硬件要求很低,最低配置的云服务器就可以了,CPU和内存要求都是最小的。关于网络大小,如果TCP打洞直连失败,就要耗费中继流量,一个中继连接的流量在30k-3M每秒之间(1920x1080屏幕),取决于清晰度设置和画面变化,如果只是办公需求,平均在100K。
|
||||
|
||||
### 步骤2: 在服务器上运行 hbbs 和 hbbr
|
||||
|
||||
在服务器上运行 hbbs/hbbr (Centos 或 Ubuntu)。建议使用[pm2](https://pm2.keymetrics.io/) 管理服务。
|
||||
|
||||
需要先运行 hbbr, 可以不带任何参数;
|
||||
然后运行 hbbs:
|
||||
```
|
||||
./hbbs -r <hbbr运行所在主机的地址>
|
||||
```
|
||||
hhbs的-r参数不是必须的,他只是方便你不用在客户端指定中继服务器。客户端指定的中继服务器优先级高于这个。
|
||||
|
||||
默认情况下,hbbs 监听21114(tcp), 21115(tcp), 21116(tcp/udp), 21118(tcp),hbbr 监听21117(tcp), 21119(tcp)。务必在防火墙开启这几个端口, **请注意21116同时要开启TCP和UDP**。其中21115是hbbs用作NAT类型测试,21116/UDP是hbbs用作ID注册与心跳服务,21116/TCP是hbbs用作TCP打洞与连接服务,21117是hbbr用作中继服务, 21118和21119是为了支持网页客户端,21114是网页控制台和API。
|
||||
|
||||
- TCP(21114, 21115, 21116, 21117, 21118, 21119)
|
||||
- UDP(21116)
|
||||
|
||||
如果你想选择**自己的端口**,使用 “-h” 选项查看帮助。
|
||||
|
||||
#### Docker示范
|
||||
```
|
||||
sudo docker image pull rustdesk/rustdesk-server
|
||||
sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v `pwd`:/root -it --rm rustdesk/rustdesk-server hbbr -m <registered_email>
|
||||
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --rm rustdesk/rustdesk-server hbbs -r <relay-server-ip> -m <registered_email>
|
||||
```
|
||||
|
||||
### 步骤3: 在客户端设置 hbbs/hbbr 地址
|
||||
|
||||
点击 ID 右侧的菜单按钮如下,选择“ ID/中继服务器”。
|
||||
|
||||

|
||||
|
||||
在 ID 服务器输入框中(被控端+主控端)输入 hbbs 主机或 ip 地址,在中继服务器输入框中(被控制的一端,主控端无需设置)输入 hbbr 主机或 ip 地址。
|
||||
|
||||
**请注意**图中的Key不是指的注册邮箱,对应的是hhbr/hhbs的-k参数,这是为了防止别人盗用你的hbbr/hbbs使用。
|
||||
|
||||
例如:
|
||||
|
||||
```
|
||||
hbbs.yourhost.com
|
||||
```
|
||||
|
||||
或者
|
||||
|
||||
```
|
||||
hbbs.yourhost.com:21116
|
||||
```
|
||||

|
||||
BIN
content/self-host/install/images/.DS_Store
vendored
Normal file
BIN
content/self-host/install/images/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
content/self-host/install/images/server-set-menu-zh.png
Normal file
BIN
content/self-host/install/images/server-set-menu-zh.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
content/self-host/install/images/server-set-menu.png
Normal file
BIN
content/self-host/install/images/server-set-menu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
content/self-host/install/images/server-set-window-zh.png
Normal file
BIN
content/self-host/install/images/server-set-window-zh.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
content/self-host/install/images/server-set-window.png
Normal file
BIN
content/self-host/install/images/server-set-window.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
42
content/self-host/windows/_index.en.md
Normal file
42
content/self-host/windows/_index.en.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Windows
|
||||
weight: 20
|
||||
---
|
||||
|
||||
|
||||
### Install NodeJs
|
||||
Please [Download](https://nodejs.org/dist/v16.14.2/node-v16.14.2-x86.msi) and install.
|
||||
NodeJs is the runtime environment of pm2, so you need to install NodeJs first。
|
||||
|
||||
### Install pm2
|
||||
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
|
||||
pm2-startup install
|
||||
```
|
||||
|
||||
### Run hbbr and hbbs
|
||||
Download the windows version of [server program](https://github.com/rustdesk/rustdesk-server/releases), assuming you unzip it to the C drive. Run the following four lines of commands respectively.
|
||||
```
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m <Registered email address>
|
||||
pm2 start hbbs.exe -- -r <The address of the host where hbbr is running> -m <Registered email address>
|
||||
pm2 save
|
||||
```
|
||||
|
||||
### View log
|
||||
```
|
||||
pm2 log hbbr
|
||||
pm2 log hbbs
|
||||
```
|
||||
|
||||
### Modify email
|
||||
For example, the new registered email address is test@test.com, and the public address of hbbr is test.hbbr.com
|
||||
```
|
||||
pm2 delete hbbr hbbs
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m test@test.com
|
||||
pm2 start hbbs.exe -- -r test.hbbr.com -m test@test.com
|
||||
pm2 save
|
||||
```
|
||||
42
content/self-host/windows/_index.fr.md
Normal file
42
content/self-host/windows/_index.fr.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Windows
|
||||
weight: 20
|
||||
---
|
||||
|
||||
|
||||
### Installer NodeJs
|
||||
Veuillez [Télécharger](https://nodejs.org/dist/v16.14.2/node-v16.14.2-x86.msi) et installer.
|
||||
NodeJs est l'environnement d'exécution de pm2, vous devez donc d'abord installer NodeJs。
|
||||
|
||||
### Installer pm2
|
||||
Entrez ci-dessous dans cmd.exe, appuyez sur la touche Entrée pour chaque ligne et exécutez-les ligne par ligne.
|
||||
```
|
||||
npm install -g pm2
|
||||
npm install pm2-windows-startup -g
|
||||
pm2-startup install
|
||||
```
|
||||
|
||||
### Exécutez hbbr et hbbs
|
||||
Téléchargez la version Windows du [programme serveur](https://github.com/rustdesk/rustdesk-server/releases), en supposant que vous la décompressez sur le lecteur C. Exécutez respectivement les quatre lignes de commandes suivantes.
|
||||
```
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m <Adresse e-mail enregistrée>
|
||||
pm2 start hbbs.exe -- -r <L'adresse de l'hôte sur lequel hbbr est exécuté> -m <Adresse e-mail enregistrée>
|
||||
pm2 save
|
||||
```
|
||||
|
||||
### Afficher le journal
|
||||
```
|
||||
pm2 log hbbr
|
||||
pm2 log hbbs
|
||||
```
|
||||
|
||||
### Modifier l'e-mail
|
||||
Par exemple, la nouvelle adresse e-mail enregistrée est test@test.com, et l'adresse publique de hbbr est test.hbbr.com
|
||||
```
|
||||
pm2 delete hbbr hbbs
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m test@test.com
|
||||
pm2 start hbbs.exe -- -r test.hbbr.com -m test@test.com
|
||||
pm2 save
|
||||
```
|
||||
41
content/self-host/windows/_index.zh.md
Normal file
41
content/self-host/windows/_index.zh.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
title: Windows
|
||||
weight: 20
|
||||
---
|
||||
|
||||
### 安装NodeJs
|
||||
请点击[下载](https://nodejs.org/dist/v16.14.2/node-v16.14.2-x86.msi)安装,可能会有点慢,如果卡顿太久,尝试关掉重新安装。
|
||||
NodeJs是pm2的运行时环境,所以要先安装NodeJs。
|
||||
|
||||
### 安装pm2
|
||||
在cmd.exe中分别输入下面三行,每一行都要按回车键,一行一行运行。
|
||||
```
|
||||
npm install -g pm2
|
||||
npm install pm2-windows-startup -g
|
||||
pm2-startup install
|
||||
```
|
||||
|
||||
### 运行hbbr和hbbs
|
||||
下载Windows版本[服务器程序](https://gitee.com/rustdesk/rustdesk-server/releases),假设你解压缩到了C盘下。分别运行下面四行命令。
|
||||
```
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m 注册邮箱地址
|
||||
pm2 start hbbs.exe -- -r hbbr运行所在主机的地址 -m 注册邮箱地址
|
||||
pm2 save
|
||||
```
|
||||
|
||||
### 查看log
|
||||
```
|
||||
pm2 log hbbr
|
||||
pm2 log hbbs
|
||||
```
|
||||
|
||||
### 更换注册邮箱
|
||||
比如新的注册邮箱是test@test.com,hbbr的公网地址是test.hbbr.com
|
||||
```
|
||||
pm2 delete hbbr hbbs
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m test@test.com
|
||||
pm2 start hbbs.exe -- -r test.hbbr.com -m test@test.com
|
||||
pm2 save
|
||||
```
|
||||
Reference in New Issue
Block a user